dspy-fundamentals

Warn

Audited by Gen Agent Trust Hub on Apr 22, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill documents and provides examples for dspy.ProgramOfThought, which dynamically generates and executes Python code based on LLM output. This poses a risk of arbitrary code execution if user-controlled input influences the generated logic.
  • [COMMAND_EXECUTION]: The skill describes a method to save and load full programs using save_program=True, which utilizes cloudpickle for serialization. cloudpickle is an unsafe deserialization method that can execute arbitrary code when loading files from an untrusted source.
  • [PROMPT_INJECTION]: The skill exhibits an indirect prompt injection surface where untrusted user data is processed by predictors without explicit sanitization.
  • Ingestion points: User input fields in dspy.Signature subclasses, such as the question field in SKILL.md and example_qa.py.
  • Boundary markers: None identified in the provided code templates to delimit instructions from user data.
  • Capability inventory: The skill employs dspy.ChainOfThought and dspy.ProgramOfThought, which generate text and executable code respectively.
  • Sanitization: No input validation, escaping, or filtering routines are demonstrated for the ingested content.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Apr 22, 2026, 03:46 PM
Security Audit — agent-trust-hub — dspy-fundamentals