Back to skill

Security audit

Spec Workflow Mcp

Security checks for vulnerabilities and agentic risk

Overview

This is a local productivity logging skill with disclosed plaintext storage and export features, but users should treat its logs and exports as sensitive project data.

Install only if you are comfortable with a local shell-based logger that stores your workflow notes as plaintext under your home directory. Do not put passwords, tokens, confidential customer data, or regulated information into entries, and be careful opening CSV exports in spreadsheet software because exported values are 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:65
Finding

Unsafe JSON and CSV Export of User-Controlled Data

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:65-82
Vulnerability Type: Improper output encoding and spreadsheet formula injection
Risk Level: Medium

Vulnerable Code

bash
        json)
            echo "[" > "$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
            ;;

Technical Analysis

Entry values originate from command-line arguments and are persisted without restrictions in command-specific log files and history.log. The export implementation subsequently interpolates these values directly into JSON and CSV output.

The JSON exporter does not escape quotation marks, backslashes, or control characters. An entry containing JSON syntax can therefore terminate the intended value string, add arbitrary properties or objects, or make the export syntactically invalid.

The CSV exporter neither quotes fields nor escapes embedded commas, quotation marks, carriage returns, or newlines. It also does not neutralize values beginning with spreadsheet formula prefixes such as =, +, -, or @. If such an export is opened in a spreadsheet application, attacker-controlled content may be interpreted as a formula rather than inert t ...[truncated 1749 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace manual JSON construction with a standards-compliant serializer. For example, pass records to Python's json module so quotation marks, backslashes, Unicode, and control characters are escaped correctly.
  2. Replace manual CSV concatenation with a CSV library such as Python's csv module. Quote all fields and correctly escape embedded quotation marks, delimiters, and line endings.
  3. If CSV files are expected to be opened in spreadsheet software, neutralize cells whose first non-whitespace character is =, +, -, or @. A documented defensive prefix such as an apostrophe can be applied while preserving the original value separately when exact round-trip fidelity is required.
  4. Validate generated exports before reporting success. Parse JSON output with a conforming parser and test CSV output with representative values containing commas, quotes, newlines, formula prefixes, backslashes, and control characters.
  5. Consider using a structured storage format internally rather than parsing pipe-delimited text, because user-controlled pipe characters and line breaks can also make records ambiguous.
  6. Add regression tests covering JSON structural injection, malformed records, CSV row injection, and spreadsheet formula injection.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill advertises itself as an MCP-served spec workflow tool, but the documented behavior is a broader local shell CLI that stores user inputs in plaintext, supports export/search, and exposes additional commands not reflected in the summary. This mismatch can cause users or orchestrators to grant trust, permissions, or use contexts based on incomplete expectations, increasing the risk of unintended data persistence and exposure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the skill serves spec-driven development tools via MCP for adding tasks, planning iterations, tracking completion, and reviewing quality. Instead, the script exposes a broad local command set including streak, remind, prioritize, archive, tag, timeline, report, weekly-review, stats, export, search, recent, and status, and persists everything as local log files rather than providing MCP-oriented workflow operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persistently stores arbitrary user-provided content in plaintext under the user's home directory and provides bulk export functionality without warning, consent flow, retention policy, or redaction. In an AI-assisted workflow context, users may enter task details, planning notes, review comments, or other sensitive project information, making inadvertent local disclosure or later exfiltration more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill invites users to record planning, review, progress, and weekly summary content but does not prominently warn that all such content is stored in local plaintext logs and can later be exported. In practice, these workflows often contain sensitive project details, internal URLs, credentials pasted by mistake, or confidential review notes, so silent persistence materially increases confidentiality risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

Exporting all collected logs to json/csv/txt and searching across all stored entries are broad personal-data management features. The manifest focuses on AI-assisted spec workflow actions like task addition, iteration planning, completion tracking, and quality review, and does not indicate generic archive/export/search tooling over all accumulated local records.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.