T08 · Insecure Dependencies
- Location
skills.md:20- Finding
Unpinned Third-Party npm Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
skills.md, lines 20-23
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Mediummarkdown ## Install **JavaScript:** npm install @moltspeak1/sdkTechnical Analysis
The documented installation command does not specify an exact package version, integrity hash, or lockfile. By default, npm resolves the package through its configured registry and generally selects the release associated with the applicable distribution tag. Consequently, the code installed by this instruction can change after the skill has been reviewed.
npm dependencies may contain lifecycle scripts, such as
preinstall,install, orpostinstall, which can execute during installation unless scripts are explicitly disabled. If the package publisher, registry account, or a future release is compromised, following this instruction could execute attacker-controlled code with the privileges of the user running npm.The package identifier
@moltspeak1/sdkalso contains a numeric suffix that differs from the displayed product name, “MoltSpeak.” The repository provides no lockfile, integrity metadata, local implementation, or package-identity verification that would allow an auditor to establish that this is the intended and reviewed package.Attack Path
- An attacker compromises the npm publisher account, package namespace, release process, or another relevant supply-chain component for
@moltspeak1/sdk. - The attacker publishes a malicious release and associates it with the distribution tag resolved by the unpinned command.
- A user follows the installation instruction and runs
npm install @moltspeak1/sdk. - npm downloads the attacker-controlled package or dependency graph.
- Malicious package code can run through npm lifecycle scripts during installation or later when the SDK is imported and used.
This exploitation path is conditional on compromise or ...[truncated 886 chars]
- An attacker compromises the npm publisher account, package namespace, release process, or another relevant supply-chain component for
- Remediation
View remediation
Remediation Suggestions
- Replace the unversioned installation instruction with an exact, reviewed package version, for example:
sh npm install --save-exact @moltspeak1/sdk@<audited-version> - Commit a lockfile generated from the reviewed dependency graph and enforce reproducible installation with
npm ciwhere appropriate. - Verify and clearly document the authoritative npm scope, publisher, repository, and package name, particularly the
1suffix in@moltspeak1/sdk. - Review the selected package version, its transitive dependencies, and all lifecycle scripts before recommending installation.
- Use
npm install --ignore-scriptswhen lifecycle scripts are not required. If they are required, document each script and justify why it is safe. - Use registry controls, dependency allowlists, provenance verification, and automated dependency scanning in CI/CD environments.
- Perform installation in a least-privileged, isolated environment without unnecessary secrets or host filesystem access.
- Publish integrity or provenance information that allows users to verify that the installed artifact corresponds to the reviewed source and release.
- Replace the unversioned installation instruction with an exact, reviewed package version, for example:
