DependencyCheck: Could not perform Node Audit analysis
My team has been working over the last couple of days to understand why this error is being thrown in our Jenkins build pipeline:
[2021-10-08T18:09:32.862Z] [DependencyCheck] [INFO] Checking for updates
[2021-10-08T18:09:32.869Z] [DependencyCheck] [INFO] Skipping NVD check since last check was within 4 hours.
[2021-10-08T18:09:32.958Z] [DependencyCheck] [INFO] Check for updates complete (96 ms)
[2021-10-08T18:09:33.112Z] [DependencyCheck] [INFO]
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck] 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.
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck] About ODC: https://jeremylong.github.io/DependencyCheck/general/internals.html
[2021-10-08T18:09:33.112Z] [DependencyCheck] False Positives: https://jeremylong.github.io/DependencyCheck/general/suppression.html
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck] 💖 Sponsor: https://github.com/sponsors/jeremylong
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck]
[2021-10-08T18:09:33.112Z] [DependencyCheck] [INFO] Analysis Started
[2021-10-08T18:09:33.117Z] [DependencyCheck] [INFO] Finished Archive Analyzer (0 seconds)
[2021-10-08T18:09:33.125Z] [DependencyCheck] [INFO] Finished File Name Analyzer (0 seconds)
[2021-10-08T18:09:33.127Z] [DependencyCheck] [INFO] Finished Dependency Merging Analyzer (0 seconds)
[2021-10-08T18:09:33.131Z] [DependencyCheck] [INFO] Finished Version Filter Analyzer (0 seconds)
[2021-10-08T18:09:33.239Z] [DependencyCheck] [INFO] Finished Hint Analyzer (0 seconds)
[2021-10-08T18:09:33.245Z] [DependencyCheck] [INFO] Finished False Positive Analyzer (0 seconds)
[2021-10-08T18:09:33.248Z] [DependencyCheck] [INFO] Finished NVD CVE Analyzer (0 seconds)
[2021-10-08T18:09:33.250Z] [DependencyCheck] [WARN] The Node Package Analyzer has been disabled; the resulting report will only contain the known vulnerable dependency - not a bill of materials for the node project.
[2021-10-08T18:09:33.687Z] [DependencyCheck] [WARN] dependency skipped: package.json contain an alias for vue-loader-v16 => vue-loader@16.8.1 npm audit doesn't support aliases
[2021-10-08T18:09:34.336Z] [DependencyCheck] [ERROR] NodeAuditAnalyzer failed on /var/lib/jenkins/workspace/NL_ui-components_PR-280/package-lock.json
[2021-10-08T18:09:34.336Z] [DependencyCheck] [WARN] An error occurred while analyzing '/var/lib/jenkins/workspace/NL_ui-components_PR-280/package-lock.json' (Node Audit Analyzer).
[2021-10-08T18:09:34.336Z] [DependencyCheck] [INFO] Finished Node Audit Analyzer (1 seconds)
[2021-10-08T18:09:34.337Z] [DependencyCheck] [INFO] Finished Sonatype OSS Index Analyzer (0 seconds)
[2021-10-08T18:09:34.465Z] [DependencyCheck] [INFO] Finished Vulnerability Suppression Analyzer (0 seconds)
[2021-10-08T18:09:34.465Z] [DependencyCheck] [INFO] Finished Dependency Bundling Analyzer (0 seconds)
[2021-10-08T18:09:34.477Z] [DependencyCheck] [INFO] Analysis Complete (1 seconds)
[2021-10-08T18:09:34.581Z] [DependencyCheck] [INFO] Writing report to: /var/lib/jenkins/workspace/NL_ui-components_PR-280/analysis/dependency-check-report.xml
[2021-10-08T18:09:34.719Z] [DependencyCheck] [INFO] Writing report to: /var/lib/jenkins/workspace/NL_ui-components_PR-280/analysis/dependency-check-report.html
[2021-10-08T18:09:35.107Z] [DependencyCheck] [ERROR] Could not perform Node Audit analysis. Invalid payload submitted to Node Audit API.
I have attached the package.json file and the package-lock.json file for this project in the issue. Can you give me some guidance on what could be causing the above issue, and how to fix it, given this information? dependency check attachments - package and package-lock.zip
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 8
- Comments: 27 (5 by maintainers)
Commits related to this issue
- [+] Fixed dep check (https://github.com/jeremylong/DependencyCheck/issues/3717) — committed to grauds/money.tracker.ui by grauds a year ago
- [+] Fixed dep check (https://github.com/jeremylong/DependencyCheck/issues/3717) — committed to grauds/money.tracker.ui by grauds a year ago
- [+] Fixed dep check (https://github.com/jeremylong/DependencyCheck/issues/3717) — committed to grauds/money.tracker.ui by grauds a year ago
wanted to bump this, in hopes we can get some help. Thanks!
This still happens in 8.2.1, with node 18.x.
Same thing happening here. CI/CD are failing with this error and the move was to live with the existing findings. Project relying on Node 14, and NodeJS Audit checks are failing. Any update?
The option does not exist on command line but can be provided using the properties file.
Add the following to your existing properties file
analyzer.node.audit.url=/-/npm/v1/security/advisories/bulk
And if not already using a properties file, create one and then add
-P my-config.properties
to the command lineWe already had our package-lock.json upgraded to
"lockfileVersion": 2
still it was failing. I removed the package-lock.json and node_modules folder and did a npm install (in node 16.14.0) and it did fix the issue.Hello,
Is there a fix planned and or identified 😃 ? We’ve just upgraded our npm version on CI (v6 -> v8) and it now fail on some projects. (Node16 is the new LTS)
So, I understand that we cannot use DependencyCheck anymore with Node 16+ or npm 7/8 and a package-lock.json with lockFileVersion 2 ?
Interestingly, I’m finding that:
Whereas:
So this seems to confirm @racedale, @StudentBlake and @Samuel-Schober-USU’s suspicions; and makes it clear that there is a sort-of-workaround for now (i.e. force Node 14 and regenerate
package-lock.json
), though it is clearly a bit ugly for any projects that are using NodeJS >14.Hopefully @jeremylong this is helpful to you in narrowing down the issue. Perhaps you can experiment locally with NodeJS 16 and thereby identify the root of the problem.
Oh, and I upgraded to the very latest Dependency-Check 6.5.3 - same behaviour.
Can confirm, it’s totally broken on package-lock.json files generated with latest stable version of npm (8). For us, this is on multiple projects, not sure if it’s every case. This has been an issue for a while, hoping it can get a bump in priority.
6.5.0 did not fix this for us. Seems to be due to package-locks generated with newer versions of npm (7, 8)
Pretty sure this will be fixed in 6.5.0 which was slightly delayed but should be released this weekend.