Back to skill

Security audit

Prism Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed token-risk scanner that calls a PRISM API, with some quality and privacy cautions but no evidence of hidden, destructive, or persistence behavior.

Install only if you are comfortable sending token symbols or contract addresses to the configured PRISM service. Prefer explicit scan requests, review JSON output carefully if using it in automation, and treat results as advisory rather than financial advice.

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/scan.sh:40
Finding
Unescaped Attacker-Controlled Data in JSON and Terminal Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/scan.sh`, lines 40-62 **Vulnerability Type**: Improper output encoding and terminal control-sequence injection **Risk Level**: Medium ### Vulnerable Code ```bash if [ "$JSON_MODE" == "--json" ]; then echo "{\"token\": \"$TOKEN\", \"risk_score\": $risk_score, \"is_copycat\": $is_copycat, \"analyze\": $analyze, \"copycat\": $copycat}" exit 0 fi # Pretty print cat << EOF 🛡️ PRISM Token Scan: $TOKEN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RISK SCORE: $risk_score/100 $bar $risk_level ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ANALYSIS: $(echo "$analyze" | jq -r '.summary // "No summary available"') COPYCAT CHECK: $(if [ "$is_copycat" == "true" ]; then echo "🚨 COPYCAT DETECTED (${similarity}% similar)"; else echo "✅ No copycat detected"; fi) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚠️ DYOR - This is not financial advice EOF ``` ### Technical Analysis The script directly interpolates the user-controlled `TOKEN` value into manually constructed JSON. JSON metacharacters such as quotation marks, backslashes, and control characters are not escaped. Consequently, a crafted token can make `--json` output syntactically invalid or inject additional properties into the resulting object. The same token is printed directly to the terminal in normal output mode. In addition, the `.summary` field returned by the remote PRISM API is extracted with `jq -r` and emitted without filtering terminal control characters. If either source contains ANSI escape sequences or other control characters, the output can alter terminal presentation, conceal preceding content, spoof status messages, or contaminate logs. The shell expansions are quoted or occur within a here-document and are not passed to `eval` or another shell interpreter. Therefore, the reviewed code does not establish shell command injection or local code execution. ### Attack Path #### JSON injection 1. An attacker supplies a crafted token containing JSON delimiters, quotation mar ...[truncated 1854 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Construct JSON with `jq` instead of string concatenation: ```bash jq -n \ --arg token "$TOKEN" \ --argjson risk_score "$risk_score" \ --argjson is_copycat "$is_copycat" \ --argjson analyze "$analyze" \ --argjson copycat "$copycat" \ '{ token: $token, risk_score: $risk_score, is_copycat: $is_copycat, analyze: $analyze, copycat: $copycat }' ``` 2. Validate that API responses are valid JSON before processing them: ```bash if ! jq -e . >/dev/null 2>&1 <<<"$analyze"; then echo "Error: invalid analysis response" >&2 exit 1 fi ``` Apply equivalent validation to `copycat`. 3. Validate input according to supported formats. Permit only expected token-symbol characters or recognized EVM/Solana address formats, and impose a reasonable maximum length. 4. Remove non-printable control characters before displaying user-controlled or remote text. Alternatively, render such characters in an escaped representation rather than sending them directly to a terminal. 5. Validate response field types and ranges. In particular, require `risk_score` and `similarity` to be numeric and constrain risk scores to the documented range before numeric comparisons. 6. Use explicit `curl` failure handling, timeouts, and HTTPS-only behavior, such as `--fail --show-error --max-time`, and terminate safely if an API request or response validation fails. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The documented behavior does not cleanly match the actual capability surface: it relies on a remote API for security judgments and includes additional analysis functions beyond the narrow description. This mismatch is dangerous because agents and users may trust the skill as a local deterministic checker while it can transmit user-supplied token data to an external service and produce opaque results that were not fully disclosed.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises shell-based usage (`./scan.sh ...`) but does not declare any explicit tool scope or permissions boundaries. In an agent setting, undeclared shell capability increases the chance that a host runtime grants broader execution than reviewers expect, enabling command execution or unsafe parameter handling through the wrapper script.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger set includes very generic phrases such as "check {token}" and "analyze {token}", which can match ordinary user requests and cause the skill to run when the user did not explicitly intend a token-security scan. In an agent environment, unintended invocation can misroute user intent, cause unnecessary external API calls, and expose token/user-provided inputs to the configured third-party service.

Static analysis

No suspicious patterns detected.