AAK-TASKS-003: MCP task has no TTL or cancellation path
- Severity
- MEDIUM
- Category
- MCP Configuration (
mcp-config) - Scanner
agent_audit_kit/scanners/mcp_tasks.py- Auto-fixable
- No.
- SARIF name
TasksNoTtl
What it detects
A task record has no expiration and no cancellation endpoint. Orphaned tasks accumulate forever, including their inputs.
How to fix
Set a TTL on every task; expose a cancellation endpoint that zeroizes inputs and credentials.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-TASKS-003
Limitations
Fires on a task class or store with no ttl, expires_at, expiry or deadline assignment and no def cancel_*, abort_* or terminate_* in the file. Any such assignment counts, whatever it applies to: a ttl=60 on an unrelated cache call clears it.
References
- OWASP MCP Top 10: MCP10:2025 (Context Injection & Over-Sharing)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-TASKS-03
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-TASKS-003.md: the page then shows that text, with the registry reference appended under it.