Back to skill

Security audit

Macos Toolkit

Security checks for vulnerabilities and agentic risk

Overview

This is a local activity logging skill with overstated marketing and privacy caveats, but no evidence of hidden remote access, credential theft, destructive behavior, or privilege escalation.

Install only if you want a local history tracker for manually entered activity notes. Do not enter passwords, tokens, private keys, or sensitive internal details, and review or delete ~/.local/share/macos-toolkit if you no longer want the history retained.

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

Warning
Location
scripts/script.sh:6
Finding

Potentially Sensitive Records Stored with Ambient Filesystem Permissions

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` Representative record creation: ```bash run) shift if [ $# -eq 0 ]; then echo "Recent run entries:" tail -20 "$DATA_DIR/run.log" 2>/dev/null || echo " No entries yet. Use: macos-toolkit 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") ``` ### Technical Analysis The script creates its data directory and log files without setting a restrictive `umask` or explicitly assigning secure permissions. File modes are therefore determined by the invoking process's ambient `umask`. With a commonly used `umask` of `022`, the directory may be created with mode `0755` and log files with mode `0644`. This can expose stored records to other local users if the parent home-directory permissions allow traversal. The project documentation encourages users to record system diagnostics, configuration changes, system states, and report contents. Such records can contain hostnames, internal paths, installed software details, operational metadata, configuration values, or accidentally supplied credentials. The same input is duplicated in category-specific logs and `history.log`, increasing the number of files that must be protected. The issue does not grant remote access or elevated privileges by itself. Exploitation requires local filesystem access and sufficient permission to traverse the affected user's home directory. ### Attack Path 1. A user invokes a recording command with sen ...[truncated 945 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:45
Finding

Unescaped Log Values Corrupt Exports and Enable CSV Formula Injection

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 "=== Macos Toolkit 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 export function directly interpolates log-derived values into JSON and CSV output without context-appropriate encoding. For JSON, values containing quotation marks, backslashes, control characters, or embedded line breaks can terminate or corrupt the generated string. The resulting file may be invalid JSON or may have a structure different from the intended representation. For CSV, fields are neither quoted nor escaped. Com ...[truncated 2486 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill markets itself as a broad macOS management/developer CLI, but the documented behavior is primarily persistent logging of user-provided text into local files. This mismatch can mislead users into supplying operational, diagnostic, or potentially sensitive information under the assumption that real system actions are being performed, creating an undisclosed data collection and retention risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description and command set are broad and underspecified, using generic action verbs like run, check, analyze, generate, and export without clear boundaries on what the tool actually does. In an agent ecosystem, this can cause over-invocation or inappropriate trust, increasing the chance that users or orchestrators pass sensitive or irrelevant data to a tool that mainly records and stores it.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest claims this is an 'ultimate tool to manage your Mac' for developers, which implies actionable macOS CLI operations. In practice, the code just stores user-supplied strings under ~/.local/share/macos-toolkit, shows recent entries, searches them, and exports them; it performs no meaningful system-management tasks.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Across multiple commands, the script stores arbitrary user-provided text and later exposes it via search, recent-history display, status output, and export. In skill context, this is more dangerous because the tool is marketed as a generic macOS developer CLI, so users may pass commands, tokens, file paths, or troubleshooting data without expecting long-term retention and retrieval surfaces.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The help output says 'export Export (json|csv|txt)' and 'status Health check', suggesting operational subcommands. However, due to earlier duplicate case labels at L243-L257 and L273-L287, invoking 'export' or 'status' matches the logging branches instead of the real _export and _status handlers at L304 and L307, so the documented behavior contradicts the actual execution path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The export feature aggregates all locally stored activity into json/csv/txt files on disk, which can amplify accidental leakage by producing easy-to-share copies of potentially sensitive history. Because the tool gives little warning that prior user inputs are persisted and then exportable, a user may unknowingly create secondary artifacts containing secrets or private operational data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool persistently records arbitrary user input into files under the user's home directory without clear notice, consent, retention limits, or sensitivity guidance. Users may enter secrets, internal data, or personal information assuming these are ephemeral command arguments, creating unintended local disclosure and later exposure through filesystem access, backups, or support sharing.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.