Back to skill

Security audit

Pumpfun Agent Integration

Security checks for vulnerabilities and agentic risk

Overview

The skill is a payment bot scaffold, but its template contradicts its own safety rules by storing wallet private keys locally and signing blockchain transactions from the server.

Treat this as Review before installation. Do not use it with real funds or production Telegram users unless it is redesigned to avoid server-side private key custody and server-side signing, removes the unused treasury private key, enforces secure service-to-service transport, fixes vulnerable dependencies, and clearly documents the payment trust model.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
assets/template/src/server.cjs:42
Finding
Customer Wallet Private Keys Stored in Plaintext<![CDATA[ ## Vulnerability Details **File Location**: `assets/template/src/server.cjs:42-48, 91-101, 215`; `assets/template/src/server.js:42-48, 91-101, 189` **Vulnerability Type**: Plaintext storage of cryptographic private keys **Risk Level**: High ### Vulnerable Code ```js CREATE TABLE IF NOT EXISTS deposit_wallets ( telegram_user_id TEXT PRIMARY KEY, deposit_pubkey TEXT NOT NULL, deposit_secret_b58 TEXT NOT NULL, created_at INTEGER NOT NULL ); ``` ```js function getOrCreateDepositWallet(telegramUserId) { ensureUser(telegramUserId); const row = db.prepare('SELECT deposit_pubkey, deposit_secret_b58 FROM deposit_wallets WHERE telegram_user_id=?') .get(telegramUserId); if (row) return row; // DEMO: generate a new keypair per user and store secret in sqlite const kp = Keypair.generate(); const secretB58 = bs58.encode(kp.secretKey); db.prepare('INSERT INTO deposit_wallets (telegram_user_id, deposit_pubkey, deposit_secret_b58, created_at) VALUES (?,?,?,?)') .run(telegramUserId, kp.publicKey.toBase58(), secretB58, Date.now()); return { deposit_pubkey: kp.publicKey.toBase58(), deposit_secret_b58: secretB58 }; } ``` ```js const payerKeypair = Keypair.fromSecretKey( bs58.decode(w.deposit_secret_b58) ); ``` ### Technical Analysis The application generates a Solana keypair for each Telegram user and stores the complete secret key in the SQLite database as a Base58 string. Base58 is a reversible representation and provides no confidentiality or integrity protection. The implementation does not establish restrictive database file permissions, encrypt individual private keys, use an operating-system key store, or delegate signing to a hardware-backed key management service. Consequently, access to `demo.db`, a database backup, or a filesystem snapshot is sufficient to recover every stored deposit-wallet private key. This custodial key storage is also inconsistent with the Skill's declared rule that private keys must never be handle ...[truncated 885 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove server-generated custodial deposit keypairs and require users to sign transactions through their own wallets. 2. Return unsigned payment instructions or transactions to the client, then verify the submitted transaction server-side. 3. If custodial signing is an unavoidable business requirement: - Store keys in a dedicated KMS, HSM, or encrypted keystore. - Use envelope encryption with independently managed encryption keys. - Restrict signing policies by destination, amount, and transaction type. - Apply restrictive filesystem and database permissions. - Prevent private keys from entering logs, backups, crash dumps, or monitoring data. - Implement key rotation and a documented incident-response process. 4. Explicitly document the custodial security model and obtain informed user consent. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
assets/template/src/server.cjs:129
Finding
Server Signs Transactions on Behalf of Users Contrary to Declared Safety Rules<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:29-30`; `references/PUMP_TOKENIZED_AGENTS.md:7-9`; `assets/template/src/server.cjs:129-136`; `assets/template/src/server.js:125-134` **Vulnerability Type**: Excessive signing authority and violation of the declared non-custodial trust boundary **Risk Level**: High ### Vulnerable Code The Skill declares: ```md - Never log or output private keys / secret key material. - Never sign transactions on behalf of the user. ``` The local integration reference similarly states: ```md - Build accept-payment instructions via `buildAcceptPaymentInstructions`. - User signs client-side; server verifies payment server-side via `validateInvoicePayment`. - Never handle or log private keys. ``` The delivered server instead signs and broadcasts the transaction: ```js const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed'); const tx = new Transaction({ recentBlockhash: blockhash, feePayer: payerKeypair.publicKey }); tx.add(...ixs); tx.sign(payerKeypair); const sig = await connection.sendRawTransaction(tx.serialize(), { skipPreflight: false, preflightCommitment: 'confirmed', }); await connection.confirmTransaction( { signature: sig, blockhash, lastValidBlockHeight }, 'confirmed' ); ``` The alternate implementation contains the same behavior: ```js const tx = new Transaction({ recentBlockhash: blockhash, feePayer: depositKeypair.publicKey }); tx.add(...ixs); // Sign with the deposit wallet (server-controlled) tx.sign(depositKeypair); const sig = await connection.sendRawTransaction(tx.serialize(), { skipPreflight: false, preflightCommitment: 'confirmed', }); ``` ### Technical Analysis The implemented `/fund-and-credit` workflow grants the server unilateral signing authority over user-associated deposit wallets. This is not an incidental capability: the service reconstructs a private key, builds payment instructions, signs the transaction, and sends i ...[truncated 1426 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `tx.sign(payerKeypair)` and all server-side reconstruction of user-associated keypairs. 2. Generate unsigned transaction instructions server-side and return them to a client wallet for review and signing. 3. Require explicit user authorization for the exact amount, recipient, token mint, memo, and validity period. 4. Accept the resulting transaction signature and verify it server-side with `validateInvoicePayment` before granting credits or delivering service. 5. Enforce an allowlist of expected Solana programs and validate every generated instruction before presenting it to the user. 6. Add tests that fail if the server imports or invokes private-key signing operations. 7. Update documentation and implementation together so the declared trust model matches actual behavior. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
assets/template/src/server.cjs:20
Finding
Unused Treasury Private Key Is Required and Loaded into the Web Process<![CDATA[ ## Vulnerability Details **File Location**: `assets/template/src/server.cjs:20-34`; `assets/template/src/server.js:20-34`; `assets/template/README.md:7-11` **Vulnerability Type**: Unnecessary collection and loading of high-value secret material **Risk Level**: Medium ### Vulnerable Code ```js const envSchema = z.object({ SOLANA_RPC_URL: z.string().url(), AGENT_TOKEN_MINT_ADDRESS: z.string().min(32), CURRENCY_MINT: z.string().min(32), LAMPORTS_PER_CREDIT: z.coerce.number().int().positive(), TREASURY_SECRET_KEY_BASE58: z.string().min(40), PORT: z.coerce.number().int().positive().default(3033), API_TOKEN: z.string().min(16), DB_PATH: z.string().default('./demo.db'), }); const env = envSchema.parse(process.env); const treasury = (() => { const secret = bs58.decode(env.TREASURY_SECRET_KEY_BASE58); return Keypair.fromSecretKey(secret); })(); ``` The setup guide instructs operators to provide the unnecessary secret: ```md cp .env.example .env # edit .env and set: # - TREASURY_SECRET_KEY_BASE58 # - API_TOKEN npm start ``` ### Technical Analysis The server requires a treasury secret key at startup, decodes it, and constructs a live `Keypair`. The resulting `treasury` object is not used by the payment, verification, balance, or credit workflows shown in either server implementation. Requiring an unused treasury key violates least privilege. It exposes high-value secret material to the environment and memory of an Internet-adjacent application process without providing any functional benefit. Even if the application does not deliberately transmit or log the key, process compromise, environment inspection, crash diagnostics, debugging tools, or future code changes can expose it. ### Attack Path 1. An operator follows the README and places a treasury private key in the application's environment. 2. The web process parses and decodes the secret at startup. 3. An attacker compromises the process, obtains environment-reading access, or ...[truncated 500 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `TREASURY_SECRET_KEY_BASE58` from the environment schema and setup documentation. 2. Delete construction of the unused `treasury` keypair. 3. Ensure the web and Telegram processes receive only credentials required for their immediate responsibilities. 4. If future functionality genuinely requires treasury signing: - Isolate signing in a separate least-privilege service. - Use an HSM or managed KMS rather than an environment variable. - Restrict allowed transaction programs, recipients, assets, and amounts. - Require explicit authorization or multi-party approval for high-value transfers. 5. Rotate any treasury key that has already been deployed through this template if its exposure cannot be confidently ruled out. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
assets/template/src/telegram-bot.cjs:5
Finding
Billing Bearer Credential Can Be Sent to an Arbitrary Plaintext HTTP Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `assets/template/src/telegram-bot.cjs:5-20`; `assets/template/src/standalone-telegram.cjs:6-21` **Vulnerability Type**: Sensitive credential transmission without enforced transport security **Risk Level**: Medium ### Vulnerable Code ```js const envSchema = z.object({ BILLING_URL: z.string().url().default('http://127.0.0.1:3033'), BILLING_TOKEN: z.string().min(16), LAMPORTS_PER_CREDIT: z.coerce.number().int().positive().default(100000), }); const env = envSchema.parse(process.env); async function billing(path, body) { const res = await fetch(`${env.BILLING_URL}${path}`, { method: 'POST', headers: { 'content-type': 'application/json', 'x-api-token': env.BILLING_TOKEN, }, body: JSON.stringify(body), }); if (!res.ok) { const text = await res.text().catch(() => ''); throw new Error(`billing ${path} failed: ${res.status} ${text}`); } return res.json(); } ``` The same request construction is present in both Telegram implementations. ### Technical Analysis `z.string().url()` validates URL syntax but permits both HTTP and HTTPS and imposes no destination restrictions. Every billing request sends a reusable bearer credential in the `x-api-token` header. The default loopback URL is acceptable for a strictly local deployment. However, operators can configure a remote `http://` endpoint, causing the shared token and associated Telegram user identifiers to cross the network without TLS. A malicious or incorrectly configured endpoint can also directly capture the credential. The network transmission is necessary for the Telegram bot to authenticate to a separate billing service, but unrestricted plaintext transport exceeds the minimum secure privilege and confidentiality requirements. ### Attack Path 1. The bot is configured with a remote `http://` value in `BILLING_URL`. 2. The bot sends `BILLING_TOKEN` in the `x-api-token` header with each request. 3. A networ ...[truncated 643 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require `https:` for every non-loopback billing URL. 2. Permit plaintext HTTP only when the parsed hostname is exactly a verified loopback address such as `127.0.0.1`, `::1`, or `localhost`. 3. Reject URLs containing unexpected credentials, fragments, or unsupported protocols. 4. Use independently scoped credentials for each bot deployment rather than one shared administrative token. 5. Prefer short-lived, rotatable service credentials and implement revocation. 6. Consider mutual TLS or request signing between the bot and billing service. 7. Restrict the billing service at the network layer so it is reachable only by authorized workloads. 8. Avoid including upstream response bodies in thrown errors unless they are sanitized, because remote services may return sensitive content. ]]>

T08 · Insecure Dependencies

Warning
Location
references/PUMP_TOKENIZED_AGENTS.md:11
Finding
Mutable External Skill Reference Introduces Instruction Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:59`; `references/PUMP_TOKENIZED_AGENTS.md:11-12` **Vulnerability Type**: Mutable external instruction dependency **Risk Level**: Medium ### Vulnerable Code ```md If a frontend wallet flow is requested, follow the Pump reference skill (see `references/PUMP_TOKENIZED_AGENTS.md`). ``` The local reference points to a mutable branch: ```md Primary reference skill: - https://raw.githubusercontent.com/pump-fun/pump-fun-skills/refs/heads/main/tokenized-agents/SKILL.md ``` ### Technical Analysis The project identifies a raw file from the repository's mutable `main` branch as its primary reference skill. Content retrieved from that URL can change after this package has been audited without any corresponding change to the audited project. If an Agent or operator follows the reference at generation time, changed remote instructions may affect generated code or operational guidance. The reference is not pinned to an immutable commit and no expected digest or signature is provided. The audited source does not itself contain an automated code-fetch-and-execute routine, so this finding concerns mutable instruction provenance rather than confirmed local payload execution. ### Attack Path 1. The referenced repository or maintainer account is compromised, or the `main` branch is changed. 2. The remote `SKILL.md` is modified to include unsafe or attacker-controlled instructions. 3. An Agent or operator follows the project's instruction to use the primary external reference. 4. The unreviewed remote instructions influence generated wallet or payment code. 5. Unsafe behavior is incorporated into customer projects despite the local Skill package remaining unchanged. ### Impact Assessment The resulting privileges depend on the content introduced through the mutable reference. In the context of payment and wallet generation, malicious instructions could influence credential handling, transaction construction, de ...[truncated 141 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor the reviewed reference into the project and treat the local copy as authoritative. 2. If remote retrieval is necessary, pin the URL to an immutable Git commit rather than `refs/heads/main`. 3. Record and verify a cryptographic digest or trusted signature before using remote content. 4. Require human review when the pinned reference version changes. 5. Do not permit externally retrieved documentation to override system-level safety constraints or the Skill's local security rules. 6. Add provenance information identifying the reviewed repository, commit, retrieval date, and expected checksum. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
This mismatch shows the skill claims to implement payment and Telegram/server integration logic, but may actually only perform template stamping without the promised verification and payment functionality. In a payments context, that can lead downstream users to deploy incomplete or insecure systems under the false assumption that invoice/payment validation is present, causing broken payment controls or unsafe custom additions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
This mismatch shows the skill claims to implement payment and Telegram/server integration logic, but may actually only perform template stamping without the promised verification and payment functionality. In a payments context, that can lead downstream users to deploy incomplete or insecure systems under the false assumption that invoice/payment validation is present, causing broken payment controls or unsafe custom additions.

Credential Access

High
Category
Privilege Escalation
Content
```bash
cd demo-billing
cp .env.example .env
# edit .env and set:
# - TREASURY_SECRET_KEY_BASE58
# - API_TOKEN
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
cd demo-billing
cp .env.example .env
# edit .env and set:
# - TREASURY_SECRET_KEY_BASE58
# - API_TOKEN
npm start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
cd demo-billing
cp .env.example .env
# edit .env and set:
# - TREASURY_SECRET_KEY_BASE58
# - API_TOKEN
npm start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Known Vulnerable Dependency: bigint-buffer==1.1.5 — 1 advisory(ies): CVE-2025-3194 (bigint-buffer Vulnerable to Buffer Overflow via toBigIntLE() Function)

High
Category
Supply Chain
Confidence
93% confidence
Finding
The lockfile pins bigint-buffer 1.1.5, which is reported vulnerable to a buffer overflow in toBigIntLE(). Even though this package is transitive, shipping a known vulnerable native/binary-adjacent parsing dependency in a payment-oriented Solana stack creates real memory-safety risk if attacker-controlled data can reach the affected code path.

Known Vulnerable Dependency: fast-uri==3.1.0 — 7 advisory(ies): CVE-2026-13676 (fast-uri vulnerable to host confusion via failed IDN canonicalization); CVE-2026-18446 (fast-uri vulnerable to host confusion via backslash authority introducer); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat) +4 more

High
Category
Supply Chain
Confidence
96% confidence
Finding
fast-uri 3.1.0 is a known vulnerable dependency and is used by Fastify's schema/URL handling stack. The cited host confusion and SSRF-class issues are especially relevant in a web server template, because malformed URLs, IDNs, or authority parsing discrepancies can undermine origin validation, allow outbound request abuse, or bypass security checks that rely on canonical host parsing.

Known Vulnerable Dependency: fastify==5.8.2 — 3 advisory(ies): CVE-2025-32442 (Fastify has a Body Schema Validation Bypass via Leading Space in Content-Type He); CVE-2026-3635 (fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host ); CVE-2026-18504 (fastify vulnerable to schema validation bypass via root primitive coercion misma)

High
Category
Supply Chain
Confidence
98% confidence
Finding
fastify 5.8.2 is directly included by the template and the advisories affect core request parsing, schema validation, and forwarded host/protocol handling. In a Telegram+web payment bot scaffold, validation bypasses or spoofed host/protocol values can lead to authentication mistakes, webhook trust errors, poisoned callback URLs, or acceptance of malformed payment-related requests.

Known Vulnerable Dependency: find-my-way==9.5.0 — 1 advisory(ies): CVE-2026-47219 (find-my-way: DDoS with HTTP2)

High
Category
Supply Chain
Confidence
87% confidence
Finding
find-my-way 9.5.0 is Fastify's router and is reported vulnerable to HTTP/2-triggered DoS. Because this skill generates an internet-facing web server, an attacker could exploit expensive routing behavior to degrade availability, which is meaningful for payment verification and bot endpoints even if it is not a direct compromise of confidentiality or integrity.

Known Vulnerable Dependency: ws==8.19.0 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
92% confidence
Finding
ws 8.19.0 is reported vulnerable to memory disclosure and memory exhaustion DoS. In a stack that includes Solana RPC/websocket functionality, a vulnerable websocket client/server library can expose sensitive process memory or allow remote resource exhaustion if attacker-controlled websocket traffic is accepted or proxied.

Known Vulnerable Dependency: toml==3.0.0 — 2 advisory(ies): CVE-2026-77465 (toml-node: Uncontrolled Recursion); CVE-2026-63376 (toml-node: Prototype Pollution Leads to `Object.prototype` Corruption via `__pro)

High
Category
Supply Chain
Confidence
90% confidence
Finding
toml 3.0.0 is flagged for uncontrolled recursion and prototype pollution. Although likely transitive via Anchor tooling, prototype pollution in Node.js dependency chains can become serious if untrusted TOML is ever parsed, and recursion flaws can enable denial of service; however in this runtime template the package is less obviously exposed than the web server components.

Known Vulnerable Dependency: ws==7.5.10 — 1 advisory(ies): CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
91% confidence
Finding
ws 7.5.10 is vulnerable to memory exhaustion DoS from tiny fragments/data chunks. Because this older websocket version is also present in the dependency tree, the application may remain exposed even if newer branches are patched elsewhere, and availability attacks are particularly damaging for bot polling, RPC connectivity, and payment-verification services.

Known Vulnerable Dependency: fastify==5.8.2 — 3 advisory(ies): CVE-2025-32442 (Fastify has a Body Schema Validation Bypass via Leading Space in Content-Type He); CVE-2026-3635 (fastify: request.protocol and request.host Spoofable via X-Forwarded-Proto/Host ); CVE-2026-18504 (fastify vulnerable to schema validation bypass via root primitive coercion misma)

High
Category
Supply Chain
Confidence
98% confidence
Finding
The manifest includes fastify 5.8.2, which is explicitly identified as affected by multiple advisories, including schema validation bypasses and spoofable request protocol/host handling. In this skill's context, that is more dangerous because it scaffolds an internet-facing Express-style/Fastify web server for payment and invoice verification flows, where request spoofing or validation bypass can undermine trust boundaries, routing, security checks, or payment-related business logic.

Missing User Warnings

High
Confidence
97% confidence
Finding
The code explicitly stores generated deposit private keys in plaintext Base58 form inside SQLite. This creates a single highly sensitive theft target; any local file disclosure, backup leak, SQL access, or host compromise exposes private keys that allow immediate draining of user funds.

Missing User Warnings

High
Confidence
99% confidence
Finding
Persisting per-user private keys in a local SQLite database without any disclosure or protection details is a serious secret-management flaw. Anyone who gains filesystem, backup, log, or database access can recover those keys and drain user wallets, and users are not informed that the service is acting as a custodian. The skill context makes this more dangerous because it is presented as a ready-made scaffold likely to be copied into real services.

Missing User Warnings

High
Confidence
92% confidence
Finding
This function signs and broadcasts a Solana transaction using a server-controlled deposit wallet, which is an irreversible external operation. The code has only an internal implementation comment and lacks any user-facing warning, confirmation step, or documented disclosure that funds may be moved on-chain automatically.

Credential Access

High
Category
Privilege Escalation
Content
( cd "$TEMPLATE_DIR" && tar -cf - . ) | ( cd "$OUT_DIR" && tar -xf - )

# Remove common local state if it slipped in
rm -f "$OUT_DIR"/*.log "$OUT_DIR"/*.pid "$OUT_DIR"/demo.db "$OUT_DIR"/.env "$OUT_DIR"/.env.local 2>/dev/null || true

echo "Stamped template to: $OUT_DIR"
echo "Next: cd '$OUT_DIR' && npm install"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
( cd "$TEMPLATE_DIR" && tar -cf - . ) | ( cd "$OUT_DIR" && tar -xf - )

# Remove common local state if it slipped in
rm -f "$OUT_DIR"/*.log "$OUT_DIR"/*.pid "$OUT_DIR"/demo.db "$OUT_DIR"/.env "$OUT_DIR"/.env.local 2>/dev/null || true

echo "Stamped template to: $OUT_DIR"
echo "Next: cd '$OUT_DIR' && npm install"
Confidence
95% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README instructs operators to place a treasury private key and API token into a local .env file without any warning about secret handling, storage hygiene, rotation, or preventing accidental disclosure. In a payment-handling Solana/Telegram service, this increases the chance that high-value credentials are mishandled, committed to source control, or exposed in logs or screenshots, leading to wallet compromise or unauthorized API use.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This code loads a treasury secret key from an environment variable and configures a database path, then later stores per-user deposit private keys in the database. There is no confirmation prompt, visible warning, or explanatory comment disclosing that sensitive credentials and user wallet secrets are being handled and persisted locally.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The server generates and persistently stores per-user Solana private keys in SQLite, making the application a custodial wallet system rather than a simple payment scaffold. If the database, backups, logs, or host are compromised, attackers can extract user wallet secrets and steal all funds from those deposit wallets.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The deposit check accepts any existing wallet balance as satisfying a new funding request, without proving that a fresh deposit corresponding to the current request occurred. Because deposit wallets are reused per user, previously leftover funds can be counted again for later crediting flows, enabling replay-style over-crediting or mismatched accounting.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
These lines serialize and broadcast a signed transaction, transmitting wallet activity to the Solana RPC endpoint. The code does not include a confirmation prompt, visible log/print, or explanatory warning near the operation, even though it initiates an external network action affecting funds.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This handler debits credits from a user's stored balance, which is a destructive state change. There is no visible confirmation, warning, or explanatory disclosure in the code around this irreversible operation.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
assets/template/src/standalone-telegram.cjs:13

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
assets/template/src/telegram-bot.cjs:11