AAK-ROUTINE-001: Routine grants broader permissions than interactive path
- Severity
- HIGH
- Category
- Agent Config (
agent-config) - Scanner
agent_audit_kit/scanners/routines.py- Auto-fixable
- No.
- SARIF name
RoutineWiderPerms
What it detects
A routine configuration declares tool permissions wider than what the same user has in interactive Claude Code. A routine running non-interactively at 3am with admin-level tools is an excessive-agency risk (OWASP ASI02 over-privileged tool access, with no human to notice).
How to fix
Mirror routine permissions from the interactive grant. Require re-prompt for elevation.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-ROUTINE-001
Limitations
Reads the permissions (or tools) list of a file in .claude/routines/ and reports an entry only when it is exactly fs:*, shell:exec, network:*, credentials:*, env:* or *:*. Other spellings of the same breadth (shell:*, Bash(*), *) are not reported, and neither is a permissions block written as a mapping (allow: [...]). A routine file over 1 MB is not read.
References
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI10 (Rogue Agents)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AGENCY-01
- CSA AI Controls Matrix (AICM): IAM-02
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-ROUTINE-001.md: the page then shows that text, with the registry reference appended under it.