Skip to content

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


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.