SEC002#

class src.ansys.pre_commit_hooks.quality_rules.security.SEC002#

Bases: Security

The zizmor config includes the secrets-outside-env rule.

Overview#

check

Check that the zizmor configuration disables secrets-outside-env.

Import detail#

from src.ansys.pre_commit_hooks.quality_rules.security import SEC002

Method detail#

static SEC002.check(repository_root: pathlib.Path, readme_file: str | None) → ansys.pre_commit_hooks.quality_rules.common.RuleCheckResult#

Check that the zizmor configuration disables secrets-outside-env.

Returns:
bool or str

True when .github/zizmor.yml sets rules.secrets-outside-env.disable to true or does not exist (SEC001 reports a missing file), otherwise an error.