T08 · Insecure Dependencies
- Location
SKILL.md:41- Finding
Unauditable Third-Party SDK Introduces Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41–45
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code Snippet:
markdown ## Quick Start ```bash npm install buff-protocol-sdk@1.0.1text ### Technical Analysis The Skill instructs users to download and install `buff-protocol-sdk@1.0.1` from an external package registry. Although an exact version is specified, the audited project does not include the SDK source code, a dependency lockfile, package integrity hashes, a reviewed dependency tree, or reproducible-build provenance. Consequently, the audit cannot verify the claim that the dependency is only a thin HTTP client. Package installation may execute npm lifecycle scripts, while the installed package and its transitive dependencies can execute code with the privileges of the invoking user. Such code may also access environment variables declared by the Skill, including the sensitive `BUFF_API_KEY`. No evidence in the supplied files proves that the named package is currently malicious. The confirmed issue is that execution of an external, unaudited dependency is part of the documented workflow without sufficient integrity controls. ### Attack Path 1. An attacker compromises the published SDK version, its maintainer account, registry delivery path, or a transitive dependency. 2. A user follows the Quick Start instructions and runs `npm install buff-protocol-sdk@1.0.1`. 3. Malicious lifecycle or package code executes in the user's environment. 4. The code reads accessible environment variables or application data, including `BUFF_API_KEY`. 5. During subsequent use, malicious SDK code may exfiltrate credentials, manipulate API parameters, or alter financially sensitive Solana transaction data before it is shown to the user. 6. If the user fails to independently decode and verify every instruction, the user may sign a manipulated transaction. ### Imp ...[truncated 659 chars]- Remediation
View remediation
Remediation Suggestions
- Vendor the reviewed SDK source into the project or include it as auditable source code rather than requiring an opaque external installation.
- Add a lockfile containing resolved dependency versions and registry integrity hashes.
- Publish and verify a cryptographic checksum for the expected SDK package artifact.
- Provide signed release provenance and reproducible-build instructions so users can verify that the published package corresponds to reviewed source.
- Review and pin every transitive dependency rather than relying only on the top-level SDK version.
- Recommend installation with lifecycle scripts disabled where compatible:
bash npm install --ignore-scripts buff-protocol-sdk@1.0.1 - Run the client with least privilege and expose only the minimum necessary environment variables.
- Make transaction verification mandatory: decode each returned instruction, validate program IDs, destinations, token pairs, and amounts against locally calculated expectations before requesting a signature.
- Use scoped, rotatable API keys and document immediate revocation procedures for suspected dependency compromise.
