Back to skill

Security audit

Datasets

Security checks for vulnerabilities and agentic risk

Overview

The skill is marketed like a dataset browser/loader, but the artifact mainly records user-supplied dataset-related text into persistent searchable/exportable local logs.

Review this as a local plaintext activity logger, not a dataset browser. Do not enter secrets, access tokens, personal data, proprietary samples, or sensitive file paths unless you are comfortable with them remaining in ~/.local/share/datasets and being searchable/exportable later.

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:7
Finding

Persisted User Input May Be Readable by Other Local Users

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:7-9, 130-294
Vulnerability Type: Insecure permissions for persistent plaintext logs
Risk Level: Medium

Vulnerable Code

bash
DATA_DIR="${HOME}/.local/share/datasets"
mkdir -p "$DATA_DIR"

_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

Representative data-recording path:

bash
ingest)
    shift
    if [ $# -eq 0 ]; then
        echo "Recent ingest entries:"
        tail -20 "$DATA_DIR/ingest.log" 2>/dev/null || echo "  No entries yet. Use: datasets ingest <input>"
    else
        local input="$*"
        local ts=$(date '+%Y-%m-%d %H:%M')
        echo "$ts|$input" >> "$DATA_DIR/ingest.log"
        local total=$(wc -l < "$DATA_DIR/ingest.log")
        echo "  [Datasets] ingest: $input"
        echo "  Saved. Total ingest entries: $total"
        _log "ingest" "$input"
    fi
    ;;

The same storage pattern is repeated for the other data commands through line 294.

Technical Analysis

The script creates its data directory and log files without establishing a restrictive umask or explicitly enforcing directory and file permissions. File permissions therefore depend on the caller's ambient environment.

With a common umask of 022, the directory may be created with mode 0755 and newly created logs with mode 0644. On a multi-user system, these modes can allow other local accounts to traverse the directory and read the logs.

Command input is intended to be retained in plaintext in both a category-specific log and history.log. Consequently, dataset names, query expressions, pipeline details, file paths, or secrets accidentally supplied as command arguments may be exposed twice. The exposure is persistent and continues after the command terminates.

Attack Path

  1. A user invokes a recording command such as datasets ingest, datasets query, or `datasets pipelin ...[truncated 1277 chars]
Remediation
View remediation

Remediation Suggestions

  1. Establish private permissions before creating any storage:

    bash
    umask 077
    DATA_DIR="${HOME}/.local/share/datasets"
    mkdir -p -m 700 "$DATA_DIR"
    chmod 700 "$DATA_DIR"
    
  2. Create every log with mode 0600 before appending data:

    bash
    log_file="$DATA_DIR/ingest.log"
    touch "$log_file"
    chmod 600 "$log_file"
    printf '%s|%s\n' "$ts" "$input" >> "$log_file"
    
  3. Apply equivalent protection to history.log and all existing category logs. Consider checking ownership before writing to prevent use of attacker-controlled preexisting paths.

  4. Avoid duplicating complete user input in history.log. Store only the operation type and timestamp, or store a redacted summary.

  5. Document that arguments are persisted and instruct users not to provide credentials, access tokens, personal data, or other secrets.

  6. Provide a retention and secure-deletion mechanism so sensitive records do not remain indefinitely.

  7. Use printf instead of echo for predictable handling of arbitrary input, and validate or encode record delimiters before writing structured logs.

Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a dataset browsing/loading tool, but its documented behavior is primarily to persistently log user-provided inputs and maintain searchable/exportable local history. This mismatch is dangerous because users may provide dataset names, file paths, queries, or even sensitive data under the assumption of transient processing, while the skill silently retains that information for later retrieval or export.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

From lines 122–307, the advertised dataset operations mostly just append raw user input to per-command log files and echo it back, rather than browsing, loading, or transforming datasets. In an agent skill context, this is dangerous because users may supply dataset paths, queries, credentials, or sensitive sample data believing it is being processed, while the script silently persists that content to disk under ~/.local/share/datasets.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest advertises dataset browsing and manipulation, but the documentation describes a local activity logging system instead of actual dataset operations. This deceptive framing can mislead users into disclosing operational details or sensitive dataset-related content to a tool that mainly records and indexes it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Although the skill mentions that operations are logged and stored locally, it does not provide a prominent, plain-language warning near the primary description or command usage that all user inputs may be persistently retained. Users may therefore submit sensitive dataset identifiers, paths, queries, or sample content without appreciating that the information will remain on disk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly stores provided inputs as timestamped records and tracks all actions in history logs, creating a retention channel for potentially sensitive user-supplied data. Because these records are persisted locally, they may later be exposed to other local users, backups, forensic collection, or subsequent export operations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Commands such as ingest, transform, query, and validate are phrased as if they perform substantive data operations, but the documentation indicates they only record or display log entries. This can cause users to enter real data, queries, or workflow details that are then retained, creating confidentiality and trust risks.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages searching and exporting accumulated logs that contain previously recorded inputs, which creates an easy path to surface and redistribute sensitive content that users may not realize was stored. Search and export features materially increase exposure because they turn retained data into accessible summaries or files in common formats.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The help text advertises an export formatter, but the dispatcher defines an earlier export branch that consumes all export invocations as log-writing behavior, preventing the real _export function from being reached. This misleading interface can cause users to provide export targets or data-related arguments that are unexpectedly stored in logs instead of performing the requested action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

At lines 131–135, user-provided input is written verbatim to a persistent local log without notice, and the same pattern repeats across many commands. In this skill's stated dataset-handling context, inputs may contain proprietary data, file paths, tokens, or personally identifiable information, so silent retention materially increases privacy and data-exposure risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.