AAK-TAINT-007: Tool function missing input validation
- Severity
- MEDIUM
- Category
- Taint Analysis (
taint-analysis) - Scanner
agent_audit_kit/scanners/taint_analysis.py- Auto-fixable
- No.
- SARIF name
TaintMissingValidation
What it detects
A @tool function has no type hints or input validation on its parameters.
How to fix
Add type hints and input validation to all tool function parameters.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-TAINT-007
Limitations
Only functions decorated @tool, @mcp.tool, @server.tool, @langchain.tools.tool, @crewai.tool or @autogen.tool are analysed, so a FastMCP instance under another name (@app.tool()) is skipped. A tool counts as typed once any one parameter carries an annotation: def search(query: str, limit, path) is not reported, however many parameters have none.
References
- OWASP MCP Top 10: MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-VALID-01 (Missing Input Validation)
- CSA AI Controls Matrix (AICM): AIS-07
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-TAINT-007.md: the page then shows that text, with the registry reference appended under it.