Lane: work-2. Source: #968 security-review SUGGESTION (medium confidence, non-blocking).
Triggering example: in plugins/disk-hygiene/skills/clean/scripts/test_hygiene.py, the helpers run_guard, run_guard_disabled, and run_guard_powershell_disabled patch os.environ but NOT sys.argv.
Observed: after #382, resolve_disk_hygiene_enabled() reads sys.argv[1:] before the env fallback. If a test runner's argv happened to contain --disk-hygiene-enabled true, it would override the env-var mock and a run_guard_powershell_disabled-based test would see ask instead of the expected deny. Standard invocations (python -m unittest, pytest) never produce such argv, so CI is unaffected today — this is latent fragility, not a live failure.
Expected: apply the pattern the new run_guard_enabled_argv helper already demonstrates — mock sys.argv alongside os.environ in the three older helpers — to fully isolate the argv seam.
Category: test-coverage (improvement). Not fail-open; the underlying fix is correct and security-reviewed clean.
Lane: work-2. Source: #968 security-review SUGGESTION (medium confidence, non-blocking).
Triggering example: in
plugins/disk-hygiene/skills/clean/scripts/test_hygiene.py, the helpersrun_guard,run_guard_disabled, andrun_guard_powershell_disabledpatchos.environbut NOTsys.argv.Observed: after #382,
resolve_disk_hygiene_enabled()readssys.argv[1:]before the env fallback. If a test runner's argv happened to contain--disk-hygiene-enabled true, it would override the env-var mock and arun_guard_powershell_disabled-based test would seeaskinstead of the expecteddeny. Standard invocations (python -m unittest,pytest) never produce such argv, so CI is unaffected today — this is latent fragility, not a live failure.Expected: apply the pattern the new
run_guard_enabled_argvhelper already demonstrates — mocksys.argvalongsideos.environin the three older helpers — to fully isolate the argv seam.Category: test-coverage (improvement). Not fail-open; the underlying fix is correct and security-reviewed clean.