You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG/APPSEC] AIAppSecSensor's "Over-Permissioned Agent" rule can never fire -- reads dead "ai_tools" key #365
appsecAgentic guardrails, prompt injection, and RCE sensorsbugUnintended behavior or logic failure in the enginepriority: highCore feature broken, but workarounds exist
Found by the dead key auditor (#325). gitgalaxy/tools/ai_guardrails/ai_appsec_sensor.py:41:
ai_tools=equations.get("ai_tools", 0) >0
"ai_tools" was removed from SIGNAL_SCHEMA entirely per #323 (confirmed via a comment already in signal_processor.py: "ai_tools removed from this check (#323) -- it was removed from SIGNAL_SCHEMA entirely, so raw_signals never carries that key."), but ai_appsec_sensor.py was never updated. raw_signals/equations never carries this key, so ai_tools is always False.
The entire "Over-Permissioned Agent Binding" rule -- one of AIAppSecSensor's three guardrails (AI Agent Tools + State Mutation/DB write + low defensive safety) -- can never trigger for any file, regardless of how genuinely over-permissioned an AI tool binding is. This is likely the "AIAppSecSensor... companion issue" #325 itself references as already found but not yet filed.
🎯 Objective
Restore a real, working signal for "this code binds an AI agent to tools with write access," so the Over-Permissioned Agent Binding guardrail can fire again.
🛠️ Proposed Implementation
Either reintroduce a scoped ai_tools-equivalent signal (if #323's removal was itself a mistake), or repoint this check at whatever signal did replace it post-#323 (e.g. llm_orchestrator/llm_api, which are already used for the other two AIAppSecSensor rules).
✅ Acceptance Criteria
over_permissioned_agent can be proven True by a real test fixture, not just a mocked equations dict.
The chosen replacement signal is actually populated by SIGNAL_SCHEMA/detector.py today (verified, not assumed).
appsecAgentic guardrails, prompt injection, and RCE sensorsbugUnintended behavior or logic failure in the enginepriority: highCore feature broken, but workarounds exist
Activity
Revive AIAppSecSensor's Over-Permissioned Agent rule with a real sign…