T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party SDK Installation Creates Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:15` and `SKILL.md:41` **Vulnerability Type**: Unpinned npm dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: npm install snap-solana-sdk ``` ```text ## Setup npm install snap-solana-sdk ``` ### Technical Analysis The installation instructions retrieve `snap-solana-sdk` without specifying an exact reviewed version. The supplied project also contains no package manifest or lockfile that constrains the resolved version or verifies its integrity. Consequently, the code installed by this command may change after the Skill has been reviewed. If the package, its publishing account, or one of its transitive dependencies is compromised, a later installation could retrieve malicious code. npm packages can also define lifecycle scripts that execute during installation. This finding does not establish that the current `snap-solana-sdk` package is malicious. It identifies an unsafe dependency-resolution practice that exposes users to a mutable supply-chain component. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, or a transitive dependency. 2. The attacker publishes a malicious version under the same package name. 3. A user follows the documented `npm install snap-solana-sdk` instruction. 4. npm resolves the unconstrained package to the attacker-controlled release. 5. Malicious lifecycle scripts or imported runtime code execute in the installation or agent process. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running npm or the agent. Depending on that account's access, the malicious dependency could read environment variables, wallet-related material available to the process, local files, or network credentials, and could alter transactions handled by the Skill. The affected scope is limited by the operating-system permissions and secrets avail ...[truncated 46 chars]
- Remediation
- ## Remediation Suggestions - Pin the SDK to an exact reviewed version, such as `snap-solana-sdk@x.y.z`, rather than using an unconstrained package name. - Add a package manifest and commit a lockfile containing npm integrity hashes. - Use `npm ci` in deployment and installation workflows so dependency resolution cannot silently change. - Review both direct and transitive dependencies before updating the lockfile. - Use automated dependency scanning and package provenance verification. - Disable npm lifecycle scripts with `--ignore-scripts` when the SDK does not require them. - Run installation and the agent under a dedicated, least-privileged account without unnecessary access to wallet keys or unrelated secrets.
