security-scan gate (shared felhom.eu/scripts/security_scan_gate.py) in the fast set and CI, warn-first, with the accepted-hits file and decoys (R-986)
gates / gates (push) Successful in 1m12s

This commit is contained in:
2026-10-19 21:11:31 +02:00
parent c4b3b0a039
commit a03c25aa1f
5 changed files with 56 additions and 0 deletions
+9
View File
@@ -18,6 +18,9 @@ Gates, in order (all must pass; **non-zero exit on any failure**):
8. debug-routes every debug-page control resolves to a handler, and back (R-400)
9. reuse-refs every path cited by this repo's REUSE.md still resolves
… gofmt every Go file is gofmt-clean (R-454)
… security-scan govulncheck (called vulnerabilities) + gitleaks on the pushed commits, WARN-FIRST: it
lists, it never refuses (R-986; shared, felhom.eu/scripts/security_scan_gate.py). Fast
although it reads vuln.go.dev: offline it says NOT CHECKED, so it cannot stop a push
… gate-decoys the decoy suite (test_gate_decoys.py): every gate above still convicts its
decoys (R-1116). ~22 s and it edits real files in this tree for a moment, so
the full run only, never --fast (never the hook, never CI)
@@ -60,6 +63,8 @@ SHARED_REUSE = os.path.join(SHARED_DIR, "reuse_refs_check.py")
SHARED_INSTRUCTIONS = os.path.join(SHARED_DIR, "instructions_gate.py")
# R-389 — shared, like the two above: it lives in felhom.eu/scripts/ and is never copied.
SHARED_OBSERVATIONS = os.path.join(SHARED_DIR, "observations_gate.py")
# R-986 — shared too: the dependency and secret scanner, warn-first.
SHARED_SECURITY = os.path.join(SHARED_DIR, "security_scan_gate.py")
# R-404 — the golden NOTICE. Lives here, beside the runner, because it is about THIS repo's
# releases; it imports the felhom.eu gate rather than copying its comparison.
@@ -105,6 +110,10 @@ GATES = [
# R-454 — every Go file is gofmt-clean. `go vet` does not check formatting; nothing did. Fast:
# the toolchain's own formatter, no network, no container runtime.
("gofmt", os.path.join(SCRIPTS, "gofmt_gate.py"), [], True, True),
# R-986 (2026-10-19) — govulncheck + gitleaks, WARN-FIRST (exit 0 whatever it finds; a hit is listed). Fast
# although it reads vuln.go.dev: it cannot refuse, so a network blink is a NOT CHECKED line. ~8 s here. CI fetches
# the pinned gitleaks (FELHOM_SCAN_FETCH=1) and has no Go, so govulncheck says NOT CHECKED there.
("security-scan", SHARED_SECURITY, [REPO], True, True),
# R-404 — ADVISORY. Reports the golden debt where it is created; never refuses.
("golden-notice", GOLDEN_NOTICE, [REPO], True, False),
# R-1116 (2026-10-17) — the gates' OWN decoy suite: every gate above, red-proved against its decoys. It was