This repository has been archived on 2026-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator/security-review/checkers/fixtures/compliance-drift
Adam Moussa 31858e02e5 fix(secrev): commit compliance-drift secret fixture as dotenv.fixture (canary broke on fresh clone)
The compliance-drift canary's planted tracked-secret fixture was BadName_repo/.env,
but the repo root .gitignore lists '.env' — so it was never committed. On a fresh
clone of main the file is absent, the secrets-committed check stops firing, and the
canary FAILS (expected 6, got 5). It only passed where a gitignored, untracked
'.env' happened to exist locally. Verified the failure reproduces in a clean clone
of origin/main (3d97139) and in a fresh worktree.

Fix (in-convention, mirrors the dependency-cve .fixture-suffix trick): ship the
secret as BadName_repo/dotenv.fixture (committable, not gitignored); the --canary
materialization renames dotenv.fixture -> .env in its temp work area. The dotgit/
index already TRACKS .env, so git ls-files still reports it and the drift fires.
Restores the documented 6/6 canary on any fresh checkout. shellcheck stays clean.
2026-06-18 15:58:15 -04:00
..
BadName_repo fix(secrev): commit compliance-drift secret fixture as dotenv.fixture (canary broke on fresh clone) 2026-06-18 15:58:15 -04:00
clean-repo feat(secrev): compliance-drift Plane-1 Tier-1 checker (ALARM-only) 2026-06-18 14:06:31 -04:00
docs-repo feat(secrev): compliance-drift Plane-1 Tier-1 checker (ALARM-only) 2026-06-18 14:06:31 -04:00
EXPECTED_DRIFT_COUNT feat(secrev): compliance-drift Plane-1 Tier-1 checker (ALARM-only) 2026-06-18 14:06:31 -04:00
README.md fix(secrev): commit compliance-drift secret fixture as dotenv.fixture (canary broke on fresh clone) 2026-06-18 15:58:15 -04:00

compliance-drift canary fixtures

Planted-drift corpus for checkers/compliance-drift.sh --canary (offline, no network/token). The checker asserts the total drift count equals EXPECTED_DRIFT_COUNT (anti-complacency floor, design §6.4). If a check regresses (stops firing), the count drops and the canary FAILS (exit 3).

Fixtures (each a real git checkout so the tracked-.env / ls-files checks work):

Fixture Planted drift Count
clean-repo none — kebab name, README, ci.yaml, dependabot.yml, .env is gitignored (must NOT fire) 0
BadName_repo non-kebab name; no README; no ci.yaml; has package.json but no dependabot.yml; tracked .env with values 5
docs-repo docs-only (CI skipped via DOCS_ONLY_REPOS), kebab name, no README 1

Total = 6 (EXPECTED_DRIFT_COUNT). The canary pins DOCS_ONLY_REPOS=docs-repo and COMPLIANCE_EXEMPT="" internally so it is deterministic regardless of the operator's env.

Secret-fixture naming: BadName_repo's planted tracked-secret env file is committed as dotenv.fixture, NOT .env. The repo's root .gitignore lists .env, so a literal .env fixture would silently never be committed — on a fresh clone the secrets-committed drift would vanish and the count would drop to 5 (this regression was caught by this very canary). The --canary materialization renames dotenv.fixture → .env in its temp work area; the dotgit/ index already TRACKS .env, so git ls-files still reports it. This mirrors the .fixture-suffix convention the dependency-cve fixtures use for their manifests. Keep any new committed secret fixture under a non-gitignored name and rename it in the canary.

When you add/remove a check or fixture, update both the fixture and EXPECTED_DRIFT_COUNT in the same commit (the canary edit is itself caught on the next run — design §6.4).