Back to skill

Security audit

Clipbox

Security checks for vulnerabilities and agentic risk

Overview

ClipBox is a user-invoked local logging/snippet tool, but users should know it keeps plaintext history and exports unsanitized saved text.

Install only if you are comfortable with ClipBox saving entries locally in plaintext under ~/.local/share/clipbox. Avoid storing secrets, credentials, proprietary code, or attacker-supplied terminal text, and be careful opening CSV/JSON exports because saved content is not safely escaped.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:107
Finding

Stored Terminal Control-Sequence Injection

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` ```bash _search() { local term="${1:?Usage: clipbox search }" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } _recent() { echo "=== Recent Activity ===" tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." } ``` ```bash case "${1:-help}" in check) shift if [ $# -eq 0 ]; then echo "Recent check entries:" tail -20 "$DATA_DIR/check.log" 2>/dev/null || echo " No entries yet. Use: clipbox check " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" local total=$(wc -l < "$DATA_DIR/check.log") echo " [Clipbox] check: $input" echo " Saved. Total check entries: $total" _log "check" "$input" fi ;; ``` The other record commands repeat the same unsafe storage and display pattern. ### Technical Analysis ClipBox accepts arbitrary text, stores it verbatim in category logs and `history.log`, and later prints that content directly to a terminal. It does not remove or visibly encode control characters such as ANSI CSI and OSC sequences. Shell quoting prevents the text from being evaluated as shell syntax, but it does not prevent a terminal emulator from interpreting embedded escape sequences after `echo`, `tail`, `grep`, or `sed` writes ...[truncated 1388 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:58
Finding

Unsafe JSON and CSV Export of Attacker-Controlled Entries

Content
View full analysis
"$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "\n]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out"; done < "$f" done ;; txt) echo "=== Clipbox Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } ``` ### Technical Analysis The JSON exporter inserts log fields directly between quotation marks without escaping double quotes, backslashes, control characters, or embedded newlines. An entry can therefore terminate its intended JSON string, add arbitrary properties or records, or make the entire export syntactically invalid. The CSV exporter concatenates fields with commas but does not quote fields or escape embedded quotation marks, commas, carriage ret ...[truncated 1628 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:107
Finding

Search-Term Option Injection in grep Invocation

Content
View full analysis
}" echo "Searching for: $term" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local m=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$m" ]; then echo " --- $(basename "$f" .log) ---" echo "$m" | sed 's/^/ /' fi done } ``` ### Technical Analysis Although `"$term"` is shell-quoted and therefore does not create shell metacharacter injection, `grep` can still interpret a term beginning with `-` as an option. No `--` end-of-options marker is used. For example, a term such as `-v` changes the operation from searching for the literal text `-v` to inverting the match. Other accepted option forms can alter pattern interpretation or make `grep` read a pattern file. This violates the documented behavior of searching for a keyword and allows caller-controlled modification of the underlying command's semantics. The search also uses regular-expression matching even though the documentation describes keyword searching. Consequently, metacharacters can alter matching behavior and computational cost. ### Attack Path 1. A caller supplies an option-shaped search term, such as `clipbox search -v`. 2. `_search` passes the term to `grep` before the log filename and without `--`. 3. `grep` parses the attacker-controlled value as an option instead of a literal search term. 4. Search semantics are modified, potentially exposing unintended matching log entries or causing errors and resource consumption. 5. Any displayed matching entries can additionally reach the terminal-rendering issue described separately. ### Impact Assessment This finding does not provide arbitrary shell command execution because the argument is quoted. It affects the correctness ...[truncated 268 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill’s declared purpose is snippet storage and retrieval, but the documented behavior is a broader timestamped activity logger that writes multiple logs, tracks history, and exports accumulated data. This mismatch can mislead users into providing sensitive content under a narrower trust assumption, increasing the risk of unintended local retention and disclosure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says ClipBox is for saving and organizing reusable text snippets for quick retrieval, such as code fragments and command templates. In contrast, the help text exposes commands like check, validate, generate, format, lint, explain, convert, diff, preview, fix, and report, which describe a general development utility rather than a snippet library; the implementation simply logs arbitrary inputs under those action names instead of focusing on snippet management semantics.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest presents the skill as a text snippet organizer, while the body describes a multi-command logging and export system. Security-relevant functionality hidden behind inaccurate documentation undermines informed consent and may cause users to expose confidential text, commands, or workflow data that they would not store if the true behavior were clear.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level description says the skill saves reusable snippets for quick retrieval, but the command set emphasizes timestamped logging across categories such as check, lint, diff, and report. This contradiction is dangerous because it obscures the actual data handling model and can cause users to misuse the tool with sensitive operational content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly stores user-provided text and activity history in local log files and supports search and export, yet it provides no warning that sensitive snippets, credentials, proprietary code, or investigative notes may be retained and later exposed. In a developer-tool context, this is especially risky because users often paste commands, code fragments, and diagnostics that may contain secrets.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file comments and help banner explicitly label Clipbox as a 'devtools tool' and 'devtools toolkit'. That documented intent conflicts with the manifest's claim that the skill is for storing and organizing reusable text snippets for quick retrieval, creating an intent-code/documentation mismatch about the skill's actual purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The export function aggregates all stored entries into JSON, CSV, or TXT files on disk, again without a clear warning that potentially sensitive history is being materialized into a new file. Because this tool’s context involves reusable snippets and command templates, exports may contain credentials, internal code, or operational commands, broadening the persistence and disclosure surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The command handlers persist arbitrary user input to plaintext log files in ~/.local/share/clipbox without an explicit notice or consent flow. In this skill context, users may paste code, commands, tokens, or other sensitive snippets, so silent retention increases the risk of local secret exposure to other local processes, backups, shared accounts, or later accidental export.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.