Skip to content

AAK-AGENT-003: Agent instructions override security controls

Severity
HIGH
Category
Agent Config (agent-config)
Scanner
agent_audit_kit/scanners/agent_config.py
Auto-fixable
No.
SARIF name
AgentSecurityOverride

What it detects

Agent instructions tell the agent to get past a named security control ("bypass the pre-commit hooks", "skip verification", "disable auth", "allow all commands", PowerShell's -ExecutionPolicy Bypass), or carry a prompt-injection phrase ("ignore previous instructions", "you are now", "new system prompt").

Until 0.6.15 this rule matched the bare word "bypass" anywhere. On the 909 public repositories of the #771 corpus it fired on 127, nearly always on a guardrail ("Never bypass the pre-push hooks"), a description of code ("Pairing bypasses the owner check") or a noun ("auth bypass" in a review checklist). It reports the instruction now (#869).

How to fix

Remove security override instructions. Agents should respect default security controls.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-AGENT-003

Limitations

An override counts where an instruction starts (a list item, a new sentence, after "always" or "must", after "you may" or "free to", or as the purpose of "use X to ...") with a named control as its object, unless a guardrail forbids it, in the sentence or under a heading or lead-in such as "### NEVER". A description of what code does, a quoted setting name, and a line that continues the previous sentence are not instructions. The prompt-injection phrases are reported anywhere. Agent permission flags (--dangerously-skip-permissions, bypassPermissions) in CI workflows and settings files are AAK-AGENT-TRUST-001 and AAK-AGENT-TRUST-003, not this rule.

References

  • OWASP Agentic Top 10: ASI01 (Agent Goal Hijack)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-HIJACK-03 (Agent Security Override)

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-AGENT-003.md: the page then shows that text, with the registry reference appended under it.