Back to skill

Security audit

Rugpull

Security checks for vulnerabilities and agentic risk

Overview

The skill says it analyzes blockchain rugpulls, but the inspected artifact is a local note/config tool with persistent file writes, deletion/export commands, and an unsafe config command.

Review carefully before installing. This is not a rugpull-analysis skill as advertised; it behaves like a local note manager that writes under ~/.rugpull, can delete stored entries, and can export copies into the working directory. Avoid using the config command with untrusted input, and do not store sensitive investigative notes in it unless the implementation is fixed and the purpose is accurately documented.

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

Error
Location
scripts/script.sh:145
Finding

Arbitrary Command Execution Through Sed Expression Injection

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 145-148
Vulnerability Type: Shell command injection through an attacker-controlled GNU sed expression
Risk Level: High

Vulnerable Code

bash
if [ -f "$cfg" ] && grep -q "^${key}=" "$cfg" 2>/dev/null; then
    sed -i "s|^${key}=.*|${key}=${val}|" "$cfg"
else
    echo "${key}=${val}" >> "$cfg"
fi

Technical Analysis

The config command interpolates the user-controlled key and val arguments directly into a sed program. Neither argument is validated nor escaped for use in a sed regular expression and replacement expression.

In the update branch, an attacker can include the | delimiter in val to terminate the replacement expression and append GNU sed's e flag. The e flag executes the resulting pattern space through /bin/sh.

For example, if the existing key is x and the supplied value is ;id|e, the generated command is effectively:

bash
sed -i 's|^x=.*|x=;id|e' "$cfg"

When a matching configuration line is processed, GNU sed executes the resulting text x=;id as a shell command. The same technique can execute any command available to the account running the Skill.

The configuration key is also embedded into the sed regular expression without validation. This permits regular-expression manipulation and can cause unintended configuration entries to be selected, although arbitrary command execution through the replacement and e flag is the principal security impact.

Attack Path

  1. The attacker must be able to influence arguments passed to scripts/script.sh config, such as through an Agent request or another caller that exposes the Skill's documented interface.

  2. The attacker creates a configuration key so that the vulnerable update branch will be used:

    bash
    scripts/script.sh config x safe
    
  3. The attacker updates that key with a value that closes th ...[truncated 1524 chars]

Remediation
View remediation

Remediation Suggestions

Do not construct sed programs by directly interpolating untrusted configuration keys or values.

  1. Strictly validate configuration keys. Accept only a limited identifier syntax, for example:

    bash
    if [[ ! "$key" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]]; then
        echo "Invalid configuration key" >&2
        return 1
    fi
    
  2. Replace the sed-based update with a non-evaluating implementation. Write to a securely created temporary file and pass values as data rather than executable syntax. For example, an implementation may read each line, compare its key using shell string operations, and write either the replacement or original line with printf '%s\n'.

  3. Use a secure temporary file in the same directory, set restrictive permissions, and atomically rename it over the original file only after successful generation.

  4. Treat values as opaque data. Use printf '%s=%s\n' "$key" "$val" rather than echo, and reject or explicitly encode newline characters if the configuration format requires one entry per line.

  5. Avoid GNU sed's e functionality entirely for configuration processing. Merely escaping the delimiter is insufficient because regular-expression metacharacters, replacement metacharacters, backslashes, and newlines would all require context-specific handling.

  6. Add regression tests using values containing sed delimiters, backslashes, ampersands, newlines, and strings such as ;id|e. Tests should verify that these inputs are either safely stored as data or rejected and that no external command is executed.

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
99% confidence
Finding

The skill presents itself as a blockchain rugpull-analysis capability, but the documented commands implement a generic local CRUD/file-management tool instead. This mismatch can mislead users and orchestrators into granting trust, invoking the skill in sensitive security-analysis contexts, or allowing filesystem-affecting operations that are unrelated to the declared purpose.

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 blockchain rugpull analysis, but the behavior described is only local entry storage, listing, search, export, and config management. In agent ecosystems, this kind of semantic deception is dangerous because routing, permission decisions, and user trust often rely on metadata, so the skill may be invoked under false assumptions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The top-level documentation repeatedly claims protocol/rugpull/security analysis, while the commands document an unrelated record-management interface. This inconsistency increases the chance of unsafe invocation, accidental data modification, and misuse in environments where security-analysis skills are trusted more than generic file-manipulation tools.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline banner claims the script analyzes rugpull operations, but the code only stores, searches, removes, and exports local entries. False security/functionality claims are dangerous because they mislead operators into trusting outputs or exposing sensitive investigative notes to a tool that does not provide the promised analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The advertised purpose is blockchain rugpull analysis, but the implementation is a generic local note manager with no chain, protocol, or security-analysis logic. This mismatch is dangerous because users may grant trust, install, or execute the skill under false assumptions, creating a deceptive capability surface that can be repurposed for data collection or social engineering.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown advertises remove/export functionality without any warnings, safeguards, or confirmation guidance, despite these actions being destructive or file-writing. In an agent setting, undocumented side effects can lead to accidental data loss or unintended creation of files on disk when the skill is invoked automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The remove command irreversibly deletes stored entries with no confirmation, undo, or warning in help text. In a tool that stores user-supplied notes under a misleading security-analysis brand, this increases the risk of accidental loss of investigative or potentially sensitive local data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The export command writes stored user data to a new file without warning that the data is being copied into another persistent location. This can cause unintended disclosure if users assume the tool is performing analysis rather than materializing potentially sensitive notes into easily shared JSON or CSV files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This shell script modifies files under the user's data directory by editing or appending to config.txt, which is a file write operation. While the script prints a success message after the change, there is no user-facing warning in comments/help text that the command persists configuration changes to disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.