T09 · Insecure Skill Coding Practices
- Location
scripts/start_session.sh:135- Finding
Command Injection Through an Unvalidated Resume UUID
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill openly launches remotely controllable Claude sessions with safety prompts disabled, but it also persists workspace trust and contains an unsafe resume path that warrants Review.
Install only if you deliberately want remote Claude Code sessions that can run without normal permission prompts. Treat the session URL like a secret, avoid using this on untrusted repositories or sensitive home-directory workspaces, prefer a sandboxed account/container, and do not pass resume UUIDs from untrusted text until the command construction is fixed.
scripts/start_session.sh:135Command Injection Through an Unvalidated Resume UUID
scripts/start_session.sh:55Remote Agent Is Launched With Workspace Trust and Permission Safeguards Disabled
The skill is framed as starting sessions but also allows sending tasks into already-running remote sessions and inspecting tmux state. That broadens it from setup automation into active control of existing agent sessions, creating risk of unintended command injection into privileged contexts or manipulation of sessions the user did not mean to target.
The skill is framed as starting sessions but also allows sending tasks into already-running remote sessions and inspecting tmux state. That broadens it from setup automation into active control of existing agent sessions, creating risk of unintended command injection into privileged contexts or manipulation of sessions the user did not mean to target.
The skill is framed as starting sessions but also allows sending tasks into already-running remote sessions and inspecting tmux state. That broadens it from setup automation into active control of existing agent sessions, creating risk of unintended command injection into privileged contexts or manipulation of sessions the user did not mean to target.
The skill is framed as starting sessions but also allows sending tasks into already-running remote sessions and inspecting tmux state. That broadens it from setup automation into active control of existing agent sessions, creating risk of unintended command injection into privileged contexts or manipulation of sessions the user did not mean to target.
The skill is framed as starting sessions but also allows sending tasks into already-running remote sessions and inspecting tmux state. That broadens it from setup automation into active control of existing agent sessions, creating risk of unintended command injection into privileged contexts or manipulation of sessions the user did not mean to target.
The skill explicitly launches Claude Code with --dangerously-skip-permissions --remote-control but does not foreground a strong safety warning. This creates a severe risk because it enables a remotely controllable agent session without normal permission prompts, substantially weakening user oversight and making subsequent file or shell actions far more dangerous.
cmd_trust_workspace silently marks a workspace as trusted by setting hasTrustDialogAccepted=True in the user's Claude config. That bypasses a security-relevant consent mechanism and is especially dangerous in the context of a remote-control session starter, where untrusted projects could gain elevated automation without the user's informed approval.
The script is explicitly designed to start Claude with --dangerously-skip-permissions and --remote-control, disabling normal approval barriers for a remotely driven agent. In a remote-session skill, this greatly increases risk because any prompt injection, malicious repository content, or operator mistake can lead to unrestricted tool execution or sensitive data access without interactive consent.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
read -r SESSION_LABEL
read -r TMUX_NAME
} < "$STATE_DIR/.name_$$"
rm -f "$STATE_DIR/.name_$$"
echo "Starting session: $SESSION_LABEL (tmux: $TMUX_NAME)"
The skill clearly instructs use of shell commands, tmux, and persistent file reads/writes, yet declares no explicit tool scope or permission boundaries. In a skill whose purpose is to launch remote-control sessions with bypassed permissions, missing scope declarations increases the chance of overbroad execution and unsafe invocation without informed consent.
The invocation language is very broad ('use when asked to start a remote session... or any variation'), which increases the chance the skill is auto-selected in contexts where the user did not intend remote control or permission bypass. In a high-risk skill, broad triggers are dangerous because they reduce specificity around consent for launching privileged remote sessions.
The skill instructs the agent to always return the remote-control session URL to the user but does not warn that the URL is effectively an access handle to a live remote session. Exposing and normalizing that URL without privacy guidance increases the chance of accidental disclosure through logs, chat history, screenshots, or forwarding.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
python3 "$SCRIPT_DIR/registry.py" <command> [args...]
Commands:
ensure-dir Create state dir with safe permissions
add <name> <url> <dir> [uuid] Register a new active session
mark-dead <name> Mark a session dead + capture UUID
prune [days] Remove dead entries older than N days (default 30)
The helper explicitly includes functionality to alter ~/.claude.json and pre-seed workspace trust, which exceeds simple session tracking. In a remote-control skill whose metadata already mentions bypass permissions, this expands the tool's authority and can suppress a meaningful user safety check for arbitrary workspaces.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
tmux_name = "".join(c for c in tmux_name if c.isalnum() or c == "-")
tmux_alive = (
subprocess.run(
["tmux", "has-session", "-t", tmux_name], capture_output=True
).returncode
== 0
The trust-setting behavior occurs without a clear user-facing warning in this function, so users may not realize a persistent security preference is being changed. Hidden persistence of trust weakens informed consent and can make later execution in that workspace less scrutinized.
The script automatically marks the provided working directory as trusted before launching the remote-controlled Claude session, with no confirmation or visibility to the user. In this skill’s context, that is dangerous because the session is also started in remote-control mode with permission checks bypassed, so untrusted project contents may immediately influence a highly privileged agent.