T09 · Insecure Skill Coding Practices
- Location
scripts/save_image.py:83- Finding
Arbitrary File Write Through Unsanitized Output Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated 3D/SEO generation purpose, but it has real review-worthy risks around arbitrary file writes, unbounded URL fetching, automatic local file serving, and broad process cleanup.
Review before installing. Do not use this skill with confidential designs unless you are comfortable sending prompts and images to PrintPal, WaveSpeed, and OpenRouter. Avoid URL inputs from untrusted sources, avoid custom filenames, and be aware the SEO workflow starts a localhost download server. Treat the optional Bambu printer commands as hardware-control actions requiring deliberate user confirmation.
scripts/save_image.py:83Arbitrary File Write Through Unsanitized Output Filename
scripts/generate_3d.py:35Server-Side Request Forgery and Unbounded Download Through User-Controlled Image URLs
scripts/seo_product_photos.py:73Unnecessary Disclosure of Local Filesystem Paths to OpenRouter
scripts/seo_product_photos.py:301Shared Output Directory Exposure and Overbroad Process Termination
SKILL.md:24Unpinned Third-Party Dependencies and Global CLI Installation
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
print("Calling OpenRouter MiniMax API...")
response = requests.post(OPENROUTER_API_URL, headers=headers, json=data, timeout=60)
response.raise_for_status()
result = response.json()
This finding indicates the skill framing does not align with the apparent runtime behavior: it is presented as a 3D model generator, but the analyzed content suggests other functions such as serving downloadable files and using OpenRouter for SEO metadata. Such description-behavior gaps are a real security issue because users may authorize the skill for one purpose while it performs additional networked or exposed operations not clearly disclosed.
This finding indicates the skill framing does not align with the apparent runtime behavior: it is presented as a 3D model generator, but the analyzed content suggests other functions such as serving downloadable files and using OpenRouter for SEO metadata. Such description-behavior gaps are a real security issue because users may authorize the skill for one purpose while it performs additional networked or exposed operations not clearly disclosed.
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
## Prerequisites
- Printer must have **Developer Mode** enabled (Settings → LAN Only → Enable Developer Mode)
- Required info: printer IP address, serial number, LAN access code (shown on the touchscreen)
- CLI tool: `@versatly/bambu` installed globally (`npm i -g @versatly/bambu`)
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
## Prerequisites
- Printer must have **Developer Mode** enabled (Settings → LAN Only → Enable Developer Mode)
- Required info: printer IP address, serial number, LAN access code (shown on the touchscreen)
- CLI tool: `@versatly/bambu` installed globally (`npm i -g @versatly/bambu`)
Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.
## Troubleshooting
- **Connection timeout** → Developer Mode enabled? Correct IP? Printer powered on?
- **Auth failed** → Re-check the LAN access code (it changes if Developer Mode is toggled off/on)
- **FTP error** → Port 990 with implicit TLS; printer must be in LAN-only mode
- **No AMS data** → Verify AMS is physically connected and detected on the touchscreen
The skill documents capabilities that require shell execution, network access, environment variables, and file read/write, but it does not declare any explicit tool scope such as permissions or allowed-tools. That increases the chance an agent runtime will grant broader access than users expect, making risky operations like downloading URLs, serving files, or invoking external CLIs less transparent and less constrained.
The script sends raw user prompt text to the external WaveSpeed API to generate an image, but it does not clearly disclose to the user that their text will leave the local environment and be processed by a third party. In a skill that may be used with proprietary product ideas, personal data, or confidential descriptions, this creates a real privacy and data-governance risk even though the transmission is functionally required for the feature.
The script uploads user-supplied image files to the external PrintPal API in order to generate a 3D model, but it does not explicitly disclose that local files may be transmitted to a third-party service. This is a meaningful privacy and confidentiality issue because users may provide private designs, customer assets, or sensitive images assuming processing is local.
The script description understates the behavior by saying it provides a download URL, while the implementation actually launches an HTTP server that exposes generated artifacts. That mismatch reduces informed consent and makes the network exposure more dangerous in an agent setting where users may not expect local services to be opened.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
print("Calling OpenRouter MiniMax API...")
response = requests.post(OPENROUTER_API_URL, headers=headers, json=data, timeout=60)
response.raise_for_status()
result = response.json()
User-supplied description, purpose, audience, and image reference are sent to OpenRouter without an explicit privacy warning or opt-in beyond progress logs. In this skill context, users may provide proprietary designs or sensitive product concepts, so silent third-party transmission creates a meaningful data-disclosure risk.
When a local file path is provided, the script may upload the image to WaveSpeed to obtain a URL, but this behavior is only mentioned in logs after execution begins. Uploading local images to a third party without explicit warning is dangerous because input files may contain private designs, copyrighted material, or metadata users did not intend to disclose.
The script starts and manages a local HTTP server to expose generated files over the network, which is beyond the minimally necessary behavior for generating SEO text and images. In a skill environment this creates unintended network exposure of artifacts and potentially any misconfigured served directory contents.
Using pkill introduces host-level process-control behavior unrelated to the advertised listing-generation function. This can interfere with unrelated services and is especially risky in shared or multi-tenant environments where broad process matching may cause denial of service.
The script runs pkill with a pattern derived from the port and suppresses errors, which can terminate unintended matching processes on the host. In an agent skill context, killing processes is unrelated to core content generation and can disrupt other workloads or be abused if port selection is influenced by a user.
# Kill any existing server on this port
try:
subprocess.run(["pkill", "-f", f"serve_files.py.*{port}"], stderr=subprocess.DEVNULL)
except:
pass
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Start new server
server_script = os.path.join(os.path.dirname(__file__), "serve_files.py")
proc = subprocess.Popen(
[sys.executable, server_script, "-d", OUTPUT_DIR, "-p", str(port)],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
The script automatically starts an HTTP server exposing generated output and then prints a URL, without clearly warning the user that files will be network-accessible. In environments where hostname resolution or interface binding is broad, this can unintentionally share generated artifacts beyond the local machine.
This markdown file includes instructions for exporting a live API key into an environment variable, which affects credential handling and could expose secrets through shell history, process inspection, or accidental sharing. The documentation provides no user-facing warning about protecting the key or avoiding committing or logging it.
The markdown instructs users to export an API key but does not disclose any privacy or security implications of storing and using the credential. Because this is documentation for handling secrets, a basic warning is warranted to reduce the risk of accidental exposure.
No suspicious patterns detected.