Repository navigation
Description
Part of #8427. Source: the security claims audit in #8426 (docs/security_claims_inventory.md, "Most serious problems" #5).
Problem
"Shadow patch detection" detects nothing.
--shadow-patch-detected(gitgalaxy/galaxyscope.py:4318, configSHADOW_PATCH_DETECTEDat:4650, read at:2099) is a manual boolean. No hash or version is compared anywhere.- The alert text in
gitgalaxy/security/security_auditor.py:191-198says "Hash mutated without version bump!" as if a comparison had been made. - It labels every file with
file_impact > 0.5a "Stealer / Trojan" withml_score = 100.0once the flag is set, whether or not the file changed. - It is unreachable: it sits after
if not self.model: return artifacts(security_auditor.py:146), and no model ships (see the classifier issue in this epic).
Docs claiming it: gitgalaxy/security/README.md:23,53, 02-20:21, CLI reference line 83.
Class: the shadow-patch path
| Member | Status | Evidence |
|---|---|---|
CLI flag --shadow-patch-detected |
partial: manual, no detection | galaxyscope.py:4318,4459,4650 |
Orchestrator pass-through is_shadow_patch |
handled (plumbing only) | galaxyscope.py:2099-2101 |
Override block (file_impact > 0.5 => class 2) |
wrong: labels by impact, not by change; message misdescribes it | security_auditor.py:186-198 |
Reachability (if not self.model: return) |
missing: cannot run without a model | security_auditor.py:146 |
| Hash / version comparison (the claimed detection) | missing | no code |
| Tests | to check: mock-only or none | tests/security_auditing/test_security_auditor.py |
| Docs (README:23,53, 02-20:21, CLI ref:83) | false | #8426 section A |
Acceptance (one of two)
A. Implement real detection independent of the model: compare each file's content hash against the previous scan (or a given base ref) and the declared package version in its manifest; flag a changed hash with an unchanged version. Emit it as its own signal/column, not as an ML class override. Tests: a planted hash change without a version bump flags; a hash change with a bump does not; an unchanged file never flags (this last is the case the current code gets wrong).
B. Remove the flag, the override block and the doc claims.
If the flag is kept as a manual hint, the alert text and docs must say "manually asserted", and it must not assign a class.
Activity
docs(security): stop describing the ML malware classifier as working;…
tests: real-model shadow-patch test compares against the flag-less ou…
tests: regenerate docs_read_by_tests.txt (Part of #8431)
tests: policy-gate fixture trips secrets_risk, not a secret-named key…
tests: re-bless doom-ascii golden for main's Python exec rules (#8614)…
fix(security): shadow-patch flag is a manual hint, assigns no class (…
squid-protocol commentedon Nov 18, 2026
Churn run
8431-20261118T1855Z(host nyx) ended without a PR. PR #8611 already merged; no further changes. Docs slice and main CI check left to followup.docs: shadow-patch flag is a manual hint (Part of #8431) (#8627)
squid-protocol commentedon Nov 18, 2026
Owner decision 2026-11-18: PR #8629 (opt-in
--shadow-patch-base) is the last shadow-patch change. After it merges, close this issue and freeze the feature: its listed Remaining slices (DB column + recorders + golden re-bless, stored-hash comparison, more manifest kinds) are declined, not queued. Reason: shadow patching targets package ecosystems (npm/PyPI/crates), not the offline mainframe estates GitGalaxy focuses on (see the feature review on #8427). If #8629's CI fix fails again, close it unmerged instead.docs: document --shadow-patch-base in the CLI reference (Part of #8431)
feat(security): real shadow-patch detection against a base ref (Part of
squid-protocol commentedon Nov 18, 2026
Churn run
8431-20261118T2104Z(host nyx) ended without a PR. worker stopped: owner froze shadow-patch (#8431) after #8629; needs owner to close #8431/release claimsquid-protocol commentedon Nov 18, 2026
Closed per the owner decision above: #8611 and #8627 made the manual flag honest, and #8629 (merged) added the opt-in
--shadow-patch-basecheck as the final change. The feature is frozen; the remaining slices listed in #8629 are declined.