Back to skill

Security audit

Dataview

Security checks for vulnerabilities and agentic risk

Overview

DataView is presented as a CSV/JSON exploration skill, but its artifacts describe and attempt to implement a persistent local activity logger for user-entered data commands.

Install only if you want a local activity log of data-operation notes, not a real CSV/JSON query tool. Do not enter secrets, proprietary data snippets, or sensitive queries unless you are comfortable with them being stored in plaintext under ~/.local/share/dataview and potentially exported or searched 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:6
Finding

Plaintext Data Logs Are Created Without Restrictive Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh:6-7 and scripts/script.sh:130-302
Vulnerability Type: Insecure local storage permissions
Risk Level: Medium

Vulnerable Code

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

User-controlled content is subsequently appended to files in this directory. A representative write operation is:

bash
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 "  [Dataview] ingest: $input"
echo "  Saved. Total ingest entries: $total"
_log "ingest" "$input"

The same storage pattern is repeated for the other data commands between lines 130 and 302.

Technical Analysis

The script creates ~/.local/share/dataview and its log files without explicitly setting restrictive permissions. Consequently, access permissions are determined by the invoking process's umask. Under a common 022 umask, the directory may be created with mode 0755 and log files with mode 0644, allowing other local users to traverse the directory and read the stored records.

Command arguments are retained indefinitely as plaintext. These arguments may contain dataset names, query text, filters, schema information, profile details, or other sensitive operational metadata. The script also records content in history.log, increasing the number of files in which user input may be exposed.

No remote exploitation or privilege escalation was identified. Exploitation requires access through another local account or process that can read files allowed by the resulting permissions.

Attack Path

  1. A user runs a command such as dataview query or dataview ingest with sensitive content.
  2. The script creates the data directory and log files using permissions inherited from the user's umask.
  3. With a permissive umask, the generated log ...[truncated 851 chars]
Remediation
View remediation

Remediation Suggestions

  1. Set a restrictive process umask before creating or writing any storage:

    bash
    umask 077
    DATA_DIR="${HOME}/.local/share/dataview"
    mkdir -p -- "$DATA_DIR"
    chmod 700 -- "$DATA_DIR"
    
  2. Ensure every existing and newly created log file has mode 0600:

    bash
    touch -- "$DATA_DIR/history.log"
    chmod 600 -- "$DATA_DIR/history.log"
    

    Apply the same protection to all command logs and exported files.

  3. Refuse to write through symbolic links. Before opening a destination, verify that it is either absent or a regular file owned by the current user and is not a symbolic link.

  4. Use safer file creation patterns that atomically enforce permissions, rather than relying only on the environment's umask.

  5. Add retention and deletion commands so users can remove sensitive history, and document that command arguments are stored locally in plaintext.

  6. Avoid recording secrets or complete source-data contents. Where feasible, redact sensitive fields or store only non-sensitive summaries.

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a CSV/JSON exploration tool, but the documented behavior is a persistent local logger that stores user-provided inputs and exposes search/export/history functions over those logs. This mismatch is dangerous because users may provide sensitive dataset names, queries, filters, or operational notes under the assumption they are only inspecting files, when the skill instead retains and republishes that information locally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest advertises data-file inspection, but the documentation describes activity tracking and local storage of user inputs instead. In a security context, deceptive capability descriptions increase the risk of inadvertent disclosure because operators may feed sensitive data references or analysis content into a tool that silently records and later exports them.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documented commands mostly record arbitrary inputs into per-command log files and provide search, export, recent-history, and status operations over those logs, rather than operating on CSV/JSON contents. This broad logging surface is dangerous because it can accumulate sensitive operational details and make them easy to retrieve or export, contrary to the user's expectation of transient data inspection.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation and command names present the program as a legitimate data-processing toolkit, but the code largely functions as a local input logger. This deceptive presentation increases the chance that users will submit sensitive material they would not otherwise disclose, making the behavior materially riskier than a plainly labeled logging utility.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill claims to explore and query CSV/JSON data, but the implementation instead captures arbitrary user inputs and stores them persistently. This mismatch is dangerous because users may provide file paths, queries, dataset snippets, credentials, or other sensitive content under the assumption the tool is performing local data inspection rather than building an activity log.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level documentation contradicts the stated purpose by describing a command-line logging toolkit rather than a data exploration tool. While this is primarily a transparency and trust issue, it has security implications because users can be misled into invoking the skill in sensitive workflows where stored command history and exports create unintended data exposure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script creates a persistent local data store and appends user activity to history and per-command log files even though that behavior is not necessary for a data-view/query utility. Persistent capture of all inputs can expose sensitive queries, filenames, data fragments, or tokens to other local processes or future exports.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool not only records user inputs persistently but also includes built-in commands to search, reveal recent activity, and export the accumulated contents. That combination turns silent collection into easy retrieval and exfiltration of prior user activity, increasing the practical harm if sensitive inputs are ever entered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

At this code path, arbitrary user input is written directly to a persistent log without warning, notice, or consent. In a skill intended for inspecting datasets, users may reasonably enter sensitive record content or proprietary queries, so silent retention creates an avoidable privacy and data exposure risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.