dspy

Warn

Audited by Socket on Sep 2, 2026

2 alerts found:

Securityx2
SecurityMEDIUM
references/program-patterns.md

This fragment is primarily LLM orchestration example code (RAG/classification/multi-step reasoning), with the primary security issue being a ReAct-exposed tool that uses Python eval() on untrusted tool input. While there are no clear indicators of credential theft or explicit exfiltration in the snippet, the eval usage creates an arbitrary code execution risk if an attacker can influence—or the model can cause—the expression passed to calculate().

Confidence: 72%Severity: 78%
SecurityMEDIUM
references/agent-patterns.md

The provided module contains a critical security weakness: an agent-registered tool (`calculate`) uses unrestricted `eval(expr)` on an unvalidated string that can be influenced by the agent’s tool-calling behavior. While there is no direct evidence of exfiltration or stealthy malware in the snippet itself, the eval sink makes this code a strong target for malicious exploitation in an agent setting. If used, `eval` should be replaced with a safe expression parser/allowlist and the tool should be tightly constrained to numeric arithmetic.

Confidence: 74%Severity: 78%
Audit Metadata
Analyzed At
Sep 2, 2026, 05:56 PM
Package URL
pkg:socket/skills-sh/magnus919%2Fagent-skills%2Fdspy%2F@9c685d51b516b1bf0f553bfe5fd6b2aead5c0dc2dc803aa4b949a16e69115caf
Security Audit — socket — dspy