Back to skill

Security audit

Bytesagain Crypto Tracker Cn

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly behaves like a crypto market tracker, but it also ships under-disclosed local finance tracking and financial-data storage behavior users should review before installing.

Install only if you are comfortable with a crypto CLI that writes holdings, alerts, and some finance-history data to local files and contacts public crypto APIs. Avoid entering sensitive transaction descriptions or portfolio details on shared machines unless file permissions are tightened, and review why the unrelated scripts/script.sh finance tracker is included.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/crypto.sh:176
Finding

Portfolio and Alert Data Stored with Unrestricted Default Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/crypto.sh, lines 176-206 and 256-278
Vulnerability Type: Insecure local storage of sensitive financial data
Risk Level: Medium

Vulnerable Code

Portfolio storage:

python
DATA_DIR = os.path.expanduser("~/.crypto-tracker")
PF = os.path.join(DATA_DIR, "portfolio.json")
if not os.path.isdir(DATA_DIR):
    os.makedirs(DATA_DIR)
if not os.path.isfile(PF):
    with open(PF, "w") as f: json.dump([], f)

with open(PF) as f:
    portfolio = json.load(f)

sub = os.environ.get("_PF_SUB", "list")
args = os.environ.get("_PF_ARGS", "").split()

if sub == "add":
    if len(args) < 3:
        print("Usage: crypto.sh portfolio add COIN AMOUNT BUY_PRICE")
        sys.exit(1)
    coin, amt, price = args[0].upper(), float(args[1]), float(args[2])
    portfolio.append({"coin": coin, "amount": amt, "buy_price": price})
    with open(PF, "w") as f: json.dump(portfolio, f, indent=2)
    print("Added: {} x {} @ ${}".format(coin, amt, price))

elif sub == "remove":
    coin = " ".join(args).strip().upper()
    before = len(portfolio)
    portfolio = [p for p in portfolio if p["coin"] != coin]
    with open(PF, "w") as f: json.dump(portfolio, f, indent=2)

Alert storage:

python
DATA_DIR = os.path.expanduser("~/.crypto-tracker")
AF = os.path.join(DATA_DIR, "alerts.json")
if not os.path.isdir(DATA_DIR):
    os.makedirs(DATA_DIR)
if not os.path.isfile(AF):
    with open(AF, "w") as f: json.dump([], f)

with open(AF) as f:
    alerts = json.load(f)

sub = os.environ.get("_AL_SUB", "list")
args = os.environ.get("_AL_ARGS", "").split()

if sub == "add":
    if len(args) < 3:
        print("Usage: crypto.sh alert add BTC above 70000")
        sys.exit(1)
    coin, direction, target = args[0].upper(), args[1], float(args[2])
    alerts.append({"coin": coin, "direction": direction, "target": target})
    with open(AF, 
...[truncated 2314 chars]
Remediation
View remediation

Remediation Suggestions

  • Create the data directory with mode 0700 and explicitly enforce that mode on existing directories:

    python
    os.makedirs(DATA_DIR, mode=0o700, exist_ok=True)
    os.chmod(DATA_DIR, 0o700)
    
  • Create portfolio and alert files with mode 0600, using low-level flags that prevent following symbolic links where supported:

    python
    flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
    if hasattr(os, "O_NOFOLLOW"):
        flags |= os.O_NOFOLLOW
    fd = os.open(PF, flags, 0o600)
    
  • Validate existing targets with os.lstat() and reject symbolic links or non-regular files before reading or writing.

  • Correct permissions on existing files with os.chmod(path, 0o600).

  • Write updates to a restricted temporary file in the same directory, flush and synchronize it, and then use os.replace() for atomic replacement.

  • Consider storing only the minimum information required and clearly document that portfolio and alert information is persisted locally.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:5
Finding

Undeclared Financial Activity Logging Uses Permissive Default Permissions

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 5-7, 26-30, and 82-92
Vulnerability Type: Unexpected retention and insecure storage of user-supplied financial information
Risk Level: Medium

Vulnerable Code

Storage initialization:

bash
DATA_DIR="${CRYPTO_TRACKER_CN_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/crypto-tracker-cn}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"

Logging function and transaction handling:

bash
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

cmd_track() {
    echo "  Transaction: $1 Amount: ${2:-0}"
    _log "track" "${1:-}"
}

Logging is also performed by operations that appear read-only:

bash
cmd_balance() {
    echo "  Balance: check $DATA_DIR/ledger"
    _log "balance" "${1:-}"
}

cmd_summary() {
    echo "  Period: $(date +%Y-%m) | Income: $0 | Expenses: $0"
    _log "summary" "${1:-}"
}

cmd_history() {
    [ -f "$DB" ] && tail -20 "$DB" || echo "No history"
    _log "history" "${1:-}"
}

Technical Analysis

This secondary script presents itself as a financial transaction, budget, and spending tracker, despite the skill being declared primarily as a real-time cryptocurrency market tracker. It records user-supplied transaction descriptions in history.log and logs invocations of read-like commands such as balance, summary, and history.

The logging side effect is not disclosed in the command descriptions. Additionally, mkdir -p and shell append redirection create the directory and log file according to the process umask rather than enforcing private permissions. Under common settings, this can result in a 0755 directory and a 0644 history file.

The configurable CRYPTO_TRACKER_CN_DIR variable can place the data in another location. If it points to a shared or otherwise insufficiently protected directory, the chance of disclosure or tampering ...[truncated 1342 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove scripts/script.sh if its general financial-ledger functionality is not part of the declared skill.

  • If retained, clearly document what data is recorded, where it is stored, and which commands produce log entries.

  • Do not log read-only operations unless there is a documented and necessary audit requirement.

  • Minimize transaction logs and avoid storing free-form descriptions where possible.

  • Enforce private permissions before creating files:

    bash
    umask 077
    mkdir -p -- "$DATA_DIR"
    chmod 700 -- "$DATA_DIR"
    touch -- "$DATA_DIR/history.log"
    chmod 600 -- "$DATA_DIR/history.log"
    
  • Validate that the configured data directory is owned by the current user, is not a symbolic link, and is not writable by group or other users.

  • Use printf rather than echo for predictable logging, and use -- where supported when passing paths to utilities.

  • Provide a command to inspect, export, and securely delete retained history.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (34)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

This finding indicates an even stronger description-behavior mismatch: the skill claims extensive real-time crypto analytics, but the detected implementation reportedly does not perform those functions and instead behaves like a generic local finance tracker. Such deceptive or inaccurate packaging can mislead users into trusting a tool for sensitive financial decisions while it performs undisclosed local logging and fails to deliver the promised functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding indicates an even stronger description-behavior mismatch: the skill claims extensive real-time crypto analytics, but the detected implementation reportedly does not perform those functions and instead behaves like a generic local finance tracker. Such deceptive or inaccurate packaging can mislead users into trusting a tool for sensitive financial decisions while it performs undisclosed local logging and fails to deliver the promised functionality.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 21)May include surrounding context.

sh
# Usage: crypto.sh price bitcoin ethereum solana
    ids="${*:-bitcoin,ethereum,solana}"
    ids=$(echo "$ids" | tr ' ' ',')
    curl -s "$GECKO/simple/price?ids=$ids&vs_currencies=usd&include_24hr_change=true&include_market_cap=true" | python3 -c '
import sys, json
d = json.load(sys.stdin)
hdr = "{:<12} {:>12} {:>8} {:>14}".format("Coin","Price","24h","MCap")

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 40)May include surrounding context.

sh
market)
    # Global market overview
    curl -s "$GECKO/global" | python3 -c "
import sys, json
d = json.load(sys.stdin)['data']
mcap = d['total_market_cap']['usd']

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 61)May include surrounding context.

sh
;;

  trending)
    curl -s "$GECKO/search/trending" | python3 -c "
import sys, json
d = json.load(sys.stdin)
print('🔥 Trending Coins')

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 81)May include surrounding context.

sh
;;

  fear)
    curl -s "$FNG/" | python3 -c "
import sys, json
d = json.load(sys.stdin)['data'][0]
val = int(d['value'])

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 98)May include surrounding context.

sh
;;

  defi)
    curl -s "$LLAMA/protocols" | python3 -c "
import sys, json
protocols = json.load(sys.stdin)
protocols.sort(key=lambda x: x.get('tvl', 0), reverse=True)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 115)May include surrounding context.

sh
;;

  memes)
    curl -s "$GECKO/coins/markets?vs_currency=usd&category=meme-token&order=volume_desc&per_page=15&page=1" | python3 -c "
import sys, json
coins = json.load(sys.stdin)
print('🐕 Top Meme Coins by Volume')

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/crypto.sh (reported line 138)May include surrounding context.

sh
info)
    # Detailed info on a specific coin
    coin="${1:-bitcoin}"
    curl -s "$GECKO/coins/$coin" | python3 -c "
import sys, json
d = json.load(sys.stdin)
name = d.get('name', '?')

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill metadata advertises a cryptocurrency market tracker, but the script actually implements a personal finance and budgeting CLI. This kind of capability mismatch is dangerous because users may authorize or invoke the skill expecting market data, while it instead handles and stores sensitive transaction-like information locally, violating user expectations and trust boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The inline help and comments describe a financial tracking utility, directly conflicting with the manifest's crypto-market-tracking claims. This discrepancy indicates deceptive or at least misleading packaging, which can cause users and reviewers to underestimate the sensitivity of the data processed and the actual behavior of the skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises capabilities that static analysis associates with environment access, file writes, networking, and shell execution, but the manifest does not declare any explicit tool scope or permissions. This creates an overbroad and non-transparent trust boundary, making it harder to constrain or review what the skill can access if invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The invocation text is broad enough to match many ordinary crypto-related queries, which can cause the skill to trigger outside narrow user intent. When combined with undeclared capabilities or behavior mismatches, over-triggering increases the chance that the skill is run in contexts where users did not expect file, shell, or network activity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire guide is presented only in Chinese, with no indication that language is optional or user-selectable. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is documented and justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 8)May include surrounding context.

sh
set -euo pipefail

GECKO="https://api.coingecko.com/api/v3"
LLAMA="https://api.llama.fi"
FNG="https://api.alternative.me/fng"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 327)May include surrounding context.

sh
set -euo pipefail

GECKO="https://api.coingecko.com/api/v3"
LLAMA="https://api.llama.fi"
FNG="https://api.alternative.me/fng"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 461)May include surrounding context.

sh
set -euo pipefail

GECKO="https://api.coingecko.com/api/v3"
LLAMA="https://api.llama.fi"
FNG="https://api.alternative.me/fng"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 539)May include surrounding context.

sh
set -euo pipefail

GECKO="https://api.coingecko.com/api/v3"
LLAMA="https://api.llama.fi"
FNG="https://api.alternative.me/fng"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 10)May include surrounding context.

sh
GECKO="https://api.coingecko.com/api/v3"
LLAMA="https://api.llama.fi"
FNG="https://api.alternative.me/fng"

cmd="${1:-help}"
shift 2>/dev/null || true

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description focuses on market tracking, prices, rankings, DeFi data, indicators, and gas queries. In addition to those read-oriented tracking features, the code implements stateful portfolio and alert management by creating a ~/.crypto-tracker directory and writing JSON files for holdings and alerts, which goes beyond simple market-data tracking.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The portfolio feature silently persists sensitive financial holdings to ~/.crypto-tracker/portfolio.json without prior disclosure or permission gating. On shared systems or environments with weak home-directory protections, this can expose a user's asset positions and purchase prices to other local users, backups, or monitoring tools.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
71% confidence
Finding

When listing the portfolio, the script transmits coin identifiers derived from the user's locally stored holdings to CoinGecko without explicit disclosure. Even though only symbols/IDs are sent and not amounts or buy prices, this still reveals part of the user's investment interests to a third party.

Content

Scanner excerpt · scripts/crypto.sh (reported line 212)May include surrounding context.

sh
coins = list(set(p["coin"].lower() for p in portfolio))
    ids = ",".join(coins)
    try:
        url = "https://api.coingecko.com/api/v3/simple/price?ids={}&vs_currencies=usd".format(ids)
        data = json.loads(urlopen(url).read().decode())
    except:
        data = {}

External Transmission

Medium
Category
Data Exfiltration
Confidence
68% confidence
Finding

The alert check feature sends alert coin identifiers to CoinGecko to fetch prices, disclosing a user's watchlist to a third party. This is lower sensitivity than full portfolio data, but still leaks behavioral/trading-interest metadata without explicit notice.

Content

Scanner excerpt · scripts/crypto.sh (reported line 293)May include surrounding context.

sh
coins = list(set(a["coin"].lower() for a in alerts))
    ids = ",".join(coins)
    try:
        url = "https://api.coingecko.com/api/v3/simple/price?ids={}&vs_currencies=usd".format(ids)
        data = json.loads(urlopen(url).read().decode())
    except:
        print("API error")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The compare command uses Chinese-only argument error messages, and other commands such as learn, rsi, ma, defi-yield, and gas include Chinese-language defaults or advisory text. This imposes a specific language on users without opt-in or documented locale scope, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/crypto.sh (reported line 689)May include surrounding context.

sh
# Try etherscan-compatible free API first (no key needed for basic)
apis = [
    ("https://api.etherscan.io/api?module=gastracker&action=gasoracle", "etherscan"),
    ("https://gas.api.infura.io/v3/gas/feeHistory?chain=ethereum&blockCount=1", "infura"),
]

Static analysis

No suspicious patterns detected.