sympy
Warn
Audited by Gen Agent Trust Hub on Sep 14, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill documents several methods for generating and executing code at runtime. In
references/code-generation-printing.md, thelambdifyfunction is shown converting symbolic expressions into executable Python functions using backends like NumPy or SciPy. Theautowrapandufuncifyutilities are documented as tools to compile expressions into C, C++, or Fortran code using Cython or f2py, which is then imported and executed. Additionally,parse_expris used to dynamically parse strings into symbolic expressions, a process that internally relies on Python'seval()function. - [DYNAMIC_EXECUTION]: The documentation in
references/code-generation-printing.mdprovides examples for usingpickle.load()to deserialize SymPy objects from files. Deserializing data from untrusted sources using thepicklemodule is a known security risk that can lead to arbitrary code execution. - [INDIRECT_PROMPT_INJECTION]: The skill establishes an attack surface for indirect prompt injection by demonstrating how to ingest and process untrusted mathematical data from external strings, LaTeX, or Mathematica formats.
- Ingestion points: The
parse_expr,parse_latex, andparse_mathematicafunctions documented inreferences/code-generation-printing.mdact as ingestion points for external data. - Boundary markers: None are defined in the provided examples; expressions are processed directly.
- Capability inventory: The skill possesses capabilities for file system operations (via
pickle), runtime compilation (autowrap,ufuncify), and dynamic function generation (lambdify). - Sanitization: The skill includes a text warning that users should 'validate and sanitize to avoid code injection vulnerabilities' when parsing input, though no specific sanitization code is provided in the examples.
Audit Metadata