T08 · Insecure Dependencies
- Location
SKILL.md:204- Finding
Unpinned npm Dependencies and Use of an Alternate Package Registry
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 204, 359, and 374–375
Vulnerability Type: Supply-chain exposure through mutable dependency resolution and an alternate registry
Risk Level: MediumVulnerable Code Snippets
At line 204:
bash npm install xml2js node-fetchAt line 359:
bash npm install xml2js node-fetch --registry https://registry.npmmirror.comAt lines 374–375:
text | xml2js | npm package | Required | npm install xml2js | | node-fetch | npm package | Required | npm install node-fetch |Technical Analysis
The installation instructions do not pin reviewed dependency versions and the project contains no package manifest or lockfile that records exact versions and integrity hashes. Consequently, the packages and their transitive dependencies resolved at installation time may differ from those reviewed during the audit.
The troubleshooting guidance also directs users to an alternate npm registry. Although using a mirror is not inherently malicious, it adds another supply-chain trust boundary. If the registry, a package publisher account, a resolved package version, or a transitive dependency is compromised, npm may download attacker-controlled content.
Standard npm installation can execute package lifecycle scripts. Therefore, a malicious dependency release could run code during installation without requiring the user to invoke the RSS reader afterward. The audited project contains only
SKILL.md; the referenced implementation, dependency manifest, and lockfile are absent, so dependency compatibility and integrity cannot be verified.Attack Path
- A user follows the Skill's setup instructions and runs one of the documented
npm installcommands. - npm resolves the latest dependency versions because no versions or lockfile are specified.
- An attacker compromises a package publisher, a transitive dependency, or the recommended alternat ...[truncated 1196 chars]
- A user follows the Skill's setup instructions and runs one of the documented
- Remediation
View remediation
Remediation Suggestions
- Add a reviewed
package.jsonthat pins exact dependency versions rather than relying on mutable latest releases. - Generate and commit a
package-lock.jsoncontaining resolved versions and integrity hashes. - Replace the documented installation command with
npm ci, which installs the locked dependency graph and fails when the manifest and lockfile disagree. - Use
npm ci --ignore-scriptswhen dependency lifecycle scripts are unnecessary. If scripts are required, document and review each required script explicitly. - Prefer the official npm registry. If an alternate mirror must be supported, document its trust implications and require integrity or provenance verification.
- Run
npm audit, review transitive dependencies, and use automated dependency monitoring before publishing updates. - Include the referenced implementation in the package so reviewers can verify how
xml2jsandnode-fetchare used and whether both dependencies are actually necessary. - Perform dependency installation under a non-administrative account and in an isolated project directory or container to reduce the impact of a compromised package.
- Add a reviewed
