SEC006#

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

Bases: Security

A dependency lockfile exists.

Overview#

check

Report an error when neither uv.lock nor poetry.lock exists at the root.

Import detail#

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

Method detail#

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

Report an error when neither uv.lock nor poetry.lock exists at the root.

Returns:
bool or str

True when a lockfile exists, otherwise an error. A lockfile keeps development and CI environments reproducible and prevents unreviewed dependencies from being installed.