Rename secrets to ignore as it does more than secrets
All checks were successful
CI / test (push) Successful in 5m35s
Lint / test (push) Successful in 27s
Trivy / test (push) Successful in 17s

This commit is contained in:
Miguel Jacq 2025-12-15 17:03:28 +11:00
parent 4882ddff49
commit e4be7f5975
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
7 changed files with 51 additions and 15 deletions

View file

@ -1,8 +1,9 @@
from enroll.secrets import SecretPolicy
from enroll.ignore import IgnorePolicy
def test_secret_policy_denies_common_backup_files():
pol = SecretPolicy()
def test_ignore_policy_denies_common_backup_files():
pol = IgnorePolicy()
assert pol.deny_reason("/etc/shadow-") == "denied_path"
assert pol.deny_reason("/etc/passwd-") == "denied_path"
assert pol.deny_reason("/etc/group-") == "denied_path"
assert pol.deny_reason("/foobar") == "unreadable"