Repository navigation
Description
Summary
Security was one of the four workflows revived by #842 (450734e). Its first
real execution shows a secret-scanning gate that scans nothing on push: main
and then reports that it found secrets. Both halves are defects, and the
second is the dangerous one: the rollup converts "the scanner could not run"
into "the scanner found verified secrets".
This is a first measurement, not a regression from #842. The workflow was
startup_failure (0 jobs) before that merge, so these jobs had never executed.
Measured — run 35772046*, Security @ 450734ea021167b2d9c2a85e9976bc6708deb379
14 jobs. 5 failed:
| Conclusion | Job |
|---|---|
| failure | Secret Detection |
| failure | Secret Detection (TruffleHog) |
| failure | Container Security (Trivy) (deploy/Containerfile) |
| failure | Container Security Scan |
| failure | Security Audit Summary (rollup) |
Rust Dependency Audit ×2, Secret Detection (Gitleaks), CodeQL Analysis,
CodeQL SAST, both SBOM jobs, both licence jobs and Security Status all
passed.
Fault 1 — TruffleHog scans zero bytes on a push to main
Secret Detection step 3 TruffleHog Secret Scan:
##[error]BASE and HEAD commits are the same. TruffleHog won't scan anything.
Please see documentation (https://github.com/trufflesecurity/trufflehog#octocat-trufflehog-github-action).
On a push to main the action is handed BASE == HEAD, so its diff range is
empty. Secret-scanning coverage on the default branch is currently zero —
the job is red for a configuration reason, not a finding, and no bytes were
examined.
Fault 2 — the rollup asserts a finding that does not exist
Security Audit Summary step 3 Check for failures emits:
##[error]TruffleHog found verified secrets
##[error]Security audit found critical issues
##[error]Process completed with exit code 1.
TruffleHog found no secrets. It found nothing because it read nothing. The
summary branches on the upstream job's result == 'failure' and prints a
message asserting a positive detection. The script also carries an
::error::Rust audit failed branch while Rust Dependency Audit succeeded
twice in the same run.
This is the guard/consumer mismatch pattern: the consumer asks a different
question than the guard answers. failure means "this job did not complete
successfully"; it does not mean "a secret was found". Conflating them is
harmful in both directions — it manufactures false alarms now, and the same
confusion is what lets a genuinely-broken scanner read as a clean one later.
Fault 3 — container scanning
Container Security Scan fails at step 5 Upload Trivy scan results, and
Container Security (Trivy) (deploy/Containerfile) fails separately. Not yet
localized; likely a missing/empty SARIF or a permissions issue on upload rather
than a finding. Needs its own diagnosis — do not assume it is a real
vulnerability report until the step is read.
Why this is not a merge blocker
Per the standing ruling that a newly surfaced finding is an issue with
acceptance criteria rather than a gate. main carries exactly one rule type,
required_status_checks, naming only abi-codegen-drift and
zig build test (FFI + wire contract) — both success on this commit
(ABI codegen drift ✅, Zig ✅). None of the five failing jobs is required.
Acceptance criteria
- TruffleHog examines a non-empty range on
push: main. Either scan the
full history/filesystem onmainand keep the diff mode for
pull_request, or skip the job onmainexplicitly — but a skip must be
recorded as not scanned, never as a pass. - The job prints its denominator: commits (or bytes/paths) actually
scanned. A scanner that cannot state what it examined is not evidence.
0must fail. Security Audit Summarydistinguishes errored from found. A failing
upstream job produces<job> did not complete (see its log). The phrase
"found verified secrets" may only be emitted when the scanner reports an
actual detection count> 0. TheRust audit failedbranch must not fire
whileRust Dependency Auditis green.- Mutant 1 (false-positive): with no secret anywhere in the tree, make
TruffleHog error (e.g. an invalid arg). The summary must say the scan did
not run, and must not claim a detection. - Mutant 2 (true-positive): plant a detectable, verified-format dummy
credential. The scan must go red with a detection count, and the summary
must name it. Remove it; green returns. - Container jobs: root-cause
Upload Trivy scan resultsand either fix it
or open a separate issue with its own ACs. State plainly whether Trivy
reported findings or failed to report at all.
Context
- Revived by fix(ci): revive four startup-dead workflows — codeql-action v4.38.0 + actions.lock repair #842 (
450734e), which closed main is CI-dead since #830: tests.yml startup_failure (jobs=0) and Actions lockfile verify red #837 and Every ExUnit test is dead in CI: the only mix test sits behind a needs: edge to a failing job #836. - Sibling first-measurement defect from the same merge: E2E tests have never executed: 'Start full stack' fails with 'no configuration file provided' #843 (E2E has never
executed). Governance / Validate Hypatia Baselinered onmainis the pre-existing
estate-wide ci(estate): consumers pinned to stalestandardsreusable SHAs — hypatia-scan (bad actions/cache pin) + governance staleness fail estate-wide #520, unrelated to this.
Activity
fix(security): make the security workflow able to report a bad result (…