Skip to content

--shadow-patch-detected compares no hash or version, mislabels files as Trojans, and is unreachable #8431

Closed

Description

@squid-protocol

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, config SHADOW_PATCH_DETECTED at :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-198 says "Hash mutated without version bump!" as if a comparison had been made.
  • It labels every file with file_impact > 0.5 a "Stealer / Trojan" with ml_score = 100.0 once 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

  1. added
    bug
    ml-ops
    appsec
    on Nov 13, 2026
  2. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    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.

  3. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    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.

  4. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    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 claim

  5. squid-protocol commented on Nov 18, 2026

    @squid-protocol
    OwnerAuthor

    Closed per the owner decision above: #8611 and #8627 made the manual flag honest, and #8629 (merged) added the opt-in --shadow-patch-base check as the final change. The feature is frozen; the remaining slices listed in #8629 are declined.

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

    appsecbugml-opspriority: medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions