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.pycontains a custom tool namedcalculatethat uses the Pythoneval()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 ofeval(), this pattern remains risky as it can be bypassed to execute arbitrary code. The skill also explicitly documents and provides examples for using theBashtool 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