Repository navigation
fix(ci): pin the bridge-gate scanner and make the B1 verdict require a queried feed - #488
Conversation
bridge-gate.yml cloned panic-attack with --depth 1 and built whatever was on its main at run time. The same commit could pass or fail by the time of the run, and a change in panic-attack ran in this CI without review here (CWE-829). Build at the commit that static-analysis-gate.yml pins in PANIC_ATTACK_REF. This job reads that value with yq, so the pin has one owner and the two workflows cannot use different scanners. A missing or floating value builds nothing and exits 2. The build is the one the Static Analysis Gate uses: cargo install --git --rev --locked, a check that .crates.toml names that revision, and a build receipt with the binary digest. No uses: reference changes, so actions.lock is unchanged. Refs #481 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6 Signed-off-by: Claude <noreply@anthropic.com>
Two defects in the bridge-gate B1 step. It trusted any report. Patch Bridge schema 0.3.0 adds vulnerability_data: a report with "offline-unavailable" or "no-dependencies" has an empty CVE list because no feed was read. B1 read that as zero CVEs and passed. It could never fail. The step selected classification "Unmitigable" and reachability status "Reachable". The scanner at the pinned commit writes "unmitigable" and "reachable" (serde lowercase and kebab-case), so the filter matched nothing and B1 passed for every report. Move the verdict into scripts/ci/static-analysis-evidence.sh as bridge-b1, next to the adapter that the Static Analysis Gate uses: - the triage step now runs the adapter, which checks the binary against its build receipt and qualifies only a complete 0.3.0 report whose vulnerability_data is "queried"; - bridge-b1 exits 2 when the receipt is not a qualified Patch Bridge receipt, and also when a CVE has a reachability status outside the four known values, so a renamed value cannot pass in silence; - it exits 1 for a reachable unmitigable CVE, with the real values. Controls in scripts/ci/test-static-analysis-evidence.sh, which the Static Analysis Gate runs on every pull request: 36 before, 59 now. The 36 earlier controls pass unchanged against the new script. Three mutants fail the controls: the old capitalised values, no refusal of an unknown status, and no qualified-receipt requirement. bridge-gate.yml runs only on dependabot/ and renovate/ branches, so this pull request does not execute the job itself. Refs #481 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6 Signed-off-by: Claude <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
|
Two checks fail here, and both fail on 1.
|
SonarCloud reported shell:S7679 three times on bridge_report in scripts/ci/test-static-analysis-evidence.sh: the helper used $1, $2 and $3 directly. Assign them to local names. No behaviour change: the 59 controls pass. Refs #481 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6 Signed-off-by: Claude <noreply@anthropic.com>
|



Summary
Closes #481.
bridge-gate.ymlbuilt panic-attack from its movingmain(CWE-829), and its B1 verdict trusted any report. This pull request pins the scanner and makes B1 refuse a report whose feed was not queried.It also repairs a defect that the issue does not name: B1 could never fail. The step selected
"Unmitigable"and"Reachable". The scanner at the pinned commit writes"unmitigable"and"reachable", so the filter matched nothing and B1 passed for every report.The two commits are separate reviews: the pin first, then the verdict.
Changes
static-analysis-gate.ymlpins inPANIC_ATTACK_REF.yq, so the pin has one owner and the two workflows cannot use different scanners.cargo install --git --rev --locked, a check that.crates.tomlnames that revision, and a build receipt with the binary digest.scripts/ci/static-analysis-evidence.shasbridge-b1.vulnerability_dataisqueried.bridge-b1exits 2 when the receipt is not a qualified Patch Bridge receipt.uses:reference changes, soactions.lockis unchanged.RSR Quality Checklist
Required
just testor equivalent). Equivalent here:bash scripts/ci/test-static-analysis-evidence.sh, 59 controls.just testwas not run; no Rust source changes.just fmtor equivalent). Not run: the change is shell and workflow YAML only.bash -npasses for both scripts.unsafeblocks without// SAFETY:comments (no Rust changes)believe_me,unsafeCoerce,Obj.magic,Admitted,sorry).envfiles includedAs Applicable
*_chora.deed)(status)/(maturity)updated (if project state changed)(ecosystem)updated (if integrations changed)(meta)and/ordocs/decisions/updated (if architectural decisions changed)docs/status/ROADMAP.adocupdated (if milestones or next actions changed)TOPOLOGY.mdupdated (if architecture changed)CHANGELOGor release notes updatedsrc/abi/andffi/zig/consistent)None of these applies: the change is confined to one CI gate and its script.
Testing
Controls.
scripts/ci/test-static-analysis-evidence.shruns on every pull request in the Static Analysis Gate.offline-unavailableorno-dependenciesgives exit 2. A receipt edited to carry an unqueried report gives exit 2. The old spellingReachablegives exit 2.bridge-b1each fail the controls: the old capitalised values, no refusal of an unknown status, and no qualified-receipt requirement.Real scanner, local. I extracted the three changed steps from the workflow file and ran them on this tree (x86_64 Linux, cargo 1.99.0).
f2a6a70.crates.tomlnames the revision. Binary digestdb940771....vulnerability_data: queried, 501 dependencies, 1 informational CVE (phantom-transitive).bridge-b1Real scanner, forced offline (control). The same binary with
--offlinewritesvulnerability_data: offline-unavailableand 0 CVEs. The adapter exits 2 andbridge-b1exits 2. The earlier B1 step counts 0 blockers for that report and prints PASS.Not run on GitHub.
bridge-gate.ymlruns only ondependabot/andrenovate/branches, so this pull request does not execute the job. The next dependency pull request is the first hosted run.Screenshots
Not applicable.
Generated by Claude Code