DependencyCheck: Multiple "AnalysisException: OSS Index rate limit exceeded" errors on plugin execution
Starting today (25.05.2022), multiple errors started to fail on each execution. No plugin version changed (was and remains the 7.1.0
version).
Error examples (an error is failing for each of the dependencies):
[WARNING] An error occurred while analyzing '/tmp/dctemp2224d3d1-bfef-48de-b1f5-0e97d0983265/check9478530389331146964tmp/208/META-INF/resources/webjars/shepherd.js/8.2.3/.jsdoc.js' (Sonatype OSS Index Analyzer).
[ERROR] AnalysisException: OSS Index rate limit exceeded
[ERROR] caused by TransportException: Unexpected response; status: 429
There are actually the NPEs that are probably the root cause:
[ERROR] Failed to execute goal org.owasp:dependency-check-maven:7.1.0:check (default-cli) on project ins-app: One or more exceptions occurred during dependency-check analysis: One or more exceptions occurred during analysis:
[ERROR] AnalysisException: Failed to request component-reports
[ERROR] caused by NullPointerException: Cannot invoke "org.sonatype.goodies.packageurl.PackageUrl.toString()" because "coordinates" is null
[ERROR] AnalysisException: Failed to request component-reports
[ERROR] caused by NullPointerException: Cannot invoke "org.sonatype.goodies.packageurl.PackageUrl.toString()" because "coordinates" is null
[ERROR] AnalysisException: Failed to request component-reports
[ERROR] caused by NullPointerException: Cannot invoke "org.sonatype.goodies.packageurl.PackageUrl.toString()" because "coordinates" is null
[ERROR] AnalysisException: Failed to request component-reports
[ERROR] caused by NullPointerException: Cannot invoke "org.sonatype.goodies.packageurl.PackageUrl.toString()" because "coordinates" is null
[ERROR] AnalysisException: Failed to request component-reports
etc.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 46
- Comments: 59 (5 by maintainers)
If anyone comes here because their pipeline in azure devops is failing, just follow these two steps:
additionalArguments: | –ossIndexUsername YOUREMAIL --ossIndexPassword YOURPASS
@ankurga The NVD database was updated, see e.g. https://github.com/spring-projects/spring-framework/issues/24434#issuecomment-1132080062 - you have to suppress it by yourself.
Happening for me as well. Also, all the plugin versions have started giving false positives for multiple jar files:
This has now blocked all our maven builds. Can we please have a solution to this?
got it working. Provide
ossIndexServerId
with a value to the id in thesettings.xml
filee.g.
-DossIndexServerId=owasp-oss-index
and in your
settings.xml
More info: https://jeremylong.github.io/DependencyCheck/dependency-check-maven/aggregate-mojo.html#ossIndexServerId
@petergphillips can confirm, that with a registered user account it works Thanks for the hints!
And yes, it seems like the rate limit to 128 modules per request is new
cheers flash ⚡
How to accomplish this with maven? (which properties to set / provide)
cheers flash ⚡
Yes you can disable the analyzer using
<ossindexAnalyzerEnabled >false</ossindexAnalyzerEnabled>
Same for me. Problem solved. Thanks.
We too have this issue since today. Registring with ossindex.sonatype.org and using that username/password with command line options --ossIndexUsername and --ossIndexPassword solved the issue.
registering works; you should receive an email with a confirmation link …
@danielbraeutigam @ankurga : The problem you are discussing is not related to the issue reported so lets take it separately. As of now all projects using owasp-dependency-check plugin with version 6.X.X and 7.1.0 don’t build. Something has recently changed at SONATYPE. I can reproduce the same locally as well on our CI platforms.
On debug we see:
The URL https://ossindex.sonatype.org/api/v3/component-report is throwing 429 (Rate limiting)
We are also experiencing this same issue. I did some investigating and this seems to be caused by handling of the response failing. That in turn results in the same request being sent on every dependency until rate limit is reached.
There is a large amount of these failed requests until eventually only rate-limit is logged.
@danielbraeutigam thanks, but we have many projects dependent on that. So, we need to update for all of them?
I am facing this issue now, seems to be same behaviour:
… [DependencyCheck] [WARN] An error occurred while analyzing ‘/var/jenkins_home/workspace/xxx/node_modules/@blueprintjs/core/lib/cjs/components/panel-stack2/panelStack2.js’ (Sonatype OSS Index Analyzer). … [DependencyCheck] [ERROR] Failed to request component-reports [DependencyCheck] [ERROR] OSS Index rate limit exceeded …
I tried providing a username and password to authenticate with OSS but the problem persists.
The issue is resolved now.We don’t face this issue now.
@Subhalakshmi1986 Looks like it expired a few hours ago, so a new issue.
Fix mentioned in https://github.com/jeremylong/DependencyCheck/issues/4535#issuecomment-1137283693 worked for me now without changing any configuration.
see https://github.com/jeremylong/DependencyCheck/issues/4535#issuecomment-1137136998
Looks like currently you cannot register on ossindex.sonatype getting a 500 error
Agreed, it didn’t look like that to me either, since I was getting exactly the same errors as you. However I can confirm that for me supplying credentials to the oss index then meant that I stopped getting the null pointer exception and rate limited exceeded errors and the check then succeeded.