dspy
Warn
Audited by Gen Agent Trust Hub on Sep 9, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [DYNAMIC_EXECUTION]: The skill features the
dspy.ProgramOfThoughtmodule, which is designed to generate and execute Python code at runtime to solve reasoning and mathematical tasks. This is a core capability of the framework but constitutes a dynamic execution risk if the generated code is influenced by untrusted input. - Evidence: Found in
SKILL.mdandreferences/modules.mddescribing the generation and execution of Python code for calculations. - [DYNAMIC_EXECUTION]: A code example for a calculation tool utilizes the
eval()function to process mathematical expressions. Although it attempts to limit the execution environment by restricting builtins,eval()remains a high-risk pattern for code injection. - Evidence:
references/examples.mdcontains acalculatefunction usingeval(expression, {"__builtins__": {}}, {}). - [INDIRECT_PROMPT_INJECTION]: The skill architecture heavily features RAG (Retrieval-Augmented Generation) and multi-agent workflows, which are susceptible to indirect prompt injection if untrusted data retrieved from external sources contains malicious instructions.
- Ingestion points: External data is ingested via
dspy.RetrieveinSKILL.mdandreferences/examples.md. - Boundary markers: Signatures in
SKILL.mddefine structured inputs but do not include explicit security delimiters to prevent instruction override. - Capability inventory: The skill includes tools for code execution (
ProgramOfThought) and tool usage (ReAct) across multiple files. - Sanitization: The examples show basic usage of restricted
eval()but lack comprehensive input validation for LLM-generated code blocks. - [EXTERNAL_DOWNLOADS]: The documentation provides instructions to install the framework directly from a public Git repository, which involves downloading external code.
- Evidence:
SKILL.mdincludes the installation commandpip install git+https://github.com/stanfordnlp/dspy.git.
Audit Metadata