query2cad-freecad

Warn

Audited by Gen Agent Trust Hub on Nov 7, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: In scripts/q2c.py, the run function dynamically generates a Python wrapper script that uses exec(compile(open(MACRO).read(), MACRO, 'exec')) to execute the content of the generated FreeCAD macro. This allows any code written by the agent to be executed in the FreeCAD Python environment.
  • [COMMAND_EXECUTION]: The scripts/q2c.py script utilizes subprocess.run to invoke the freecadcmd executable with the dynamically generated wrapper script. This bridges the gap between the AI-generated code and the host system's shell environment.
  • [REMOTE_CODE_EXECUTION]: The skill's core workflow instructs the agent to write a local Python file (macro.py) and subsequently execute it. This architectural pattern facilitates remote code execution (RCE) because the code being executed is synthesized by the model based on external user-supplied text.
  • [INDIRECT_PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection. A user's natural language query serves as the source for code generation without sufficient sanitization or boundary markers. A crafted query could persuade the model to include malicious logic (e.g., file system access or network requests) in the generated macro.
  • Ingestion points: User query input is processed to generate the construction steps and the macro code.
  • Boundary markers: None identified in the workflow; instructions do not explicitly tell the agent to ignore instructions embedded in the user query.
  • Capability inventory: The skill has the ability to write files, execute subprocesses, and run arbitrary Python code via exec in scripts/q2c.py.
  • Sanitization: There is no validation or sanitization of the generated Python code before it is passed to the execution environment.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Nov 7, 2026, 06:02 AM