T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned npm Dependencies in SDK Installation Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 8
Vulnerability Type: Unpinned third-party dependencies and mutable package resolution
Risk Level: MediumVulnerable Code:
bash npm install stable-layer-sdk @mysten/sui @mysten/bcsTechnical Analysis
The installation command does not specify exact package versions or integrity hashes. npm therefore resolves package versions from mutable registry metadata at installation time. The project also provides no lockfile or vendored implementation that would allow the resolved SDK code to be verified as part of this audit.
If one of these packages, its publisher account, or the package registry delivery path is compromised, a malicious release could be installed instead of the version expected when the documentation was written. npm packages can execute lifecycle scripts during installation and subsequently run with the privileges of the user importing the package.
Attack Path
- An attacker compromises a listed package, publisher account, or relevant supply-chain component.
- The attacker publishes a malicious version that satisfies npm's default version resolution.
- A user follows the documented installation command.
- npm retrieves the malicious release and may execute its lifecycle scripts.
- Malicious package code executes under the user's account during installation or when the SDK is imported.
- The code may inspect accessible files, environment variables, wallet material, or alter the blockchain transaction-building workflow.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the installing user's privileges. The affected scope includes files, credentials, environment variables, and network resources accessible to that user. Because the documented workflow signs Sui blockchain transactions, a compromised dependency could also alter transaction parameters or attempt to capture sensitive ...[truncated 153 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to an exact, reviewed version rather than relying on mutable registry resolution.
- Commit a lockfile containing resolved versions and package integrity hashes.
- Verify package publisher identities, provenance, release signatures, and source repositories before recommending installation.
- Use
npm ciwith a reviewed lockfile for reproducible installation. - Disable lifecycle scripts with
--ignore-scriptswhere package functionality permits, or explicitly review all required lifecycle scripts. - Use automated dependency monitoring and require security review before updating pinned versions.
- Publish or include the SDK implementation needed to verify the transaction-building behavior.
