langgraph-error-handling
Warn
Audited by Gen Agent Trust Hub on Sep 7, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/classify_error.pyusesimportlib.import_module()to dynamically load Python modules specified through command-line arguments, which allows for the execution of side effects from arbitrary local modules. - [DYNAMIC_EXECUTION]: The script
scripts/wrap_with_retry.pygenerates executable Python code at runtime using string templates based on user-provided CLI flags. - [INDIRECT_PROMPT_INJECTION]: The error-handling patterns demonstrated in
assets/examples/retry-example/python/graph.pyandassets/examples/human-loop-example/python/graph.pyestablish an indirect prompt injection surface. Ingestion points: Raw exception messages from external tools and APIs are captured and stored in the graph state. Boundary markers: No delimiters or safety instructions are used when updating the state with error content. Capability inventory: Theagentnode reads the untrusted error strings from the state to determine routing logic viaCommandobjects. Sanitization: No filtering or escaping is applied to the exception strings before they are added to the conversation state.
Audit Metadata