jeremylong / DependencyCheck

OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
https://owasp.org/www-project-dependency-check/
Apache License 2.0
6.43k stars 1.28k forks source link

No lock file exists error with pnpm audit #4367

Open rnarayana opened 2 years ago

rnarayana commented 2 years ago

Describe the bug I am pointing dependencyCheck to a package.json, for which there exists a pnpm-lock.yaml. However I get the warning: [WARN] No lock file exists - this will result in false negatives; please run npm install --package-lock The analysis itself happens without an issue

Version of dependency-check used 7.0.4

Log file

D:\dependency-check\bin\dependency-check.bat --project Backend --scan .\dispatch\IntegrationService\package.json --out .\dependency-check -l depcheck.txt --nodeAuditSkipDevDependencies
[INFO] Checking for updates
[INFO] Skipping NVD check since last check was within 4 hours.
[INFO] Skipping RetireJS update since last update was within 24 hours.
[INFO] Check for updates complete (16 ms)
[INFO]

Dependency-Check is an open source tool performing a best effort analysis of 3rd party dependencies; false positives and false negatives may exist in the analysis performed by the tool. Use of the tool and the reporting provided constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to the analysis or its use. Any use of the tool and the reporting provided is at the user�s risk. In no event shall the copyright holder or OWASP be held liable for any damages whatsoever arising out of or in connection with the use of this tool, the analysis performed, or the resulting report.

   About ODC: https://jeremylong.github.io/DependencyCheck/general/internals.html
   False Positives: https://jeremylong.github.io/DependencyCheck/general/suppression.html

? Sponsor: https://github.com/sponsors/jeremylong

[INFO] Analysis Started
[INFO] Finished File Name Analyzer (0 seconds)
[WARN] No lock file exists - this will result in false negatives; please run `npm install --package-lock`
[INFO] Finished Node.js Package Analyzer (0 seconds)
[INFO] Finished Dependency Merging Analyzer (0 seconds)
[INFO] Finished Version Filter Analyzer (0 seconds)
[INFO] Finished Hint Analyzer (0 seconds)
[INFO] Created CPE Index (1 seconds)
[INFO] Finished CPE Analyzer (1 seconds)
[INFO] Finished False Positive Analyzer (0 seconds)
[INFO] Finished NVD CVE Analyzer (0 seconds)
[INFO] Finished Sonatype OSS Index Analyzer (1 seconds)
[INFO] Finished Vulnerability Suppression Analyzer (0 seconds)
[INFO] Finished Dependency Bundling Analyzer (0 seconds)
[INFO] Analysis Complete (3 seconds)
[INFO] Writing report to: D:\Repos\Backend\.\dependency-check\dependency-check-report.html
myzonjkee commented 1 year ago

Try to add the path to pnpm executable --pnpm <path>

jeremylong commented 1 year ago

Or try just scanning the lock file?


dependency-check.bat --project Backend --scan .\dispatch\IntegrationService\pnpm-lock.yaml --out .\dependency-check -l depcheck.txt --nodeAuditSkipDevDependencies