dspy

Warn

Audited by Gen Agent Trust Hub on Sep 4, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DYNAMIC_EXECUTION]: The documentation in references/02-modules.md includes a code example for a calculator tool that uses the eval() function. While it attempts to sandbox the execution by limiting global scope, the use of eval on potentially untrusted input remains a security concern.\n- [DYNAMIC_EXECUTION]: In references/08-deployment.md, the skill describes the use of cloudpickle for serializing and loading compiled program modules. Deserializing data using pickle-based libraries can lead to arbitrary code execution if the serialized file is compromised or obtained from an untrusted source.\n- [DYNAMIC_EXECUTION]: The dspy.ProgramOfThought module, featured in references/02-modules.md, generates and executes Python code at runtime to solve mathematical or symbolic problems. This is a form of dynamic code generation and execution which increases the attack surface.\n- [INDIRECT_PROMPT_INJECTION]: The skill facilitates the creation of pipelines that ingest data from external retrievers, creating a surface for indirect prompt injection.\n
  • Ingestion points: External data enters through dspy.Retrieve calls and signature InputFields in references/06-rag-retrieval.md.\n
  • Boundary markers: The examples do not explicitly demonstrate the use of delimiters or 'ignore' instructions for retrieved content.\n
  • Capability inventory: The skill supports tool execution (ReAct), runtime code generation (ProgramOfThought), and file system writes (save()).\n
  • Sanitization: No explicit sanitization or filtering of external retrieved passages is shown in the provided documentation snippets.\n- [EXTERNAL_DOWNLOADS]: The scripts/check-updates.py script performs network requests to pypi.org to check for library updates. This is a legitimate maintenance function targeting a whitelisted package registry domain.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 4, 2026, 10:30 AM
Security Audit — agent-trust-hub — dspy