Claude Agent SDK Reference

Warn

Audited by Gen Agent Trust Hub on Aug 24, 2026

Risk Level: MEDIUMCOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The example file examples/custom_tools.py contains a custom tool named calculate that uses the Python eval() function to process arithmetic expressions. Although the implementation attempts to limit risk by passing an empty __builtins__ dictionary and includes a warning comment about the inherent dangers of eval(), this pattern remains risky as it can be bypassed to execute arbitrary code. The skill also explicitly documents and provides examples for using the Bash tool to execute shell commands, which is a core feature of the SDK but presents a broad attack surface if user input is not properly validated via the demonstrated 'hooks' system.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Aug 24, 2026, 10:10 PM