sympy

Warn

Audited by Gen Agent Trust Hub on Sep 20, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The skill documents and provides examples for various runtime code generation and execution techniques:
  • The lambdify function is used to transform symbolic expressions into executable Python functions compatible with NumPy or SciPy.
  • autowrap and ufuncify are documented to compile mathematical expressions into machine code at runtime using Cython or f2py backends.
  • The parse_expr utility converts strings into executable SymPy objects, which the documentation acknowledges as a potential injection vector.
  • pickle.load() is demonstrated as a method for restoring saved expressions, which constitutes an unsafe deserialization pattern if the source file is not trusted.
  • [INDIRECT_PROMPT_INJECTION]: The skill exposes a significant surface for indirect prompt injection via its parsing and execution engines.
  • Ingestion points: Expressions are ingested as strings via parse_expr, parse_latex, and parse_mathematica (found in references/code-generation-printing.md).
  • Boundary markers: The skill does not implement delimiters or safety instructions within its prompt-building logic to isolate untrusted mathematical strings.
  • Capability inventory: The agent can perform file writes (codegen), runtime compilation (autowrap), and dynamic execution (lambdify).
  • Sanitization: While the documentation warns the user to sanitize inputs, no specific sanitization logic is provided in the skill's reference files.
  • [COMMAND_EXECUTION]: The runtime compilation features (autowrap) trigger shell commands to invoke compilers like GCC or GFortran. The skill also documents the ability to write generated source code to the local file system using the codegen utility.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 20, 2026, 11:26 AM
Security Audit — agent-trust-hub — sympy