Repository navigation
Description
Summary
Follow-up to #1053. That issue wired SignalProcessor._get_context_multipliers into calculate_risk_vector (PR TBD), so ecosystem-mismatch files (e.g. C code embedded in a JS-dominant folder) now get real memory/state_mutation risk penalties. The third key that function returns, injection, was deliberately left unwired in that PR.
Why it's separate
_get_context_multipliers's output shape is {"memory": float, "state_mutation": float, "injection": float}, matching ECOSYSTEM_MISMATCH_WEIGHTS's shape in gitgalaxy/standards/analysis_lens.py. But unlike memory (-> _calc_safety's attack_hits) and state_mutation (-> _calc_state_flux, already consumed via mp_map), there is no injection-risk consumer anywhere in gitgalaxy/metrics/signal_processor.py. Injection-style risk is computed in a completely different module/pipeline stage: gitgalaxy/security/security_auditor.py's taint tracking.
Bundling this into #1053's PR would have meant reaching across modules for a key that currently has no ECOSYSTEM_MISMATCH_WEIGHTS entries defined anyway (systems_in_web only sets memory, web_in_systems only sets state_mutation) -- so there was no concrete penalty value to wire yet, let alone a consumer.
Proposed scope
- Decide whether ecosystem-mismatch injection penalties belong in
security_auditor.py's taint-tracking risk math, or whetherSignalProcessorshould gain its own injection-risk dimension first. - If the former: pass folder/file ecosystem context (or the already-computed multiplier dict) through to wherever
security_auditor.pyscores injection risk, and add real penalty values toECOSYSTEM_MISMATCH_WEIGHTSfor theinjectionkey. - Add a regression test analogous to
test_signal_processor_ecosystem_mismatch_penalizes_safetyintests/core_engine/test_signal_processor.py, but for the injection path. - Per the Differential Scan protocol (CLAUDE.md), verify via
python tests/tools/crucible_check.pyand re-bless golden masters if output changes.
References
- Original issue: [BUG/METRICS] SignalProcessor's ecosystem-context risk multiplier subsystem is dead code #1053
gitgalaxy/metrics/signal_processor.py:_get_context_multipliers,calculate_risk_vectorgitgalaxy/standards/analysis_lens.py:911(ECOSYSTEM_MISMATCH_WEIGHTS)gitgalaxy/security/security_auditor.py(injection/taint tracking)
Activity
Docs testing updates (#1091)
squid-protocol commentedon Sep 16, 2026
Closing as won't-do / obsolete.
First, to correct the premise: taint tracking has not been removed. It is fully live —
security_lens.pystill performs the O(H) data-flow taint tracking and emitstainted_injection, andsecurity_auditor.pystill consumes it assec_tainted_injection/raw_sec_tainted_injection.The real reason to close is #3022 (merged 2026-09-14, "stop overclaiming SQL injection from co-located regexes"), which established the engine's policy that injection is a structural signal, not a scorable verdict:
threat_sql_injection→threat_api_near_db_sinkThis issue's entire proposal is to amplify injection risk with an ecosystem-mismatch multiplier — the exact direction #3022 deliberately retreated from. And as this issue's own body notes, there is still no
injectionpenalty defined inECOSYSTEM_MISMATCH_WEIGHTS(systems_in_websets onlymemory,web_in_systemsonlystate_mutation), so shipping this would mean inventing new penalty values to amplify a signal we just downgraded as low-precision.The now-inert
injectionkey thatSignalProcessor._get_context_multipliersstill returns is tracked for removal in #3099.cleanup(#3099): drop the dead `injection` key from _get_context_multi…