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

@ -18,7 +18,7 @@ from .debian import (
read_pkg_md5sums,
stat_triplet,
)
from .secrets import SecretPolicy
from .ignore import IgnorePolicy
from .accounts import collect_non_system_users
@ -233,8 +233,8 @@ def _topdirs_for_package(pkg: str, pkg_to_etc_paths: Dict[str, List[str]]) -> Se
return topdirs
def harvest(bundle_dir: str, policy: Optional[SecretPolicy] = None) -> str:
policy = policy or SecretPolicy()
def harvest(bundle_dir: str, policy: Optional[IgnorePolicy] = None) -> str:
policy = policy or IgnorePolicy()
os.makedirs(bundle_dir, exist_ok=True)
if hasattr(os, "geteuid") and os.geteuid() != 0:
@ -487,9 +487,7 @@ def harvest(bundle_dir: str, policy: Optional[SecretPolicy] = None) -> str:
)
if not pkg_to_etc_paths.get(pkg, []) and not managed:
notes.append(
"No /etc files detected for this package."
)
notes.append("No /etc files detected for this package.")
pkg_snaps.append(
PackageSnapshot(