T09 · Insecure Skill Coding Practices
- Location
scripts/bullybuddy.sh:43- Finding
JSON Injection into Security-Sensitive Session Spawn Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a disclosed Claude Code session manager, but it creates a high-impact control surface with weak token handling, broad persistent-session authority, and an unpinned executable dependency.
Review carefully before installing. Use this only if you intentionally want one token to control multiple Claude Code sessions. Keep the server local when possible, avoid --tunnel unless you need remote access, do not share or log /bullybuddy url output, rotate the token if it appears in logs or chat, avoid --dangerously-skip-permissions, and prefer a pinned/audited package version before using it on sensitive repositories.
scripts/bullybuddy.sh:43JSON Injection into Security-Sensitive Session Spawn Requests
scripts/bullybuddy.sh:109Bearer Token Disclosure Through Credential-Bearing URLs
SKILL.md:22Unpinned Global npm Dependency Executes Unaudited Mutable Code
The url command prints authenticated dashboard URLs with the bearer token embedded in the query string, directly exposing a reusable credential to the terminal, shell history, logs, screenshots, or chat transcripts. Query-string tokens are especially risky because they are often retained in browser history, copied unintentionally, and leaked through observability or referrer mechanisms.
This command is an explicit credential-disclosure capability: it reveals the authentication token verbatim as part of a URL. Anyone who sees the output can reuse the token to access the BullyBuddy service with the same privileges until the token is rotated or expires.
The skill invokes shell execution via command-tool: exec and an external script, but it does not declare any permissions or allowed-tools scope. That leaves the skill with effectively broad execution capability while giving reviewers and users no explicit boundary on what tools or commands it may use.
The skill is explicitly designed to spawn, list, send input to, inspect, and kill multiple long-lived sessions, which creates a persistence and remote-control surface beyond a one-shot command. Persistent sessions increase exposure because they can retain context, continue operating after the initiating interaction, and be reused by anyone who gains control of the management interface.
/bullybuddy status - Server status & session summary
/bullybuddy list - List all sessions
/bullybuddy spawn [cwd] [task] [group] - Create new session
/bullybuddy send <id> <text> - Send input to session
/bullybuddy output <id> [lines] - Show session output/transcript
/bullybuddy kill <id> - Terminate session
This skill manages a service whose token grants full control over spawned Claude Code sessions, including arbitrary input delivery, and those sessions may run with local user permissions. In this context, unrestricted command-driving capability is dangerous because compromise of the token, dashboard URL, or wrapper flow can be turned into arbitrary actions in persistent agent sessions.
- The auth token grants **full control over all spawned Claude Code sessions**, including sending arbitrary input. Treat it as a secret.
- The `/bullybuddy url` command outputs the dashboard URL with the token embedded. Do not share or log this URL publicly.
- When using `--tunnel`, the dashboard and API are exposed to the internet via a Cloudflare temporary URL. Anyone with the token can access all sessions remotely.
- Spawned sessions run Claude Code with your local permissions. If `--dangerously-skip-permissions` is enabled, Claude can execute any command without confirmation.
## Authentication
The documented --dangerously-skip-permissions mode allows Claude to execute commands without confirmation, removing an important human approval checkpoint. In a session-management skill that can spawn, steer, and remotely access multiple sessions, this materially increases the risk of unintended or malicious autonomous actions.
- The auth token grants **full control over all spawned Claude Code sessions**, including sending arbitrary input. Treat it as a secret.
- The `/bullybuddy url` command outputs the dashboard URL with the token embedded. Do not share or log this URL publicly.
- When using `--tunnel`, the dashboard and API are exposed to the internet via a Cloudflare temporary URL. Anyone with the token can access all sessions remotely.
- Spawned sessions run Claude Code with your local permissions. If `--dangerously-skip-permissions` is enabled, Claude can execute any command without confirmation.
## Authentication
The --tunnel feature exposes the dashboard and API over a Cloudflare temporary URL, enabling remote access to persistent sessions from the internet. Given that the token confers full control and may be embedded in the dashboard URL, this substantially raises the likelihood and impact of session hijacking or unauthorized remote operation.
Start the server with --tunnel to create a Cloudflare temporary URL automatically:
bullybuddy server --tunnel
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
[[ -n "$task" ]] && body="${body},\"task\":\"$task\""
body="${body}}"
result=$(curl -sf -X POST "$BB_URL/api/sessions" -H "$AUTH" -H "$CT" -d "$body")
id=$(echo "$result" | jq -r '.data.id')
echo "Spawned session: $id"
echo "State: $(echo "$result" | jq -r '.data.detailedState')"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
exit 1
fi
# Append carriage return for PTY
curl -sf -X POST "$BB_URL/api/sessions/$id/input" -H "$AUTH" -H "$CT" -d "{\"data\":\"$text\\r\"}" > /dev/null
echo "Sent to $id: $text"
;;
The kill command issues an HTTP DELETE to remove a session and then reports success, but there is no confirmation prompt or prior warning before the destructive action. Because deleting a session may terminate active work irreversibly, users are not clearly alerted at the point of execution.
The manifest describes a CLI wrapper for spawning, listing, sending input to, killing, and monitoring Claude Code sessions. The audit subcommand adds access to a separate audit log capability, which is not mentioned in the described scope and goes beyond ordinary per-session management operations.
Printing a bearer token in a dashboard URL without warning creates a high likelihood of accidental credential leakage through terminal capture, clipboard history, logs, screenshots, or browser history. Because bearer tokens are sufficient for access, disclosure equates to account or service compromise for the token's scope.
The wrapper auto-discovers and loads BB_TOKEN from ~/.bullybuddy/connection.json, which is credential access, but the script provides no visible notice to the user when doing so. Although this may be convenient, the absence of disclosure can obscure that sensitive credentials are being read automatically from disk.