Back to skill

Security audit

Skill Cad Generator

Security checks for vulnerabilities and agentic risk

Overview

This CAD skill is not clearly malicious, but its documentation, permissions, and code do not line up safely enough for automatic installation.

Review this skill before installing. It appears incomplete or mispackaged: it claims a remote CAD/rendering workflow but mostly ships stubs and a local file-export script. Only use it in a constrained workspace, avoid proprietary design prompts unless the FRP endpoint and retention are understood, and require filename validation, overwrite protection, SVG escaping, and authentication before enabling the advertised remote workflow.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
cad_generator.py:25
Finding

Path Traversal Through Unvalidated Project Names

Content
View full analysis
Remediation
View remediation
str: if not PROJECT_NAME_PATTERN.fullmatch(name): raise ValueError("Invalid project name") return name ``` 2. Resolve every generated path and verify that it remains inside the project directory: ```python from pathlib import Path PROJECTS_DIR = Path(__file__).resolve().parent / "projects" def project_path(name: str, suffix: str) -> Path: validate_project_name(name) candidate = (PROJECTS_DIR / f"{name}{suffix}").resolve() if candidate.parent != PROJECTS_DIR.resolve(): raise ValueError("Project path escapes the project directory") return candidate ``` 3. Apply the same centralized path-construction function to JSON, DXF, and SVG operations. 4. Reject absolute paths, path separators, `.` and `..` components, control characters, and names exceeding a documented maximum length. 5. Where attacker-accessible directories are possible, protect against symbolic-link attacks by checking path components and using secure file-opening techniques supported by the target platform. 6. Use atomic writes through a temporary file in the verified destination directory followed by a controlled rename, reducing corruption and race-condition risks. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
cad_generator.py:48
Finding

Stored SVG Markup Injection Through Element Type

Content
View full analysis
\n') f.write(f'{elem["type"]}\n') ``` ### Technical Analysis The `type` argument is attacker-controlled and persisted in the project JSON file. During SVG generation, this value is interpolated into the body of a `text` element without XML escaping. An attacker can provide XML metacharacters and closing tags that terminate the intended `text` node and inject additional SVG elements. Depending on the SVG viewer, browser embedding method, and applicable security policy, injected markup may support: - Visual content spoofing. - External resource references. - Interactive or active SVG content. - Script execution in browser contexts that permit active SVG scripting. Because the malicious value is stored in the project file before export, this is a stored injection issue rather than a one-time ...[truncated 1317 chars]
Remediation
View remediation
{label}\n' ) ``` 2. Prefer a maintained XML construction API such as `xml.etree.ElementTree` instead of assembling SVG markup with string interpolation. The API should perform correct text and attribute escaping. 3. Validate element types against a documented allowlist, such as: ```python ALLOWED_ELEMENT_TYPES = { "stage", "truss", "screen", "light", "speaker", "booth" } if args.type not in ALLOWED_ELEMENT_TYPES: raise ValueError("Unsupported element type") ``` 4. Validate project JSON again when loading it. Do not assume that persisted files contain trusted values, because files may be edited outside the application. 5. If generated SVG files are served through a web application: - Serve them with an appropriate `Content-Type`. - Use `Content-Disposition: attachment` where inline rendering is unnecessary. - Apply a restrictive Content Security Policy. - Consider sanitizing SVG content or converting it to a non-active raster format for previews. 6. Add tests covering closing tags, entity syntax, quotes, event-handler attributes, external references, and other XML metacharacters. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is the same underlying issue expressed in Chinese: the skill is presented as a core CAD pipeline component but does not actually implement the advertised JSON generation, FRP transfer, rendering, or parametric modeling workflow. Such overclaiming can mislead operators into enabling the skill in inappropriate contexts and trusting nonexistent validation or isolation guarantees.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is the same underlying issue expressed in Chinese: the skill is presented as a core CAD pipeline component but does not actually implement the advertised JSON generation, FRP transfer, rendering, or parametric modeling workflow. Such overclaiming can mislead operators into enabling the skill in inappropriate contexts and trusting nonexistent validation or isolation guarantees.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest claims the skill accepts user descriptions, generates JSON parameter definition files, and sends them to an M4 Pro via an FRP tunnel for recomputation and rendering, including support for parameterized models like tulip petals. This file instead implements local CLI-style project creation, element editing, template-based stage/exhibition layouts, and local DXF/SVG export, with no FRP, remote execution, rendering pipeline, or user-description-to-parameter conversion logic present.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill documents capabilities that imply file generation and handling, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, missing scope boundaries can let the runtime grant broader file read/write access than users expect, increasing the risk of unintended local file access or overwrite if the skill is invoked in a permissive context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation states that user-derived design parameters are sent over an FRP tunnel to another machine, but it gives no user-facing warning or consent language about that data transfer. This is risky because users may disclose proprietary designs or sensitive project information believing processing is local, while the skill actually externalizes the data path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented service endpoint is unauthenticated and exposed through an FRP tunnel, yet the skill provides no warning about the security implications. An unauthenticated remote generation endpoint can be abused to submit arbitrary jobs, exfiltrate model data, or use the CAD/rendering backend as a pivot point if the tunnel is reachable beyond the intended trust boundary.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill says it can be invoked directly in AI assistant conversations without clearly defined activation constraints. Broad invocation scope increases the chance that untrusted user input can trigger file creation, remote communication, or downstream CAD actions unexpectedly, especially in a multi-tool assistant environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file-level documentation presents the module as a CAD drawing generator with DXF/SVG output, and the bulk of the file defines such functionality. However, the exported-looking CadGenerator interface's execute method does not call any of those functions and simply returns a fixed success response, which contradicts the documented operational intent of the skill entrypoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

save_project() writes directly to a predictable path derived from user-controlled project names and silently overwrites existing files. In an agent context, this can cause destructive loss of prior project data and, because the filename is unsanitized, may permit path traversal to overwrite files outside the projects directory if an attacker can supply names like '../target'.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description is written entirely in Chinese and presents the skill behavior in that locale without any indication that users may choose another language. Under the stated policy, forcing a specific language or locale without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list contains very broad activation terms ("cad" and "CAD") with no additional constraints, making accidental or inappropriate invocation likely. In a skill that can generate parameter definitions and push work to a remote rendering/workstation pipeline, overbroad activation increases the chance of unintended execution or misuse from loosely related user messages.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly states that the skill will generate files under local writable directories and send data through an FRP tunnel to a rendering engine, but it does not disclose these side effects in a user-facing warning or consent mechanism. In a CAD workflow, user prompts and model parameters may contain sensitive design data, so undisclosed file writes and network transmission increase the risk of data exposure or unintended persistence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

DXF export writes to a file path based on unvalidated project input and replaces any existing file without confirmation. In an automated skill setting, this can be abused to clobber prior exports or, if path traversal is accepted via the project name, overwrite arbitrary writable files with attacker-influenced DXF content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

SVG export has the same unsafe file-write pattern: it derives the output path from untrusted project names and silently overwrites existing files. Because SVG is often opened in browsers or other rich renderers, attacker-controlled text fields embedded into the SVG may also create downstream content-handling risk if consumers render active content unsafely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest description is entirely in Chinese and does not indicate that language choice is optional or that the skill is intended only for a Chinese-speaking or region-specific context. This can violate language/locale policy when a skill implicitly forces one language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code includes Chinese-only natural-language strings in the module docstring and returned status message, which indicates a fixed language choice rather than offering a user-selectable locale. Under the policy, language constraints should be opt-in or clearly justified as region-specific.

Content

No source excerpt is available for this finding.