T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Third-Party SDK Receives Access to a Private-Key-Backed Wallet
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12-14 and 25-35
Vulnerability Type: Unpinned third-party dependency with access to sensitive wallet credentials
Risk Level: HighThe Skill declares and installs
tokenmonkey-sdkwithout an exact version or integrity constraint:yaml install: - kind: node package: tokenmonkey-sdk bins: []It repeats the unpinned installation instruction and passes a private-key-backed signer to the installed SDK:
typescript import { TokenMonkey } from 'tokenmonkey-sdk' import { Keypair } from '@solana/web3.js' import bs58 from 'bs58' // Load your keypair const keypair = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_PRIVATE_KEY)) const tm = new TokenMonkey(keypair)Technical Analysis
The package declaration and installation command omit an exact version and lockfile integrity value. Consequently, the code installed under the trusted package name may vary between installations. The audited project contains only
SKILL.md; it does not include the SDK source, a package lockfile, an integrity hash, or another mechanism that permits verification of the executed dependency.npm packages may also execute lifecycle scripts during installation. At runtime, the SDK receives a
Keypairconstructed from the completeSOLANA_PRIVATE_KEY, giving SDK code access to signing capabilities. If a future package release, compromised publisher account, dependency, or installation artifact is malicious, it could read the environment, inspect or misuse the supplied keypair, transmit secret material, or create unauthorized Solana transactions.This finding establishes an unsafe supply-chain trust boundary, not that the current published SDK is proven malicious.
Attack Path
- An attacker compromises the npm publisher account, package distribution path, or a transitive dependency used by
tokenmonkey-sdk, or causes an unsafe release t ...[truncated 1323 chars]
- An attacker compromises the npm publisher account, package distribution path, or a transitive dependency used by
- Remediation
View remediation
Remediation Suggestions
- Pin
tokenmonkey-sdkto a specifically reviewed version rather than allowing npm to resolve a changing release. - Include a lockfile with verified registry integrity hashes and enforce reproducible installation with
npm ci. - Audit the SDK and its transitive dependency tree before deployment; repeat the review for every proposed upgrade.
- Disable npm lifecycle scripts where compatible, such as by using
npm ci --ignore-scripts, and explicitly review any package that requires such scripts. - Vendor or bundle reviewable SDK source when feasible so the executed implementation is included in the audited artifact.
- Do not expose a general-purpose or high-value wallet private key to the agent process. Use a dedicated, low-balance devnet wallet with no key reuse.
- Prefer a constrained external signer or transaction-approval boundary that validates network, program IDs, token mints, recipients, amounts, and maximum wager limits before signing.
- Restrict process access to unrelated secrets, files, and network destinations, and monitor wallet activity for unexpected transactions.
- Pin
