T08 · Insecure Dependencies
- Location
setup.md:27- Finding
Unpinned npm Dependencies Create a Supply-Chain Execution Risk
- Content
View full analysis
Vulnerability Details
File Location:
setup.md, lines 27-32
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable code:
markdown If not installed: ```bash npm install puppeteer # or for lighter install (uses system Chrome): npm install puppeteer-coretext ### Technical Analysis The setup instructions install `puppeteer` or `puppeteer-core` without specifying an exact, audited version or requiring a lockfile with integrity metadata. Consequently, the package resolved at installation time can differ from the version reviewed when the Skill was published. npm packages can contain lifecycle scripts and executable package code. If a future release is compromised, a maintainer account is breached, or registry resolution is manipulated, running the documented command could execute unreviewed code with the permissions of the user running npm. No malicious dependency is currently included in the project, and no evidence demonstrates that the legitimate Puppeteer packages are compromised. The vulnerability is the unsafe, mutable dependency acquisition process. ### Attack Path 1. An attacker compromises a future package release, its publication account, or the dependency-resolution path. 2. The Agent follows `setup.md` and runs `npm install puppeteer` or `npm install puppeteer-core`. 3. npm resolves the latest compatible release rather than a previously audited version. 4. Malicious lifecycle scripts or package code execute under the local user's account. 5. The malicious dependency could access files and network resources available to that user or alter generated browser-automation scripts. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user running npm. The affected scope may include that user's files, environment variables, browser profiles, automation output, and network access. The ...[truncated 136 chars]- Remediation
View remediation
Remediation Suggestions
- Pin Puppeteer to an exact version that has been reviewed, such as
npm install --save-exact puppeteer@X.Y.Z. - Commit and verify a
package-lock.jsoncontaining npm integrity hashes. - Use
npm cifor repeatable installation from the approved lockfile. - Require explicit user confirmation before installing packages or executing lifecycle scripts.
- Consider initially installing with
--ignore-scripts, then separately reviewing any required installation scripts. - Use dependency scanning and periodically review pinned versions before performing controlled upgrades.
- Document the package source, approved version, checksum or lockfile, and expected installation behavior.
- Pin Puppeteer to an exact version that has been reviewed, such as
