The security.py module#

Summary#

Security

Security rule family.

SEC001

The .github/zizmor.yml file exists.

SEC002

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

SEC003

The gitleaks hook is configured.

SEC004

SECURITY.md discourages public issue reporting.

SEC005

Pre-commit repositories pin revisions to commit SHAs.

SEC006

A dependency lockfile exists.

Description#

Security configuration checks.

This rule set validates the security configuration of a repository: the zizmor and gitleaks tooling, the SECURITY.md policy, the pinning of the pre-commit repositories, and the dependency lockfile.

The checks cover:

  • .github/zizmor.yml exists and disables the secrets-outside-env audit

  • The gitleaks pre-commit hook is configured

  • SECURITY.md exists only at the root and tells reporters not to open public issues

  • Pre-commit repositories are pinned to commit SHAs

  • A uv.lock or poetry.lock lockfile pins the dependencies

GitHub Actions workflow hardening, such as pinning actions to commit SHAs, version comments, token permissions, credential persistence, and dangerous triggers, is left to the zizmor audits. Missing, unreadable, or invalid configuration is reported as an ERROR.