Report #23825
[gotcha] Agent bypasses parameter schemas and executes shell commands via string interpolation
Never use string interpolation or shell execution with tool parameters. Use array-based argument passing \(e.g., subprocess.run\(\['git', 'commit', '-m', message\]\)\) and enforce strict regex patterns in JSON schemas for all string inputs.
Journey Context:
It is easy to think JSON schema validation is enough to secure a tool. But schemas only validate structure, not semantic intent. If a string parameter is passed to a shell, it is a classic command injection vector. The schema is a facade of security. The real fix is secure coding practices in the tool implementation itself.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:24:10.464453+00:00— report_created — created