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.py uses importlib.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.py generates 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.py and assets/examples/human-loop-example/python/graph.py establish 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: The agent node reads the untrusted error strings from the state to determine routing logic via Command objects. Sanitization: No filtering or escaping is applied to the exception strings before they are added to the conversation state.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 7, 2026, 02:32 PM