dspy
Warn
Audited by Gen Agent Trust Hub on Nov 8, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill documents the use of
dspy.ProgramOfThought, which is designed to generate and execute Python code at runtime to perform calculations and data transformations. While a core feature of the library, executing code generated by a language model based on user input carries inherent risks of arbitrary code execution if the model is manipulated. - [INDIRECT_PROMPT_INJECTION]: The skill patterns for RAG (Retrieval-Augmented Generation) and agent-based reasoning (e.g.,
ReAct) involve ingesting data from untrusted external sources like Wikipedia, web searches, or document databases. These inputs are interpolated into prompts, creating a surface for indirect prompt injection where malicious instructions in the retrieved data could influence agent behavior. - Ingestion points: Data enters the context via
dspy.Retrieveand tool outputs in theReActandMulti-Hop RAGmodules. - Boundary markers: The provided code snippets do not explicitly show the use of XML tags or other delimiters to isolate untrusted context from instructions.
- Capability inventory: The documented modules have capabilities including file system writes (
save/loadmethods), tool execution (Wikipedia/Web search), and dynamic Python execution viaProgramOfThought. - Sanitization: No explicit sanitization or validation of retrieved context is described before interpolation into the prompt.
- [EXTERNAL_DOWNLOADS]: The documentation includes instructions to install the DSPy library directly from its official development repository on GitHub (
stanfordnlp/dspy). - [COMMAND_EXECUTION]: The skill provides standard installation commands using
pipto set up the environment and its dependencies.
Audit Metadata