Skip to content

security: firewall enforces manifest flags, package.json hooks, anchored test-path skip (Part of #8432) - #8602

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/8432-20261118T1237Z
Nov 18, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/8432-20261118T1237Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Part of #8432 (security epic #8427).

The supply-chain firewall now enforces three of the gaps the audit named; the rest are documented as not enforced.

Changes

  • supply_chain_firewall.py: new manifest_flag_findings(). run_firewall_audit reads the manifest parser's INSECURE_REGISTRY_* flags, direct file/git/http references and the new INSTALL_HOOK_* flags as threats (strict and audit mode alike; ALLOWLIST_PATHS on the manifest directory excuses them like any threat).
  • package.json is exempt from the inert .json shield, so the existing 10x build-time multiplier now applies to it.
  • The test-path skip is anchored: only a directory component named test/tests skips a file. The filename no longer does, so src/helper_test.py is gated.
  • manifest_parser.py: package.json preinstall/install/postinstall/prepare scripts that run curl/wget/eval or pipe to a shell are flagged. "build": "tsc" and node-gyp rebuild are not.
  • README rows updated to say what is enforced and what is not.
  • Tests (test_supply_chain_firewall.py): planted http registry, ngrok, git/file refs and a curl | sh postinstall, with near-misses; allowlist; package.json multiplier vs. a plain .json; a parametrized test-path table, each case also run through run_firewall_audit.

Class / Sibling gaps

Class: every gap between the firewall's documented scope and its code (#8432 table).
Handled here: manifest flags (enforced), package.json lifecycle hooks (enforced via the parser flag plus the multiplier), test-path skip (anchored), node_modules/venv and the secrets-only gate (docs already state both; nothing to change).
Sibling gaps

  • Standalone CLI supply_chain_firewall.py <results.json> still passes alias_map={}, so it enforces none of the manifest flags: the separate CLI issue in Epic: Security claims vs evidence (from #8426) #8427.
  • https:// tarball dependency references are not flagged (a lockfile with an internal https mirror would false-positive); needs a source-aware flag from the parser.
  • node_modules/venv opt-in scan mode: not built; docs say the firewall gates only the repo's own files.
  • Behavioural gate is still secrets_risk only; network/I/O/typosquat/homoglyph inputs not added.
  • Files under a tests/ directory remain skipped (disclosed in the README).

Gates

  • pytest tests/security_auditing/test_supply_chain_firewall.py tests/core_engine/test_manifest_parser.py: 54 passed.
  • pr_gates.py --fast: 8/9 on the first run (the affected gate passed); the one lint finding (RUF021) is fixed, ruff_audit.py --ci is clean.

🤖 Generated with Claude Code

Golden re-bless

Both golden masters moved only in ecosystem_audits (firewall threats_found 1 -> 3, threats_allowed 2 -> 3, plus the GPU JSON hash of it). Cause: the firewall no longer skips a file by its name, so create_secret_tls_test.go and http_token_authentication_test.rb (outside any test/ dir) are now gated. Blessed via golden-lock.sh crucible_check.py --update --yes.

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 18, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 18, 2026 13:00
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 18, 2026 13:01
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 18, 2026 13:10
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #8602 @ 60655d0: 2 failed check(s)

== crucible-audit (full-precision) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44309436306/job/134819422810
repro: tests/tools/box/golden-lock.sh python tests/tools/pr_gates.py --only golden
failing tests: tests/test_golden_crucible.py::test_golden_crucible_matches_baseline
errors:
FAILED tests/test_golden_crucible.py::test_golden_crucible_matches_baseline - Failed: Structural drift detected against golden_master_audit (3 differences):
##[error]Process completed with exit code 1.
log tail:
│   ├── gitgalaxy
│   ├── github-action-readme.md
│   ├── mkdocs.yml
│   ├── muninn.yml
│   ├── pyproject.toml
│   ├── scripts
│   ├── site
│   ├── templates
│   ├── tests
│   └── zizmor.yml
└── language-crucible
├── AGENTS.md
├── ANTIGRAVITY.md
├── CLAUDE.md
├── LICENSE
├── NOTICE
├── README.md
├── RELEASING.md
├── SECURITY.md
├── SOURCES.md
├── data
├── raw_output
└── tools
14 directories, 25 files
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/39516fa0-f5af-4e59-b2d5-4151e3d23342' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== crucible-audit (zero-dependency) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44309436306/job/134819423474
repro: tests/tools/box/golden-lock.sh python tests/tools/pr_gates.py --only golden
failing tests: tests/test_golden_crucible.py::test_golden_crucible_matches_baseline
errors:
2026-11-18 13:01:30,851 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
FAILED tests/test_golden_crucible.py::test_golden_crucible_matches_baseline - Failed: Structural drift detected against golden_master_zero_dep_audit (3 differences):
##[error]Process completed with exit code 1.
log tail:
│   ├── gitgalaxy
│   ├── github-action-readme.md
│   ├── mkdocs.yml
│   ├── muninn.yml
│   ├── pyproject.toml
│   ├── scripts
│   ├── site
│   ├── templates
│   ├── tests
│   └── zizmor.yml
└── language-crucible
├── AGENTS.md
├── ANTIGRAVITY.md
├── CLAUDE.md
├── LICENSE
├── NOTICE
├── README.md
├── RELEASING.md
├── SECURITY.md
├── SOURCES.md
├── data
├── raw_output
└── tools
14 directories, 25 files
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/0cddb88d-ac3b-4812-a344-08b59114a142' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 18, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 18, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 18, 2026 13:42
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 18, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 0804f9f into main Nov 18, 2026
60 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8432-20261118T1237Z branch November 18, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant