Back to skill

Security audit

Token Scout

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its token-analysis purpose, but one included shell script has a confirmed argument-handling bug that can run unintended local commands if given a malicious page-count argument.

Install only if you are comfortable with shell scripts that query third-party token APIs, and avoid running small-cap-scanner.sh with arguments from untrusted sources until its numeric parameters are strictly validated. Treat the token output as research data, not trading 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

Error
Location
scripts/small-cap-scanner.sh:10
Finding
Arbitrary Command Execution Through Unvalidated Arithmetic Input<![CDATA[ ## Vulnerability Details **File Location**: `scripts/small-cap-scanner.sh`, lines 10-22 **Vulnerability Type**: Bash arithmetic-expression injection **Risk Level**: High ```bash PAGES="${5:-3}" # Number of pages to scan echo "🔍 Ori Small-Cap Scanner" echo "═══════════════════════════════════════════════════════════════════════════════" echo "Chain: $CHAIN | Max FDV: \$$MAX_FDV | Min Liquidity: \$$MIN_LIQUIDITY" echo "Min Buy Ratio: $MIN_BUY_RATIO | Pages: $PAGES" echo "───────────────────────────────────────────────────────────────────────────────" echo "" OPPORTUNITIES=() TOTAL_SCANNED=0 for ((page=1; page<=PAGES; page++)); do ``` ### Technical Analysis The fifth positional argument is assigned directly to `PAGES` without validating that it contains only a bounded positive integer. The value is subsequently evaluated in the Bash arithmetic expression: ```bash ((page=1; page<=PAGES; page++)) ``` Bash recursively interprets variable values used in arithmetic contexts as arithmetic expressions. An attacker-controlled value can therefore contain array-subscript syntax with command substitution. The command substitution may be executed by Bash while evaluating the loop condition. A representative proof-of-concept argument is: ```bash ./scripts/small-cap-scanner.sh base 5000000 10000 1.3 \ 'x[$(touch /tmp/token-scout-poc)]' ``` When `PAGES` is evaluated as part of the loop condition, the embedded command substitution can create `/tmp/token-scout-poc`. A malicious payload could replace `touch` with another command available to the invoking process. Although several other script arguments are also accepted without strict validation, the confirmed command-execution sink is the use of `PAGES` in the Bash arithmetic loop. ### Attack Path 1. An attacker supplies or recommends a crafted fifth argument to `small-cap-scanner.sh`. 2. The script stores the argument unchanged in `PAGES`. 3. Execution reaches the arithmetic `for` loop at l ...[truncated 1247 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Validate every argument before it reaches an arithmetic context. Require `PAGES` to be a decimal integer and impose a reasonable upper bound: ```bash PAGES="${5:-3}" if ! [[ "$PAGES" =~ ^[0-9]+$ ]] || (( PAGES < 1 || PAGES > 100 )); then echo "Error: pages must be an integer between 1 and 100" >&2 exit 2 fi ``` After validation, copy the value into an explicitly numeric variable and use that variable in the loop: ```bash PAGE_LIMIT=$((10#$PAGES)) for ((page=1; page<=PAGE_LIMIT; page++)); do # Scan page done ``` The `10#` prefix forces decimal interpretation and avoids accidental octal handling for values with leading zeroes. Apply equivalent allow-list validation to all externally supplied parameters: - Restrict `CHAIN` to the documented supported network identifiers. - Require `MAX_FDV` and `MIN_LIQUIDITY` to be bounded non-negative integers. - Require `MIN_BUY_RATIO` to match a narrowly defined decimal-number format. - Reject unexpected extra arguments. - Avoid placing untrusted text directly into Bash arithmetic expressions or dynamically evaluated `bc` programs. For additional hardening, enable strict shell behavior after argument validation: ```bash set -euo pipefail ``` Add regression tests that pass arithmetic metacharacters, array syntax, command substitutions, negative values, excessively large values, and non-numeric strings. The tests should verify that all such inputs are rejected before the loop condition is evaluated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Ae1

High
Category
analysis-evasion
Content
scripts/small-cap-scanner.sh base
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
scripts/small-cap-scanner.sh base
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises executable shell-based workflows via its scripts and metadata requirements (`curl`, `jq`) but does not declare any tool scope such as `permissions` or `allowed-tools`. In an agent ecosystem, this can cause the runtime or reviewer to underestimate the skill's execution capabilities, increasing the risk of unintended command execution or over-broad tool access when the skill is invoked.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The description contains multiple broad trigger phrases such as `find tokens`, `token analysis`, and `small cap`, which are common enough to match loosely related user requests. Over-broad activation can route unrelated conversations into a shell-capable skill that fetches external data, creating unnecessary execution and network exposure and increasing the chance of unsafe or unintended actions.

External Transmission

Medium
Category
Data Exfiltration
Content
# Fetch trending pools
fetch_trending() {
    curl -s "https://api.geckoterminal.com/api/v2/networks/${NETWORK}/trending_pools?page=1"
}

# Parse and analyze pools
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Fetch trending pools
fetch_trending() {
    curl -s "https://api.geckoterminal.com/api/v2/networks/${NETWORK}/trending_pools?page=1"
}

# Parse and analyze pools
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Fetch trending pools
fetch_trending() {
    curl -s "https://api.geckoterminal.com/api/v2/networks/${NETWORK}/trending_pools?page=1"
}

# Parse and analyze pools
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Fetch trending pools
fetch_trending() {
    curl -s "https://api.geckoterminal.com/api/v2/networks/${NETWORK}/trending_pools?page=1"
}

# Parse and analyze pools
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The script formats its completion timestamp using `TZ='America/Los_Angeles'` and labels it `PST`, which forces a specific locale/timezone choice in natural-language output for all users. This can violate language/locale policy requirements when no user choice or region-specific justification is provided.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
The completion message forces the timestamp to use `America/Los_Angeles` and labels it `PST`, regardless of the user's actual locale or preferences. This is a natural-language locale policy issue because the script presents a fixed regional setting without offering choice or documenting why that locale is required.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This shell script sends the provided token address and selected network to geckoterminal.com via curl, which is a network operation covered by the warning requirement for code files. Although the script prints that it is "looking up" the token, it does not clearly disclose that the input will be transmitted to a third-party service or document that behavior in comments/docstrings.