Repository navigation
Description
Description
Epic #1025's issue #1020 (closed via PR #1038) removed prompt_injection, agentic_rce, injection_surface, obscured_payload, and memory_corruption from RISK_SCHEMA/SIGNAL_SCHEMA because they were "hallucinated" findings: the engine flagged a file as an AI exploit surface just because two unrelated regex categories (e.g. an LLM API import and a subprocess call) fired anywhere in the same file, with zero proof the data actually flows between them — something an AST-free, taint-tracking-free engine cannot structurally prove.
gitgalaxy/tools/ai_guardrails/ai_appsec_sensor.py (AIAppSecSensor.hunt_threats) has the identical logic pattern and was missed by #1020/#1038's blast-radius sweep, because it never touches RISK_SCHEMA/SIGNAL_SCHEMA at all — it writes straight to telemetry["ai_appsec"] instead, so grepping for the removed schema field names didn't surface it.
Why they are broken (same root cause as #1020)
Two of the sensor's three checks (lines ~57-108 as of this writing):
is_rce_funnel/ "Autonomous Execution Vector":(ai_orchestrator or llm_api) and arch_api and sec_danger— flags a file just because an LLM-related regex, a public-API regex, and aneval/subprocessregex all fired somewhere in the file. Message text: "CRITICAL... Immediate Prompt Injection -> Autonomous Execution vulnerability." This isagentic_rcereborn under a new name.agentic_exfiltration_risk:llm_api and arch_io and sec_secrets— same co-occurrence-without-dataflow shape as the removedinjection_surface. Message text: "CRITICAL... High risk of SSRF and key exfiltration via prompt injection."
These are arguably worse than what #1020 already removed: they're surfaced by gitgalaxy/recorders/sarif_recorder.py (~line 122-133) as ruleId: GG-AGENT-VULNERABILITY at level: "error" — SARIF's error level is what GitHub code scanning and most CI gates treat as a confirmed, blocking finding, so the overclaim now has more real-world consequence than the fields already removed.
The third check, over_permissioned_agent (ai_orchestrator and arch_io and safety_density < 0.5), should NOT be removed — it was deliberately revived in #365 using ai_orchestrator (a library-import signal, i.e. detecting framework identity) rather than a behavioral claim, which the inline code comments argue is exactly the kind of signal this regex-only engine CAN honestly detect. Keep it as the precedent for what a legitimate check in this file looks like.
Action items
- Remove
is_rce_funnelandagentic_exfiltration_risk(and their twocritical_warningsmessages) fromgitgalaxy/tools/ai_guardrails/ai_appsec_sensor.py'shunt_threats(), keepingover_permissioned_agent. - Update
gitgalaxy/recorders/sarif_recorder.py(~line 122-133) andgitgalaxy/recorders/record_keeper.py(~line 554-556, therce_funnel/exfiltrationSQLite columns) to match — check schema/column-list/VALUES-placeholder parity per the recurring bug class noted in Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory) #1020's own postmortem. - Update
gitgalaxy/tools/ai_guardrails/README.md(the "Autonomous Execution Vector" and "Agentic Exfiltration Vector" bullets under "Side 1: The AI AppSec Sensor") anddocs/wiki/02-17-ai-appsec-sensor.mdto drop the removed claims. - Update/remove affected cases in
tests/security_auditing/test_ai_appsec_sensor.py. - Check
docs/gitgalaxy_architecture_brief.mdfor stale prose referencing these two claims (auto-regenerated, but confirm no hand-maintained doc references them elsewhere). - Note in the PR whether
sarif_recorder.py/record_keeper.pyoutput touches golden-master fixtures (tests/golden_master_audit.jsonetc.) — if so this needscrucible_check.py+ re-blessing per the Differential Scan protocol, same as Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory) #1020 needed despite being "downstream-only."
References
- Related epic: Epic: Remove overreaching AST-less heuristic metrics (post-db_complexity wave) #1025 (Overreaching Metrics Epic)
- Related closed issue: Remove AST-dependent Security & Vulnerability metrics (Injection, RCE, Memory) #1020 (Remove AST-dependent Security & Vulnerability metrics)
- Related closed PR: Remove AST-dependent Security & Vulnerability metrics (#1020) #1038 (Remove AST-dependent Security & Vulnerability metrics)
Activity
docs: tone/accuracy pass across every README, plus writing-guide skil…
ci: add workflow_dispatch to gitgalaxy.yml and muninn.yml (#1109)
README refresh: COBOL-to-Java with proof; stale counts, tools and lin…