Back to skill

Security audit

Solana Sniper Bot

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Solana trading bot, but it asks for live wallet authority and automatic trading while important advertised safeguards are missing or unsafe.

Install only after treating this as experimental live-trading code: use a dedicated low-balance wallet, assume automatic buys can lose the entire funded amount, do not rely on the advertised stop-loss/take-profit or auto-sell behavior, and review/fix transaction signing and validation before running with real funds.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sniper.py:126
Finding

Remote Swap Transaction Is Not Semantically Validated Before Signing and Submission

Content
View full analysis
dict: """Execute swap via Jupiter.""" from solders.keypair import Keypair import base58 keypair = Keypair.from_bytes(base58.b58decode(PRIVATE_KEY)) async with httpx.AsyncClient(timeout=30) as client: resp = await client.post(JUPITER_SWAP, json={ "quoteResponse": quote, "userPublicKey": str(keypair.pubkey()), "wrapAndUnwrapSol": True }) swap_data = resp.json() # Sign and send transaction from solders.transaction import VersionedTransaction import base64 tx_bytes = base64.b64decode(swap_data["swapTransaction"]) tx = VersionedTransaction.from_bytes(tx_bytes) signed = keypair.sign_message(tx.message.serialize()) rpc = get_rpc_url() send_resp = await client.post(rpc, json={ "jsonrpc": "2.0", "id": 1, "method": "sendTransaction", "params": [base64.b64encode(bytes(tx)).decode(), {"skipPreflight": True}] }) return send_resp.json() ``` ### Technical Analysis The Skill treats the serialized transaction returned by the remote Jupiter endpoint as trusted. It decodes the transaction and proceeds toward signing without inspecting its instructions, program IDs, writable accounts, recipients, transfer amounts, output mint, fee recipients, or address lookup tables. TLS reduces ordinary network interception risk, but it does not protect against compromise of the Jupiter service, DNS or certificate trust infrastructure, or an upstream dependency. A compromised service could return a transaction materially different from the requested swap. The use of `"skipPreflight": True` further removes RPC simulation that could otherwise detect some transaction fail ...[truncated 1629 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sniper.py:139
Finding

Computed Transaction Signature Is Never Attached to the Submitted Transaction

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup.sh:1
Finding

Dependency Installation Lacks Package Integrity Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:50
Finding

Documented Risk and Exit Controls Are Not Implemented

Content
View full analysis
50% supply | | Contract age | 10% | < 1 hour | | LLM sentiment | 10% | Negative assessment | Default buy threshold: risk score < 40 ``` ### Technical Analysis The implementation only evaluates mint authority, freeze authority, and holder concentration before incorporating a generic LLM score. It does not retrieve or validate LP lock or burn status, contract verification, contract age, social data, or several other documented risk factors. The script also has no position-monitoring loop, price tracking, sell quote flow, or sell transaction path. `TAKE_PROFIT` and `STOP_LOSS` are loaded and logged but never enforced. Positions exist only in process memory and an append-only trade log. This discrepancy is security-relevant because users are asked to provide a private key and permit unattended purchases based on assurances that material risk controls ...[truncated 1261 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:21
Finding

Setup Documentation Executes a Bash Script with the Python Interpreter

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill promises autonomous risk evaluation, monitoring, portfolio management, and take-profit/stop-loss behavior, but the analyzed behavior reportedly lacks key safety and control features. In an autonomous trading context, this mismatch is dangerous because users may entrust funds based on protections that are not actually implemented, leading to unmanaged exposure and potentially irreversible losses.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 5)May include surrounding context.

sh
set -e
echo "=== Solana Sniper Bot Setup ==="
pip install solana==0.35.0 solders==0.21.0 httpx==0.27.0 aiohttp==3.9.5 python-dotenv==1.0.1 base58==2.1.1
echo "Done. Create .env with SOLANA_PRIVATE_KEY and LLM_API_KEY"

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The bot performs automatic on-chain purchases whenever its internal risk score is below threshold, without any user confirmation, approval workflow, or interactive warning. In the context of an autonomous sniper bot controlling real funds, this is especially dangerous because API manipulation, bad heuristics, or false positives can immediately trigger irreversible purchases of malicious or illiquid tokens.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and requires sensitive capabilities—environment secrets, file deployment steps, and outbound network access—without explicitly declaring a constrained tool scope. In a skill that handles a Solana private key and can place trades, missing capability boundaries increases the chance of overbroad execution, secret exposure, or unintended external actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description says to use the skill when a user wants to "trade memecoins" or "build a Solana trading bot," which are broad intents rather than specific activation triggers. Without tighter scope or exclusion conditions, the skill could be invoked for general crypto discussions or benign trading help beyond sniper-bot use cases.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The code reads SOLANA_PRIVATE_KEY directly from the environment and later uses it to sign transactions, but there is no visible warning, prompt, or explanatory comment alerting the user that a live private key is required. Access to highly sensitive credentials should be explicitly disclosed because misuse or accidental execution can compromise funds.

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/sniper.py (reported line 96)May include surrounding context.

python
Reply with ONLY a number 0.0 to 1.0."""

    async with httpx.AsyncClient(timeout=30) as client:
        resp = await client.post("https://api.anthropic.com/v1/messages",
            headers={"x-api-key": LLM_API_KEY, "anthropic-version": "2023-06-01", "Content-Type": "application/json"},
            json={"model": "claude-3-5-haiku-20241022", "max_tokens": 20, "messages": [{"role": "user", "content": prompt}]})
        data = resp.json()

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code decodes a Jupiter swap transaction, computes a signature, but never applies that signature to the transaction before sending base64-encoded original transaction bytes with skipPreflight enabled. In a trading bot that autonomously places live trades, this can cause failed, malformed, or unpredictable transaction submission behavior and undermines the claim that swaps are safely executed.

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 · references/raydium-pools.md (reported line 4)May include surrounding context.

md
try:
            async with httpx.AsyncClient(timeout=15) as client:
                # Check for new Raydium AMM pools
                resp = await client.get("https://api.raydium.io/v2/ammV3/ammPools")
                pools = resp.json().get("data", [])

                for pool in pools[-20:]:  # Check latest 20

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/sniper.py (reported line 155)May include surrounding context.

python
try:
            async with httpx.AsyncClient(timeout=15) as client:
                # Check for new Raydium AMM pools
                resp = await client.get("https://api.raydium.io/v2/ammV3/ammPools")
                pools = resp.json().get("data", [])

                for pool in pools[-20:]:  # Check latest 20

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest says the bot 'Monitors new token launches on Raydium/Jupiter,' implying launch discovery across both venues. In the implementation, new-pool monitoring is performed only by polling Raydium's AMM pools API, while Jupiter is used later only for quote and swap execution, not launch monitoring.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.