Skip to content

supply-chain-firewall CLI never blocks on real input: it reads audit-JSON keys that do not exist #8428

Closed

Description

@squid-protocol

Part of #8427. Source: the security claims audit in #8426 (docs/security_claims_inventory.md, "Most serious problems" #2).

Problem

The standalone supply-chain-firewall CLI (and tool: supply-chain-firewall in the Action) never blocks on real input. It runs the engine, loads the audit JSON, and feeds file entries to run_firewall_audit, which reads keys the audit JSON does not contain.

What the firewall reads Where What the audit JSON has Where
raw_imports gitgalaxy/tools/supply_chain_security/supply_chain_firewall.py:125 "9. Extracted Dependencies" gitgalaxy/recorders/audit_recorder.py:859
risk_vector supply_chain_firewall.py:244 "4. Vulnerability & Risk Exposures" (a dict); risk_vector is popped audit_recorder.py:708-709, :811
telemetry.network_metrics supply_chain_firewall.py:232 not checked in this issue (only used when FIREWALL_NETWORK_WEIGHTING is on) audit_recorder.py:694 reads telemetry

The CLI loads the file at supply_chain_firewall.py:340-358 ("6. Parsed Files (Scanned Artifacts)" -> Files). Result: strict mode with requests blacklisted reports 0 unknown, 0 threats and exits 0 (reproduced in the #8426 audit). Every import check and the secrets-risk gate are silently skipped.

tests/security_auditing/test_supply_chain_firewall.py feeds the old in-memory shape (raw_imports, risk_vector), so it passes. .github/workflows/gitgalaxy.yml:92-96 runs this tool as a pre-gate in this repo's own CI, so that gate has been a no-op. The engine-internal path (galaxyscope.py:2143, run_firewall_audit(repository_graph, ...)) gets the in-memory shape and works.

Class: every consumer of the audit JSON, and which keys it reads

Grep of gitgalaxy/ for Parsed Files, _audit.json and loads of the audit output (re-check at fix time):

Member Reads audit JSON? Keys read Status Evidence
supply_chain_firewall.py CLI main yes, the only one 6. Parsed Files (Scanned Artifacts) -> Files; per file raw_imports, risk_vector, telemetry.network_metrics, path (injected from the dict key) broken: 2 of 3 per-file keys do not exist in the audit supply_chain_firewall.py:125,232,244,340-358
vault_sentinel.py, binary_anomaly_detector.py (X-Ray) no (scan files directly) n/a out of scope: do not load the audit grep found no load
terabyte_log_scanner.py, cobol_to_java/*, cobol_to_cobol/* no (read the IR state / skeleton JSON, a different artifact) n/a out of scope: different file json.loads of ir_state / skeletons
readiness/assess.py, network_auditing/full_api_network_map.py no (options / swagger JSON) n/a out of scope assess.py:138, full_api_network_map.py:180
Engine-internal firewall (galaxyscope.py:2143) no (in-memory graph) raw_imports, risk_vector handled passes the in-memory shape

If the fixer finds another consumer (including tests/ helpers, the Action's tool dispatch, and the docs/ showcase commands), add it here.

Acceptance

  • The CLI reads the real keys, or galaxyscope emits the keys the CLI expects. Pick one and say which in the PR; do not make both shapes work silently.
  • An end-to-end test runs a real scan on a small planted repo, then runs the CLI on the resulting audit JSON, and fails (exit 1) on a blacklisted import. A second case: strict mode with an unapproved import fails; an approved import passes.
  • The existing unit test keeps passing only if it uses the same shape the CLI now reads.
  • The pre-gate at .github/workflows/gitgalaxy.yml:92-96 is checked once the fix lands (it may start failing on real findings; decide whether to keep it required).
  • Docs that claim the firewall blocks (enforce-supply-chain-firewall.md, supply_chain_security/README.md, 04-03) stay accurate; the showcase results (Terraform, tRPC, pwntools) need a re-run or removal (see docs: security claims inventory (112 claims vs code and tests) #8426 section C).

Siblings of the same area: the firewall enforcement gaps issue in this epic (what the firewall reads once this works).

Activity

  1. added
    bug
    appsec
    supply-chain
    priority: high
    on Nov 13, 2026
  2. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-11-18T15:21Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  3. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    Acceptance met: reader fixed (#8595), showcase removed (#8604), inventory and wiki docs retagged (#8618). Remaining gaps live in #8432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appsecbugclaim:nyxpriority: highsupply-chain

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions