T08 · Insecure Dependencies
- Location
validation/package.json:9- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
validation/package.json:9-11; installation instructions atSKILL.md:20-24andREADME.md:49-52
Vulnerability Type: Supply-chain risk caused by non-reproducible dependency resolution
Risk Level: MediumVulnerable Code
validation/package.json:9-11:json "dependencies": { "fast-glob": "^3.3.2" }SKILL.md:20-24:bash # Method A: enter the skill directory before execution cd <skill-directory>/validation npm install node scan-project.js --project <mini-program-project-path>README.md:49-52:bash cd validation npm installTechnical Analysis
The project directs users or agents to run
npm install, but the dependency is specified using the floating caret range^3.3.2, and no package lockfile is present in the audited directory structure. Consequently, dependency resolution is not reproducible: later installations may retrieve versions or transitive dependency trees that differ from those reviewed during this audit.npm installation can also execute package lifecycle scripts unless explicitly disabled. If an allowed package version or any transitive dependency is compromised, malicious installation code could run with the privileges of the user invoking
npm install. The runtime scanner subsequently loadsfast-globthroughrequire('fast-glob'), providing another execution point for a compromised package.This finding does not establish that the current
fast-globpackage is malicious. It identifies an unsafe dependency-management practice that leaves the effective installed code outside the reviewed and fixed artifact.Attack Path
- An attacker compromises a future version of the permitted dependency or one of its transitive dependencies.
- The malicious version remains compatible with the
^3.3.2range. - A user or AI agent follows the documented setup procedure and runs `npm in ...[truncated 1004 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin direct dependencies to exact reviewed versions, for example:
json "fast-glob": "3.3.2" - Generate, review, and commit a
package-lock.jsoncontaining the complete dependency graph and integrity hashes. - Replace documented
npm installcommands withnpm ci, which installs exactly from the lockfile and fails if package metadata and the lockfile disagree. - Use
npm ci --ignore-scriptswhen dependency lifecycle scripts are not required. - Audit the resolved dependency tree with an appropriate software-composition analysis tool before release and after dependency updates.
- Perform dependency upgrades through reviewed pull requests, and regenerate the lockfile only in a controlled environment.
- Run the scanner with least privilege and restrict its filesystem and network access where practical.
- Pin direct dependencies to exact reviewed versions, for example:
