Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on processing NVD data due to unknown field: cvssMetricV40 #6746

Closed
vvalencia-cl opened this issue Jun 28, 2024 · 35 comments · Fixed by #6776
Closed

Failing on processing NVD data due to unknown field: cvssMetricV40 #6746

vvalencia-cl opened this issue Jun 28, 2024 · 35 comments · Fixed by #6776
Labels

Comments

@vvalencia-cl
Copy link

Describe the bug
The plugin cannot read the response due to an unknown field: cvssMetricV40

Version of dependency-check used
The problem occurs using version 9.2.0 of the maven plugin

Log file

[DEBUG] requesting URI: https://services.nvd.nist.gov/rest/json/cves/2.0?lastModStartDate=2024-06-26T17%3A49%3A36Z&lastModEndDate=2024-10-24T17%3A49%3A36Z&resultsPerPage=2000&startIndex=0
[DEBUG] Ticket taken At: 19:00:21; count: 1; by 71
[DEBUG] Requested At: 19:00:21; URI: /rest/json/cves/2.0?lastModStartDate=2024-06-26T17%3A49%3A36Z&lastModEndDate=2024-10-24T17%3A49%3A36Z&resultsPerPage=2000&startIndex=0
[DEBUG] Ticket returned At: 19:01:13; count: 2; by 71
[DEBUG] Content-Type Received: application/json
[DEBUG] Error processing NVD data
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "cvssMetricV40" (class io.github.jeremylong.openvulnerability.client.nvd.Metrics), not marked as ignorable (3 known properties: "cvssMetricV30", "cvssMetricV31", "cvssMetricV2"])
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2864630] (through reference chain: io.github.jeremylong.openvulnerability.client.nvd.CveApiJson20["vulnerabilities"]->java.util.ArrayList[571]->io.github.jeremylong.openvulnerability.client.nvd.DefCveItem["cve"]->io.github.jeremylong.openvulnerability.client.nvd.CveItem["metrics"]->io.github.jeremylong.openvulnerability.client.nvd.Metrics["cvssMetricV40"])
    at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from (UnrecognizedPropertyException.java:61)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty (DeserializationContext.java:1153)
    at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty (StdDeserializer.java:2224)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty (BeanDeserializerBase.java:1793)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla (BeanDeserializerBase.java:1771)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:316)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:177)
    at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet (FieldProperty.java:138)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:310)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:177)
    at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet (FieldProperty.java:138)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:310)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:177)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray (CollectionDeserializer.java:359)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:244)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:28)
    at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet (FieldProperty.java:138)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:310)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:177)
    at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue (DefaultDeserializationContext.java:342)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose (ObjectMapper.java:4899)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue (ObjectMapper.java:3846)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue (ObjectMapper.java:3814)
    at io.github.jeremylong.openvulnerability.client.nvd.NvdCveClient.next (NvdCveClient.java:338)
    at org.owasp.dependencycheck.data.update.NvdApiDataSource.processApi (NvdApiDataSource.java:349)
    at org.owasp.dependencycheck.data.update.NvdApiDataSource.update (NvdApiDataSource.java:116)
    at org.owasp.dependencycheck.Engine.doUpdates (Engine.java:906)
    at org.owasp.dependencycheck.Engine.initializeAndUpdateDatabase (Engine.java:711)
    at org.owasp.dependencycheck.Engine.analyzeDependencies (Engine.java:637)
    at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.runCheck (BaseDependencyCheckMojo.java:1960)
    at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.execute (BaseDependencyCheckMojo.java:1143)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

To Reproduce
Steps to reproduce the behavior:

  1. mvn dependency-check:check -X

Expected behavior
Check works

Additional context
If you don't enable maven debug logging, it appears that the process is stuck forever

@chadlwilson
Copy link
Contributor

@ngvdong
Copy link

ngvdong commented Jun 29, 2024

My project stuck due to this issue. Is there a workaround while waiting for the fix to be published.

@chadlwilson
Copy link
Contributor

No workaround unless you pre-process NVD API data to remove cvssMetricV40 before manually feeding it into ODC from a cache, which is a lot of work.

But there is a fix coming :-)

@rupreck
Copy link

rupreck commented Jun 30, 2024

Thanks for the update. Is there a view on when this fix will be available? Assuming this is to be a new version 9.2.1 or 9.3.0?

@chadlwilson
Copy link
Contributor

chadlwilson commented Jun 30, 2024

I'm not the maintainer obviously, but he mentioned at jeremylong/Open-Vulnerability-Project#163 (comment) intent to release the library that needs fixing in "the morning" and then update ODC to use it and release ODC and plugins. But no idea what timezone that means so perhaps not so helpful. 😅 Possibly UTC-4 (US east coast), meaning at least 7-8 hours away 😃

@jeremylong
Copy link
Owner

fix will be in 10.0.0 - which should be published tomorrow morning (US Eastern timezone).

@jeremylong
Copy link
Owner

See #6756 - which allows the update to occur. But CvssV4 has not yet been added to the report.

@echalone
Copy link
Contributor

echalone commented Jul 1, 2024

Our dependency check gets stuck with "NVD API request failures are occurring; retrying request for the 5 time" messages for hours since friday, I assume this is the same problem?

@chadlwilson
Copy link
Contributor

chadlwilson commented Jul 1, 2024

Our dependency check gets stuck with "NVD API request failures are occurring; retrying request for the 5 time" messages for hours since friday, I assume this is the same problem?

@echalone Yes.

The actual reason for the errors is hidden unless you turn on debug logs as specifically noted by OP, and unfortunately the library seems to keep retrying calls even though they will never succeed due to client-side parse failures, which is why it eventually times out. Probably added as a slightly "brute force" workaround for NVD API reliability problems since it was launched.

The "blind" retry has also been changed for the next version in jeremylong/Open-Vulnerability-Project#168, so future API compatibility problems like this should fail fast rather than seeming stuck. Might need some more iteration to retry certain types of errors depending on how well behaving the NVD API is when it's under load (e.g if it starts returning HTTP 200s but bad/wrong content type or JSON response from a reverse proxy or other component, the library may need to specifically detect that and allow for retry) The logic right now is pretty simplistic (IMHO).

@echalone
Copy link
Contributor

echalone commented Jul 1, 2024

Our dependency check gets stuck with "NVD API request failures are occurring; retrying request for the 5 time" messages for hours since friday, I assume this is the same problem?

@echalone Yes.

The actual reason for the errors is hidden unless you turn on debug logs as specifically noted by OP, and unfortunately the library seems to keep retrying calls even though they will never succeed due to client-side parse failures, which is why it eventually times out. Probably added as a slightly "brute force" workaround for NVD API reliability problems since it was launched.

The "blind" retry has also been changed for the next version in jeremylong/Open-Vulnerability-Project#168, so future API compatibility problems like this should fail fast rather than seeming stuck. Might need some more iteration to retry certain types of errors depending on how well behaving the NVD API is when it's under load (e.g if it starts returning HTTP 200s but bad/wrong content type or JSON response from a reverse proxy or other component, the library may need to specifically detect that and allow for retry) The logic right now is pretty simplistic (IMHO).

Thank you for the explanation :)

@daspilker
Copy link

I used this script to patch our cached database:

gunzip -c nvdcve-2024.json.gz | jq ".vulnerabilities[].cve.metrics |= del(.cvssMetricV40)" > nvdcve-2024-fix.json
gzip nvdcve-2024-fix.json
mv nvdcve-2024-fix.json.gz nvdcve-2024.json.gz

gunzip -c nvdcve-modified.json.gz | jq ".vulnerabilities[].cve.metrics |= del(.cvssMetricV40)" > nvdcve-modified-fix.json
gzip nvdcve-modified-fix.json
mv nvdcve-modified-fix.json.gz nvdcve-modified.json.gz

Use at your own risk. 😬

@jeremylong
Copy link
Owner

The 10.0.0 release is happening now. However, due to other commitments, I may not be able to push the gradle plugin until later today.

@somera
Copy link

somera commented Jul 1, 2024

After Update to 10.0.0

[ERROR] Failed to execute goal org.owasp:dependency-check-maven:10.0.0:aggregate (default-cli) on project xxx: Fatal exception(s) analyzing xxx: One or more exceptions occurred during analysis:
[ERROR]         DatabaseException: Unable to connect to the dependency-check database
[ERROR]                 caused by DatabaseException: Database schema does not match this version of dependency-check
[ERROR]                 caused by DatabaseException: Unable to upgrade the database schema from 5.4 to 5.5
[ERROR]                 caused by JdbcSQLSyntaxErrorException: Doppelter Feldname "V4VERSION"
[ERROR] Duplicate column name "V4VERSION"; SQL statement:
[ERROR] ALTER TABLE vulnerability ADD   COLUMN v4version VARCHAR(5) [42121-214]

@chadlwilson
Copy link
Contributor

After Update to 10.0.0

[ERROR] Failed to execute goal org.owasp:dependency-check-maven:10.0.0:aggregate (default-cli) on project xxx: Fatal exception(s) analyzing xxx: One or more exceptions occurred during analysis:
[ERROR]         DatabaseException: Unable to connect to the dependency-check database
[ERROR]                 caused by DatabaseException: Database schema does not match this version of dependency-check
[ERROR]                 caused by DatabaseException: Unable to upgrade the database schema from 5.4 to 5.5
[ERROR]                 caused by JdbcSQLSyntaxErrorException: Doppelter Feldname "V4VERSION"
[ERROR] Duplicate column name "V4VERSION"; SQL statement:
[ERROR] ALTER TABLE vulnerability ADD   COLUMN v4version VARCHAR(5) [42121-214]

Did you interrupt the upgrade the first time or have two instances trying to update the same database at the same time?

ALTER TABLE vulnerability ADD COLUMN v4version VARCHAR(5);

Looks OK, so looks like trying to upgrade an already upgraded database, perhaps.

If it’s just H2, perhaps you want to try from a clean database.

@somera
Copy link

somera commented Jul 1, 2024

I switched from 9.2.0 to 10.0.0 and run the check on one project. And I get this error.

@somera
Copy link

somera commented Jul 1, 2024

I cleaned the DB and startet it again. The problem is that the first run need time.

@SMUnlimited
Copy link

I'm testing now, but looks like some of the manual db scripts forgot to increment to 5.5?

INSERT INTO properties(id,value) VALUES ('version','5.4');

Maybe also explains the above if you using a centralized db?

@somera
Copy link

somera commented Jul 1, 2024

Maybe also explains the above if you using a centralized db?

The error was on local windows enviroment. On Linux the updated run without any issue.

@SMUnlimited
Copy link

SMUnlimited commented Jul 1, 2024

I'm testing now, but looks like some of the manual db scripts forgot to increment to 5.5?

INSERT INTO properties(id,value) VALUES ('version','5.4');

Maybe also explains the above if you using a centralized db?

Looks like query for postgres

UPDATE_VULNERABILITY=SELECT update_vulnerability(?::VARCHAR(20), ?::VARCHAR(8000), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::BOOLEAN, ?::BOOLEAN, ?:: BOOLEAN, ?::BOOLEAN, ?::BOOLEAN, ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(5),?::DECIMAL(3,1), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::VARCHAR(20), ?::DECIMAL(3,1), ?::VARCHAR(20), ?::VARCHAR(5), ?::VARCHAR(5), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(20), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15), ?::DECIMAL(3,1), ?::VARCHAR(15));
is missing two params, so its failing with The column index is out of range: 71, number of columns: 70 as update query only has 70 columns, but all the other dbs appear to expect 72?

@localhorst-org
Copy link

In my Case looks like similar to @SMUnlimited. I Create a new Postgresql DB with the "initialize_postgres.sql". I change the last line in to

INSERT INTO properties(id,value) VALUES ('version','5.5');

After that the Error like

Database schema does not match this version of dependency-check: Database schema is out of date -> [Help 1] ....

is gone but i got

[ERROR] Failed to process CVE-2000-0564
org.owasp.dependencycheck.analyzer.exception.UnexpectedAnalysisException: org.postgresql.util.PSQLException: Der Spaltenindex 71 ist außerhalb des gültigen Bereichs. Anzahl Spalten: 70.

@vschurink
Copy link

vschurink commented Jul 1, 2024

I think the issue with the postgresql error is due to 2 missing statements in the SQL in file (core/src/main/resources/data/dbStatements_postgresql.properties), I've commented the commit (ad0d16a) @jeremylong, with where I think the issues might be. Hope it helps and thank you for your effort.

@rupreck
Copy link

rupreck commented Jul 1, 2024

Thanks for the update. From fresh local update it completes the update but lots of errors. Repeated on 5 different VM's

S:\sqa>S:\sqa\node\tools\dependency-check\bin\dependency-check --nvdApiKey XXX --updateonly --data S:\sqa\depcheckdata
[INFO] Checking for updates
[INFO] NVD API has 255,620 records in this update
[INFO] Downloaded 10,000/255,620 (4%)
[INFO] Downloaded 20,000/255,620 (8%)
[INFO] Downloaded 30,000/255,620 (12%)
[INFO] Downloaded 40,000/255,620 (16%)
[INFO] Downloaded 50,000/255,620 (20%)
[INFO] Downloaded 60,000/255,620 (23%)
[INFO] Downloaded 70,000/255,620 (27%)
[INFO] Downloaded 80,000/255,620 (31%)
[INFO] Downloaded 90,000/255,620 (35%)
[INFO] Downloaded 100,000/255,620 (39%)
[INFO] Downloaded 110,000/255,620 (43%)
[INFO] Downloaded 120,000/255,620 (47%)
[INFO] Downloaded 130,000/255,620 (51%)
[INFO] Downloaded 140,000/255,620 (55%)
[INFO] Downloaded 150,000/255,621 (59%)
[ERROR] Updating CVE: CVE-2021-22543
[ERROR] Updating CVE: CVE-2020-8903
[ERROR] Updating CVE: CVE-2020-8907
[ERROR] Updating CVE: CVE-2020-8933
[INFO] Downloaded 160,000/255,621 (63%)
[WARN] Retrying request /rest/json/cves/2.0?resultsPerPage=2000&startIndex=158000 : 3 time
[INFO] Downloaded 170,000/255,621 (67%)
[WARN] NVD API request failures are occurring; retrying request for the 5 time
[ERROR] Updating CVE: CVE-2021-26724
[ERROR] Updating CVE: CVE-2021-26725
[INFO] Downloaded 180,000/255,621 (70%)
[INFO] Downloaded 190,000/255,621 (74%)
[ERROR] Updating CVE: CVE-2022-0550
[ERROR] Updating CVE: CVE-2022-0551
[INFO] Downloaded 200,000/255,621 (78%)
[ERROR] Updating CVE: CVE-2022-3474
[INFO] Downloaded 210,000/255,621 (82%)
[ERROR] Updating CVE: CVE-2023-5253
[ERROR] Updating CVE: CVE-2022-4259
[INFO] Downloaded 220,000/255,621 (86%)
[ERROR] Updating CVE: CVE-2023-38524
[ERROR] Updating CVE: CVE-2023-38525
[ERROR] Updating CVE: CVE-2023-38526
[ERROR] Updating CVE: CVE-2023-38527
[ERROR] Updating CVE: CVE-2023-38528
[ERROR] Updating CVE: CVE-2023-38529
[ERROR] Updating CVE: CVE-2023-38530
[ERROR] Updating CVE: CVE-2023-38531
[ERROR] Updating CVE: CVE-2023-38532
[ERROR] Updating CVE: CVE-2024-4978
[ERROR] Updating CVE: CVE-2023-24477
[ERROR] Updating CVE: CVE-2023-22378
[ERROR] Updating CVE: CVE-2023-22843
[ERROR] Updating CVE: CVE-2023-23574
[ERROR] Updating CVE: CVE-2023-24471
[ERROR] Updating CVE: CVE-2023-23903
[ERROR] Updating CVE: CVE-2023-24015
[INFO] Downloaded 230,000/255,621 (90%)
[WARN] Retrying request /rest/json/cves/2.0?resultsPerPage=2000&startIndex=236000 : 3 time
[INFO] Downloaded 240,000/255,621 (94%)
[ERROR] Updating CVE: CVE-2023-29245
[ERROR] Updating CVE: CVE-2023-2567
[ERROR] Updating CVE: CVE-2023-32649
[INFO] Downloaded 250,000/255,621 (98%)
[ERROR] Updating CVE: CVE-2024-6177
[ERROR] Updating CVE: CVE-2024-6178
[ERROR] Updating CVE: CVE-2024-6179
[ERROR] Updating CVE: CVE-2023-45197
[ERROR] Updating CVE: CVE-2024-6241
[ERROR] Updating CVE: CVE-2024-5635
[ERROR] Updating CVE: CVE-2024-5636
[ERROR] Updating CVE: CVE-2024-5262
[ERROR] Updating CVE: CVE-2024-5184
[ERROR] Updating CVE: CVE-2024-5732
[ERROR] Updating CVE: CVE-2024-5733
[ERROR] Updating CVE: CVE-2024-5734
[ERROR] Updating CVE: CVE-2024-1228
[ERROR] Updating CVE: CVE-2024-3699
[ERROR] Updating CVE: CVE-2024-3700
[ERROR] Updating CVE: CVE-2024-5102
[ERROR] Updating CVE: CVE-2024-5597
[INFO] Downloaded 255,621/255,621 (100%)
[INFO] Completed processing batch 1/128 (1%) in 1,910ms
[INFO] Completed processing batch 2/128 (2%) in 3,149ms
[INFO] Completed processing batch 3/128 (2%) in 4,098ms
[INFO] Completed processing batch 4/128 (3%) in 3,724ms
[INFO] Completed processing batch 5/128 (4%) in 3,595ms
[INFO] Completed processing batch 6/128 (5%) in 3,454ms
[INFO] Completed processing batch 7/128 (5%) in 3,124ms
[INFO] Completed processing batch 8/128 (6%) in 2,672ms
[INFO] Completed processing batch 9/128 (7%) in 2,448ms
[INFO] Completed processing batch 10/128 (8%) in 1,285ms
[INFO] Completed processing batch 11/128 (9%) in 1,330ms
[INFO] Completed processing batch 12/128 (9%) in 977ms
[INFO] Completed processing batch 13/128 (10%) in 765ms
[INFO] Completed processing batch 14/128 (11%) in 717ms
[INFO] Completed processing batch 15/128 (12%) in 720ms
[INFO] Completed processing batch 16/128 (13%) in 925ms
[INFO] Completed processing batch 17/128 (13%) in 802ms
[INFO] Completed processing batch 18/128 (14%) in 956ms
[INFO] Completed processing batch 19/128 (15%) in 1,371ms
[INFO] Completed processing batch 20/128 (16%) in 1,265ms
[INFO] Completed processing batch 21/128 (16%) in 1,298ms
[INFO] Completed processing batch 22/128 (17%) in 1,213ms
[INFO] Completed processing batch 23/128 (18%) in 1,647ms
[INFO] Completed processing batch 24/128 (19%) in 1,635ms
[INFO] Completed processing batch 25/128 (20%) in 1,306ms
[INFO] Completed processing batch 26/128 (20%) in 1,692ms
[INFO] Completed processing batch 27/128 (21%) in 1,483ms
[INFO] Completed processing batch 28/128 (22%) in 1,172ms
[INFO] Completed processing batch 29/128 (23%) in 1,054ms
[INFO] Completed processing batch 30/128 (23%) in 1,502ms
[INFO] Completed processing batch 31/128 (24%) in 877ms
[INFO] Completed processing batch 32/128 (25%) in 835ms
[INFO] Completed processing batch 33/128 (26%) in 570ms
[INFO] Completed processing batch 34/128 (27%) in 817ms
[INFO] Completed processing batch 35/128 (27%) in 1,260ms
[INFO] Completed processing batch 36/128 (28%) in 644ms
[INFO] Completed processing batch 37/128 (29%) in 800ms
[INFO] Completed processing batch 38/128 (30%) in 1,143ms
[INFO] Completed processing batch 39/128 (30%) in 870ms
[INFO] Completed processing batch 40/128 (31%) in 520ms
[INFO] Completed processing batch 41/128 (32%) in 1,090ms
[INFO] Completed processing batch 42/128 (33%) in 933ms
[INFO] Completed processing batch 43/128 (34%) in 549ms
[INFO] Completed processing batch 44/128 (34%) in 812ms
[INFO] Completed processing batch 45/128 (35%) in 1,145ms
[INFO] Completed processing batch 46/128 (36%) in 1,106ms
[INFO] Completed processing batch 47/128 (37%) in 972ms
[INFO] Completed processing batch 48/128 (38%) in 206ms
[INFO] Completed processing batch 49/128 (38%) in 190ms
[INFO] Completed processing batch 50/128 (39%) in 522ms
[INFO] Completed processing batch 51/128 (40%) in 618ms
[INFO] Completed processing batch 52/128 (41%) in 944ms
[INFO] Completed processing batch 53/128 (41%) in 727ms
[INFO] Completed processing batch 54/128 (42%) in 611ms
[INFO] Completed processing batch 55/128 (43%) in 511ms
[INFO] Completed processing batch 56/128 (44%) in 280ms
[INFO] Completed processing batch 57/128 (45%) in 492ms
[INFO] Completed processing batch 58/128 (45%) in 624ms
[INFO] Completed processing batch 59/128 (46%) in 490ms
[INFO] Completed processing batch 60/128 (47%) in 667ms
[INFO] Completed processing batch 61/128 (48%) in 506ms
[INFO] Completed processing batch 62/128 (48%) in 498ms
[INFO] Completed processing batch 63/128 (49%) in 463ms
[INFO] Completed processing batch 64/128 (50%) in 445ms
[INFO] Completed processing batch 65/128 (51%) in 527ms
[INFO] Completed processing batch 66/128 (52%) in 553ms
[INFO] Completed processing batch 67/128 (52%) in 549ms
[INFO] Completed processing batch 68/128 (53%) in 515ms
[INFO] Completed processing batch 69/128 (54%) in 522ms
[INFO] Completed processing batch 70/128 (55%) in 654ms
[INFO] Completed processing batch 71/128 (55%) in 526ms
[INFO] Completed processing batch 72/128 (56%) in 529ms
[INFO] Completed processing batch 73/128 (57%) in 503ms
[INFO] Completed processing batch 74/128 (58%) in 481ms
[INFO] Completed processing batch 75/128 (59%) in 586ms
[INFO] Completed processing batch 76/128 (59%) in 588ms
[INFO] Completed processing batch 77/128 (60%) in 464ms
[INFO] Completed processing batch 78/128 (61%) in 550ms
[INFO] Completed processing batch 79/128 (62%) in 608ms
[INFO] Completed processing batch 80/128 (63%) in 829ms
[INFO] Completed processing batch 81/128 (63%) in 518ms
[INFO] Completed processing batch 82/128 (64%) in 488ms
[INFO] Completed processing batch 83/128 (65%) in 459ms
[INFO] Completed processing batch 84/128 (66%) in 467ms
[INFO] Completed processing batch 85/128 (66%) in 666ms
[INFO] Completed processing batch 86/128 (67%) in 577ms
[INFO] Completed processing batch 87/128 (68%) in 514ms
[INFO] Completed processing batch 88/128 (69%) in 631ms
[INFO] Completed processing batch 89/128 (70%) in 449ms
[INFO] Completed processing batch 90/128 (70%) in 485ms
[INFO] Completed processing batch 91/128 (71%) in 540ms
[INFO] Completed processing batch 92/128 (72%) in 608ms
[INFO] Completed processing batch 93/128 (73%) in 360ms
[INFO] Completed processing batch 94/128 (73%) in 387ms
[INFO] Completed processing batch 95/128 (74%) in 495ms
[INFO] Completed processing batch 96/128 (75%) in 892ms
[INFO] Completed processing batch 97/128 (76%) in 442ms
[INFO] Completed processing batch 98/128 (77%) in 571ms
[INFO] Completed processing batch 99/128 (77%) in 543ms
[INFO] Completed processing batch 100/128 (78%) in 588ms
[INFO] Completed processing batch 101/128 (79%) in 546ms
[INFO] Completed processing batch 102/128 (80%) in 619ms
[INFO] Completed processing batch 103/128 (80%) in 608ms
[INFO] Completed processing batch 104/128 (81%) in 610ms
[INFO] Completed processing batch 105/128 (82%) in 554ms
[INFO] Completed processing batch 106/128 (83%) in 396ms
[INFO] Completed processing batch 107/128 (84%) in 548ms
[INFO] Completed processing batch 108/128 (84%) in 497ms
[INFO] Completed processing batch 109/128 (85%) in 433ms
[INFO] Completed processing batch 110/128 (86%) in 498ms
[INFO] Completed processing batch 111/128 (87%) in 62ms
[INFO] Completed processing batch 112/128 (88%) in 64ms
[INFO] Completed processing batch 113/128 (88%) in 543ms
[INFO] Completed processing batch 114/128 (89%) in 528ms
[INFO] Completed processing batch 115/128 (90%) in 643ms
[INFO] Completed processing batch 116/128 (91%) in 418ms
[INFO] Completed processing batch 117/128 (91%) in 125ms
[INFO] Completed processing batch 118/128 (92%) in 503ms
[INFO] Completed processing batch 119/128 (93%) in 493ms
[INFO] Completed processing batch 120/128 (94%) in 414ms
[INFO] Completed processing batch 121/128 (95%) in 475ms
[INFO] Completed processing batch 122/128 (95%) in 63ms
[INFO] Completed processing batch 123/128 (96%) in 79ms
[INFO] Completed processing batch 124/128 (97%) in 528ms
[INFO] Completed processing batch 125/128 (98%) in 96ms
[INFO] Completed processing batch 126/128 (98%) in 197ms
[INFO] Completed processing batch 127/128 (99%) in 63ms
[INFO] Completed processing batch 128/128 (100%) in 62ms
[INFO] Updating CISA Known Exploited Vulnerability list: https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
[INFO] Begin database defrag

@hpriya19
Copy link

hpriya19 commented Jul 2, 2024

Seeing the same issues on our pipelines too with version 10.0.0

RUN /tmp/dependency-check/bin/dependency-check.sh --updateonly  --nvdApiKey ${NVD_API_KEY} --nvdApiDelay 3000
...
[ERROR] Updating CVE: CVE-2022-0551
[ERROR] Updating CVE: CVE-2021-22543
[WARN] NVD API request failures are occurring; retrying request for the 5 time
[WARN] NVD API request failures are occurring; retrying request for the 5 time
[INFO] Downloaded 190,000/255,604 (74%)
[ERROR] Updating CVE: CVE-2022-3474
[INFO] Downloaded 200,000/255,604 (78%)
[ERROR] Updating CVE: CVE-2023-29245
[ERROR] Updating CVE: CVE-2023-2567
[ERROR] Updating CVE: CVE-2023-32649
[INFO] Downloaded 210,000/255,604 (82%)
[ERROR] Updating CVE: CVE-2022-4259
[INFO] Downloaded 220,000/255,604 (86%)
[WARN] NVD API request failures are occurring; retrying request for the 5 time
....

@eoc-ross
Copy link

eoc-ross commented Jul 2, 2024

Same here...

#11 [8/8] RUN   bin/dependency-check.sh --updateonly --nvdApiKey ${APIKEY} --nvdApiDelay 3000
#11 1.316 [INFO] Checking for updates
#11 62.89 [INFO] NVD API has 255,676 records in this update
#11 94.71 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 102.2 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 102.2 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 102.2 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 102.3 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 148.6 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 149.5 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 152.3 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 158.0 [WARN] NVD API request failures are occurring; retrying request for the 7 time
#11 165.6 [INFO] Downloaded 10,000/255,676 (4%)
#11 232.8 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 240.3 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 240.7 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 248.0 [INFO] Downloaded 20,000/255,676 (8%)
#11 248.3 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 249.4 [WARN] NVD API request failures are occurring; retrying request for the 7 time
#11 257.4 [WARN] NVD API request failures are occurring; retrying request for the 7 time
#11 260.2 [WARN] NVD API request failures are occurring; retrying request for the 8 time
#11 268.2 [WARN] NVD API request failures are occurring; retrying request for the 8 time
#11 272.5 [WARN] NVD API request failures are occurring; retrying request for the 9 time
#11 278.2 [WARN] NVD API request failures are occurring; retrying request for the 5 time
#11 280.5 [WARN] NVD API request failures are occurring; retrying request for the 9 time
#11 300.5 [WARN] NVD API request failures are occurring; retrying request for the 6 time
#11 325.5 [WARN] NVD API request failures are occurring; retrying request for the 10 time
#11 326.5 [WARN] NVD API request failures are occurring; retrying request for the 10 time
#11 337.5 [INFO] Downloaded 30,000/255,676 (12%)

@jeremylong
Copy link
Owner

@rupreck - the errors listed are from me accidentally leaving a line of debug code in place. You update worked successfully. I'll remove my debug code LOGGER.error("Updating CVE: {}" , cve.getCve().getId());. sorry about the confusion.

@jeremylong
Copy link
Owner

jeremylong commented Jul 2, 2024

The issue with CvssMetricV40 has been resolved - as such, I am closing this issue.

You can follow along with this projects inability to do anything about the NVD API returning a 503/timeout/etc. here: #6758

Biggest suggestion is to use an API key and increase the nvdApiDelay and nvdMaxRetryCount...

@PeterPaulH
Copy link

First of all, thanks for all updates.
Second: I believe there is an error in the file: core/src/main/resources/data/initialize_mysql.sql
There is a comma missing at the end of line: 189
And the version at the end is set to 5.4 and not to 5.5

When I make these changes manually it al starts to work (waiting on update right now, that's taking some time).

@jeremylong
Copy link
Owner

@PeterPaulH thank you for the report. We are fixing the script now: #6776

@localhorst-org
Copy link

thx a lot
and in case of

https://raw.githubusercontent.com/jeremylong/DependencyCheck/v10.0.1/core/src/main/resources/data/initialize_postgres.sql

at the end i change the Version manually from 5.4 to 5.5

@arnabcse28
Copy link

arnabcse28 commented Jul 2, 2024

Thanks @jeremylong for the quick fixes.
I am trying to update Jenkins's plugin to use the latest lib but I can's see 10.0.1 even after pulling latest plugin updates.
I see v10.0.1 at github but looks like Jenkins is not getting it: https://github.com/jeremylong/DependencyCheck/tree/v10.0.1

lread added a commit to clj-commons/clj-yaml that referenced this issue Jul 2, 2024
This gets rid of log lines like:
```
[2024-07-02 03:51:36.108] ERROR CveDB - Updating CVE: CVE-2024-5635
```
Which were not errors but debug log lines left in by accident:

- jeremylong/DependencyCheck#6746 (comment)
- jeremylong/DependencyCheck@8c731cd
lread added a commit to clj-commons/pomegranate that referenced this issue Jul 2, 2024
This gets rid of log lines like:
```
[2024-07-02 03:51:36.108] ERROR CveDB - Updating CVE: CVE-2024-5635
```
Which were not errors but debug log lines left in by accident:

- jeremylong/DependencyCheck#6746 (comment)
- jeremylong/DependencyCheck@8c731cd
lread added a commit to clj-commons/clj-yaml that referenced this issue Jul 2, 2024
This gets rid of log lines like:
```
[2024-07-02 03:51:36.108] ERROR CveDB - Updating CVE: CVE-2024-5635
```
Which were not errors but debug log lines left in by accident:

- jeremylong/DependencyCheck#6746 (comment)
- jeremylong/DependencyCheck@8c731cd
lread added a commit to clj-commons/pomegranate that referenced this issue Jul 2, 2024
This gets rid of log lines like:
```
[2024-07-02 03:51:36.108] ERROR CveDB - Updating CVE: CVE-2024-5635
```
Which were not errors but debug log lines left in by accident:

- jeremylong/DependencyCheck#6746 (comment)
- jeremylong/DependencyCheck@8c731cd
@fmarot
Copy link
Contributor

fmarot commented Jul 3, 2024

Sorry for the question which may seem dumb but: are we forced to upgrade immediately to version 10+ because older version's databases cannot be updated anymore due to the new field cvssMetricV40 ?

@rupreck
Copy link

rupreck commented Jul 3, 2024

Closed, but it produced breaking changes. The SonarQube Hotspots feature no longer contains Dependency Hotspots.

Will raise with maintainers of that plugin, but this has been extremely disruptive.

@jeremylong
Copy link
Owner

You need to upgrade to ODC 10+. Additionally, we have not updated the reports at all - only the parsing of the NVD data. Updating the reports will occur in a future version. Any issues currently being faced are likely due to the NVD API not being available - they are aware of the problem and are working on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.