Back to skill

Security audit

Slashing

Security checks for vulnerabilities and agentic risk

Overview

The skill is advertised as blockchain slashing analysis but actually behaves like a persistent local note/config manager with write, delete, export, and unsafe config behavior.

Install only if you intentionally want a local record manager that writes to ~/.slashing and exports files, not if you expect blockchain slashing analysis. Avoid feeding it untrusted values, especially through config or CSV export workflows, until the purpose is corrected and the shell escaping issues are fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/script.sh:143
Finding

Command Injection Through Unsafe GNU sed Expression Construction

Content
View full analysis
/dev/null; then sed -i "s|^${key}=.*|${key}=${val}|" "$cfg" else echo "${key}=${val}" >> "$cfg" fi ``` ### Technical Analysis The `config` command incorporates the user-controlled `key` and `val` arguments directly into a GNU sed program. Shell quoting prevents ordinary shell expansion at the initial command invocation, but it does not prevent sed metacharacters from changing the structure of the generated sed program. An attacker can introduce delimiter characters, regular-expression metacharacters, backslashes, or embedded newlines. On GNU sed, a crafted expression can introduce an additional command, including the `e` command, which executes text through a shell. The unescaped key can also match or alter configuration entries other than the intended literal key. The vulnerable update branch is reachable when `config.txt` already contains a line matching the supplied key. ### Attack Path 1. The attacker invokes the `config` command to create a configuration entry in `$SLASHING_DIR/config.txt`. 2. The attacker invokes `config` again for an existing key, causing execution to enter the `sed -i` update branch. 3. The attacker supplies a crafted key or value containing sed control syntax, such as a delimiter and an additional GNU sed command. 4. The generated sed program is interpreted rather than treating the arguments as literal configuration data. 5. An injected GNU sed `e` instruction invokes a shell command with the privileges of the user running the Skill. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account that invokes the Skill. The attacker can read or modify files accessible to that account, destroy stored data, execute other install ...[truncated 332 chars]
Remediation
View remediation
&2 return 1 } ``` 2. Replace the sed-based update with a parser that compares keys as literal strings and writes results to a securely created temporary file. 3. Create temporary files inside the destination directory with `mktemp`, set restrictive permissions, and atomically replace the configuration using `mv`. 4. Treat values as opaque data rather than executable syntax. If the text format must be retained, explicitly encode newlines and other control characters. 5. Restrict supported keys to documented configuration options rather than accepting arbitrary names. 6. Add tests covering sed delimiters, newlines, backslashes, regular-expression characters, and GNU sed command syntax. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:111
Finding

Spreadsheet Formula Injection in CSV Exports

Content
View full analysis
"$out" while IFS= read -r line; do ts=$(echo "$line" | grep -o '"ts":"[^"]*' | cut -d'"' -f4) c2=$(echo "$line" | grep -o '"cmd":"[^"]*' | cut -d'"' -f4) vl=$(echo "$line" | grep -o '"val":"[^"]*' | cut -d'"' -f4) echo "$ts,$c2,$vl" >> "$out" done < "$DATA_DIR/data.jsonl" ;; ``` ### Technical Analysis The `vl` field originates from entries supplied through the `add` command and is therefore attacker-controlled. It is inserted directly into a CSV row without RFC 4180 quoting, escaping, or spreadsheet-formula neutralization. Values beginning with spreadsheet formula indicators such as `=`, `+`, `-`, or `@` may be treated as formulas when the resulting file is opened in spreadsheet software. Commas, quotes, carriage returns, and newlines can also alter the exported row and column structure. The precise consequences depend on the spreadsheet product and its security settings. Formula evaluation can produce deceptive content, access external resources, expose spreadsheet data, or, in vulnerable and legacy environments, invoke dangerous functionality. ### Attack Path 1. An attacker causes an untrusted entry beginning with a spreadsheet formula character to be stored through `scripts/script.sh add`. 2. A user runs `scripts/script.sh export csv`. 3. The export function writes the malicious value directly into `slashing-export.csv`. 4. The user opens the CSV file in spreadsheet software. 5. The spreadsheet application interprets the attacker-controlled cell as a formula rather than plain text. 6. The formula performs actions allowed by the spreadsheet application's formula engine and security configuration. ### Impact Assessment The direct scope is the spreadsheet application and the user ...[truncated 411 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:10
Finding

Unescaped User Input Corrupts JSONL Storage and Permits Record Injection

Content
View full analysis
> "$DATA_DIR/data.jsonl" } ``` ### Technical Analysis The function manually inserts `cmd` and `val` into a JSON object without applying JSON string escaping. User-controlled quotes, backslashes, control characters, and newlines are consequently written verbatim. A quote can terminate the intended JSON string, while a newline can create additional physical lines in the JSONL file. This allows an attacker to corrupt the stored object or create lines that appear to be independent records. Subsequent commands use line counts and regular-expression parsing rather than a JSON parser, so malformed or injected records can affect listing, searching, statistics, removal, and export behavior. This flaw is primarily a data-integrity issue. The available evidence does not show that injected JSON is evaluated as executable code by the Skill. ### Attack Path 1. The attacker invokes the `add` command with a value containing JSON control characters, quotes, backslashes, or embedded newlines. 2. `_save_entry` writes the value directly into the JSON template. 3. The resulting `data.jsonl` contains malformed JSON or additional attacker-controlled physical lines. 4. Commands such as `list`, `search`, `remove`, `stats`, and `export` process the corrupted file using line-based assumptions. 5. The attacker can create misleading entries, distort entry counts, interfere with line-number removal, or cause invalid exports. ### Impact Assessment The impact is limited to the integrity and reliability of the Skill's local data store and generated output. An attacker able to submit entries can forge apparent record ...[truncated 232 chars]
Remediation
View remediation
> "$DATA_DIR/data.jsonl" ``` 2. Parse records with a JSON parser rather than `grep` and `cut`. 3. Validate every existing JSONL line before processing or exporting it. 4. Reject malformed legacy records and report their line numbers instead of silently interpreting them. 5. Use an atomic, locked write strategy if concurrent invocations are possible. 6. Add tests for double quotes, backslashes, tabs, carriage returns, newlines, Unicode, and other control characters. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a blockchain slashing analysis tool, but its documented behavior is a generic local CRUD utility with persistent storage and export capabilities. This mismatch is dangerous because an agent or user may invoke it under false assumptions, granting filesystem write/delete behavior in contexts that only warrant read-only analytical assistance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation claims blockchain slashing analysis, but the listed commands implement status/add/list/search/remove/export/config operations typical of a note or record manager. In an agent setting, this deceptive framing can cause inappropriate invocation and unintended modification or exfiltration of local data under the guise of domain analysis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest and body describe a slashing-analysis skill, yet the documented behavior is a general-purpose local data management CLI. Such capability misrepresentation undermines trust boundaries and can trick orchestration systems into loading a tool with broader local file manipulation powers than its advertised purpose justifies.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The header comment claims the skill analyzes slashing operations, but no such functionality exists. Misrepresentation at the top of the script can mislead reviewers and users into trusting or invoking the tool in contexts where they may expose sensitive operational data or misunderstand its behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script’s advertised purpose is slashing/protocol analysis, but the implementation is a generic local note/log manager with persistent storage, search, export, deletion, and config editing. This mismatch is dangerous because users may grant trust, permissions, or sensitive inputs under false pretenses, enabling unexpected local data collection and file manipulation that are unrelated to the declared skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The built-in help reinforces the false claim that this tool performs slashing analysis, while the available commands only manage local stored entries and configuration. This increases the risk of deceptive operation because users rely on help text to understand trust boundaries, persistence, and expected behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation guidance is broad and does not clearly bound when the skill should be used versus more specific or safer alternatives. In agentic environments, vague triggers increase the chance that the skill is selected for loosely related tasks, exposing unnecessary write/delete/export capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation advertises add/remove/export functionality without warning that these operations may write, delete, or copy local data. Lack of safety warnings is dangerous because users and agents may treat the skill as informational while it can perform destructive or data-moving actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Configuration changes and persistent local storage are not clearly justified for a slashing-analysis skill and expand the attack surface beyond the stated purpose. Even without code execution shown here, these features normalize hidden state, data retention, and file writes that may surprise users and agents expecting ephemeral analysis.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script creates a persistent data directory and stores command values in a local JSONL file even though that behavior is not justified by the stated slashing-analysis purpose. In this skill context, hidden or unnecessary persistence is risky because users may supply protocol notes, identifiers, or other sensitive content expecting ephemeral analysis rather than retained local storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The remove command deletes stored data immediately by line number without confirmation, backup, or undo support. While this is primarily a safety and integrity issue rather than code execution, it can still cause accidental loss of locally stored information, especially because the tool maintains persistent data unexpectedly for its claimed purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.