Javascript Missing Package Lock
Description
Detects when an NPM/JavaScript project declares dependencies without having corresponding lock files (package-lock.json, yarn.lock, etc.). Missing lock files can lead to supply chain attacks since dependency versions aren't locked, allowing potential malicious package upgrades.
Detection Strategy
• Checks if package.json file contains dependencies or devDependencies
• Verifies existence of any lock file: package-lock.json, yarn.lock, pnpm-lock.yaml, or ng-package.json
• Reports a vulnerability if dependencies are declared but no lock file is found in the project or package directory
• Checks both root directory and package-specific directories for lock files
Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.