T09 · Insecure Skill Coding Practices
- Location
scripts/snapmaker.py:89- Finding
Authentication Token Transmitted in Plaintext HTTP Query Strings
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly purpose-aligned, but it needs review because some physical printer controls can run immediately even though the documentation says state-changing actions require confirmation.
Review this before installing if the printer is shared, actively printing, or on an untrusted network. Treat config.json as a secret, use a dedicated trusted LAN, and do not let an agent invoke pause, resume, stop, send, or start unless you are ready for the printer to act immediately.
scripts/snapmaker.py:89Authentication Token Transmitted in Plaintext HTTP Query Strings
scripts/snapmaker.py:341Destructive Printer Controls Execute Without Documented Confirmation
scripts/snapmaker.py:429Network-Controlled Strings Are Written to Terminals and Logs Without Sanitization
SKILL.md:208Unpinned Third-Party Dependency Installation Is Not Reproducible
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
gets no reply (e.g. different subnet).
# Get current printer status
python3 scripts/snapmaker.py status
# Watch print progress (updates every 5 seconds)
python3 scripts/snapmaker.py watch
# Get status as JSON
python3 scripts/snapmaker.py status --json
# Send a file (prepares but doesn't start)
python3 scripts/snapmaker.py send ~/prints/model.gcode
# Send and start immediately
python3 scripts/snapmaker.py send ~/prints/model.gcode --start --yes
# Pause current print
python3 scripts/snapmaker.py pause --yes
# Resume paused print
python3 scripts/snapmaker.py resume --yes
# Stop/cancel print (requires confirmation)
python3 scripts/snapmaker.py stop
--yes - Skip confirmation prompts (use with caution!)--force - Override safety checks (NOT RECOMMENDED)All commands that modify state require confirmation unless --yes is provided.
The skill uses these Snapmaker HTTP API v1 en
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.
### Safety Flags
- `--yes` - Skip confirmation prompts (use with caution!)
- `--force` - Override safety checks (NOT RECOMMENDED)
All commands that modify state require confirmation unless `--yes` is provided.
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
### Safety Flags
- `--yes` - Skip confirmation prompts (use with caution!)
- `--force` - Override safety checks (NOT RECOMMENDED)
All commands that modify state require confirmation unless `--yes` is provided.
The skill documents capabilities that read/write local files, use environment-dependent configuration, and perform network operations against a printer, but it declares no explicit tool scope or permission boundary. In an agent environment, this increases the chance of unintended access or execution beyond what a reviewer expects, making misuse or over-privileged operation harder to contain.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- **Status monitoring** - Real-time printer status (temperatures, progress, position)
- **Job management** - Send, start, pause, resume, and stop print jobs
- **Safety features** - Prevents interfering with active prints without confirmation
- **Progress watching** - Live monitoring of print progress
- **Notification support** - Detect print completion, filament issues, errors
The documentation instructs users to store an API token in config.json but does not clearly label it as a secret or warn against exposing it in version control, logs, screenshots, or shared workspaces. If leaked, the token could allow unauthorized control of the printer, including starting, pausing, or stopping jobs.
The documented --yes flag allows state-changing actions to proceed without confirmation, enabling unattended pause/resume/send/start operations if invoked by an agent or script. In the context of a physical device, removing confirmation increases the chance of unsafe or unintended printer actions, especially when combined with network access and job control commands.
### Safety Flags
- `--yes` - Skip confirmation prompts (use with caution!)
- `--force` - Override safety checks (NOT RECOMMENDED)
All commands that modify state require confirmation unless `--yes` is provided.
The document enumerates authenticated endpoints that can control printer behavior, upload G-code, and start or stop jobs, but it does not warn that the token is security-sensitive or that misuse can cause unauthorized physical actions and material waste. In the context of a skill intended to control real hardware, omitting credential-handling and operational safety cautions increases the chance of unsafe or overly permissive integrations.
The stop/cancel operation immediately aborts an active print job with no confirmation prompt, unlike the send+start path which does prompt. In a tool controlling physical equipment, accidental invocation can waste materials, interrupt long-running jobs, and potentially leave hardware or workpieces in an undesirable state.
The skill description says it controls and monitors Snapmaker printers via their HTTP API, but the code also performs active UDP broadcast discovery and arbitrary targeted probing. That expands the capability from single-device control into local-network reconnaissance, which is a meaningful security boundary change because it can scan for devices beyond a preconfigured printer.
UDP broadcast discovery sends packets to 255.255.255.255 and listens for responses from any host implementing the protocol. For a skill advertised as HTTP-based printer control, this introduces unnecessary network enumeration capability that could be abused to map devices on the LAN or bypass expectations that the tool only talks to a configured printer.
Request target host is built from a dynamic or untrusted value. If the host is attacker-influenced, this enables SSRF to arbitrary internal or metadata endpoints.
if probe_ip:
print(f"No UDP reply. Trying HTTP probe on {probe_ip}:{port}...")
try:
r = requests.get(
f"http://{probe_ip}:{port}/api/v1/status",
params={'token': config.get('token', '')},
timeout=5,
The top-level documentation frames the tool as providing safe control of a Snapmaker printer, which suggests bounded interaction with the intended device. Elsewhere, the script performs unauthenticated UDP broadcast discovery and targeted probes across the network, which contradicts that narrow 'safe control' characterization.
No suspicious patterns detected.