Back to skill

Security audit

Dev Setup

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local setup-note logger, but it is advertised as a macOS provisioning and dev-tool installation helper, which could cause users or agents to record sensitive setup details by mistake.

Review before installing. Use this only if you want a local flat-file logger for setup notes, not an automated Mac provisioning tool. Do not record secrets, tokens, passwords, private host details, or commands containing credentials, because entries are stored verbatim in your home directory and can later be searched or exported.

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

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:105
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 The user-controlled search term is passed to `grep` without an end-of-options delimiter: ```bash grep -i "$term" "$f" ``` Shell quoting prevents word splitting and shell command injection, but it does not prevent `grep` from interpreting a value beginning with `-` as a command-line option. Consequently, an attacker can change how `grep` processes the command rather than supplying a literal search pattern. For example, a term such as `-f` can cause the following log-file argument to be interpreted as a pattern file. Other supported `grep` options may change matching, file handling, output, or resource-consumption behavior. The `2>/dev/null || true` construct suppresses diagnostic output and failure status, making this manipulation less visible. This issue does not provide arbitrary shell command execution because the value remains quoted and is not passed through `eval` or a shell interpreter. ### Attack Path 1. An attacker or untrusted caller supplies a search term beginning with a hyphen: ```bash dev-setup search -f ``` 2. `_search` assigns `-f` to `term`. 3. The script executes an effective command resembling: ```bash grep -i -f "/home/user/.local/share/dev-setup/run.log" ``` 4. `grep` treats the log path as a pattern-file operand rather than treating `-f` as the literal pattern. 5. Search behavior is altered, and errors are hidden by stderr redirection and `|| tr ...[truncated 484 chars]
Remediation
View remediation
/dev/null || true) ``` Additional hardening measures: 1. Validate that the term does not contain prohibited control characters. 2. Retain quoting around both the pattern and file path. 3. Avoid suppressing all errors when operational visibility is important. 4. Add regression tests using values such as `-f`, `--help`, `--`, spaces, and newline characters to confirm that every supplied term is treated only as a literal pattern. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:124
Finding

Stored Terminal Control-Sequence and Output Injection

Content
View full analysis
/dev/null || echo " No entries yet. Use: dev-setup run " else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/run.log" local total=$(wc -l < "$DATA_DIR/run.log") echo " [Dev Setup] run: $input" echo " Saved. Total run entries: $total" _log "run" "$input" fi ;; ``` Relevant display sinks include: ```bash echo "$m" | sed 's/^/ /' ``` ```bash tail -20 "$DATA_DIR/history.log" 2>/dev/null | sed 's/^/ /' || echo " No activity yet." ``` ### Technical Analysis Command input is accepted without validation and written directly to persistent log files. The same data is later emitted to a terminal without escaping non-printable bytes, ANSI escape sequences, carriage returns, or embedded newline characters. Shell quoting prevents the input from becoming a shell command, but it does not make the content safe for a terminal. If an argument contains literal escape bytes, terminal emulators may interpret them as control instructions rather than ordinary text. Carriage returns and newlines can also overwrite or forge apparent output lines. Because entries persist in command-specific logs and `history.log`, this is a stored output- ...[truncated 1321 chars]
Remediation
View remediation
> "$DATA_DIR/run.log" printf ' [Dev Setup] run: %s\n' "$safe_input" ``` 5. Apply the same centralized sanitization function to every command branch, `_log`, `_search`, `_recent`, and all command-specific log views. 6. Consider a structured storage format with proper escaping, and decode values only into a safe textual representation. 7. Add tests containing ANSI escape bytes, carriage returns, newlines, tabs, backslashes, and strings resembling legitimate status messages. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill’s declared purpose is macOS provisioning and dev tool installation, but the documented behavior is a generic local logging and export utility that stores arbitrary user inputs. This mismatch is dangerous because users or agents may invoke it expecting setup automation while instead persisting potentially sensitive operational data, creating deception and unintended data collection risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest advertises a macOS provisioning/install skill, but the file documents a local activity logging CLI with no setup automation. In an agent ecosystem, this kind of semantic deception can cause the tool to be selected in the wrong context and capture sensitive setup notes, commands, or environment details under false pretenses.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file is presented as a macOS development environment setup utility, but the implemented behavior is a generic input collection and persistent logging tool. This kind of capability mismatch is dangerous because it can deceive users or higher-level agents into supplying operational data, commands, or sensitive text under false pretenses, creating a covert data-harvesting channel.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description is broad enough to make the skill eligible in many provisioning or configuration contexts even though its actual behavior is unrelated logging. Over-broad discovery scope raises the chance that an agent selects it unnecessarily and sends sensitive environment or task details into persistent local storage.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Branding the skill as 'Dev Setup' while describing it as a logging/tracking toolkit increases the likelihood of operator confusion and accidental invocation. That confusion can lead to collection of sensitive provisioning details, host configuration notes, or credentials pasted by mistake into what appears to be a setup helper.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Commands such as run, check, analyze, generate, preview, and export are generic verbs that can be accidentally matched during unrelated workflows. In an agent setting, overly broad triggers can cause unintentional activation and persistent recording of arbitrary user inputs or operational context.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill persistently stores all inputs in per-command logs and a unified history file, then supports search and export over that data. Even without network exfiltration, session persistence can expose sensitive setup details, internal host information, or mistakenly entered secrets to other local users, later processes, or accidental export.

Content

Scanner excerpt · SKILL.md (reported line 42)May include surrounding context.

md
All data is stored locally in `~/.local/share/dev-setup/`:

- **Per-command logs** — Each command (run, check, convert, etc.) writes to its own `.log` file with pipe-delimited `timestamp|value` format.
- **history.log** — A unified activity log recording every write operation with timestamps.
- **Export formats** — The `export` utility function supports JSON, CSV, and TXT output, written to `~/.local/share/dev-setup/export.<fmt>`.

No external services, databases, or API keys are required. Everything is flat-file and human-readable.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The help text advertises operational commands such as export and status, but much of the command dispatch instead stores arbitrary user input in log files rather than performing the documented function. Misleading interface behavior is security-relevant here because it encourages users to trust the tool with data they would not otherwise provide, enabling silent collection under deceptive command names.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

User-provided inputs are written verbatim to persistent local log files without any notice, consent, sanitization, or retention controls. In the context of an agent skill that users may invoke with commands, configuration values, or secrets during device provisioning, this can expose sensitive data to other local users, backups, support tooling, or later exfiltration.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.