Repository navigation
fix(supply-chain-firewall): CLI reads the audit JSON's real keys (Part of #8428) - #8595
Merged
Merged
Conversation
…t of #8428) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8428 (security epic #8427).
What / design decision
The standalone
supply-chain-firewallCLI readraw_importsandrisk_vectorfrom audit-JSON file entries, but the audit JSON has neither (it has"9. Extracted Dependencies"and"4. Vulnerability & Risk Exposures"as{display label: "N%"}). Chosen option: the CLI reads the real audit keys (_audit_file_to_nodeinsupply_chain_firewall.pytranslates an entry to the in-memory noderun_firewall_audittakes).galaxyscopeoutput is unchanged and the CLI no longer accepts the old shape. The risk labels come from the same derivationAuditRecorderuses.Tests (real code)
galaxyscopescan of a planted repo, thenmain()on the resulting*_audit.json: blacklistedrequestsexits 1; strict mode with an unapproved import exits 1, with all imports approved exits 0.[UNSCANNED - NO DATA]).test_supply_chain_firewall.pynow feed the audit shape (they fed the old shape, which is why they passed while the CLI was a no-op).Pre-gate
.github/workflows/gitgalaxy.ymlpre-gate, run locally on this repo after the fix: 2,525 files, 16,111 imports seen (was 0), no threats, exit 0. Keep it required.Gates
audit_check.pyall clear; ruff format/check on changed files clean; test file ~10 s per test on a loaded box (the real scan is a module fixture).Class / Sibling gaps
Class: consumers of the audit JSON. The CLI
mainwas the only one (the issue's table re-checked: vault_sentinel, X-Ray, terabyte_log_scanner, cobol tools, readiness do not load the audit; the engine-internal path uses the in-memory shape). Handled: CLI.Sibling gaps: (1)
telemetry.network_metricsforFIREWALL_NETWORK_WEIGHTINGis still not read from the audit JSON (opt-in, off by default; needs a check of what the audit emits); (2) docs showcase results (Terraform, tRPC, pwntools) need re-run or removal; docs claims (enforce-supply-chain-firewall.md,supply_chain_security/README.md, 04-03) need re-verify. Neither fits this slice's mechanism.Remaining slices
Docs re-verify plus showcase re-run (docs only, per #8426 section C); network_metrics weighting from the audit.
🤖 Generated with Claude Code