Skip to content

Dependency-check 10.0.0 hosted DB errors #6764

@yansifw

Description

@yansifw

Describe the bug
After upgrading the schema from https://github.com/jeremylong/DependencyCheck/blob/main/core/src/main/resources/data/initialize_postgres.sql and dependency-check 10.0.0 version I have dropped the full DB and created it from scratch, but when updating the CVEs I always get this error:

[ERROR] Failed to process CVE-2000-0564
org.owasp.dependencycheck.analyzer.exception.UnexpectedAnalysisException: org.postgresql.util.PSQLException: The column index is out of range: 71, number of columns: 70.
at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability(CveDB.java:1406)
at org.owasp.dependencycheck.data.nvdcve.CveDB.updateVulnerability(CveDB.java:1100)
at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.updateCveDb(NvdApiProcessor.java:119)
at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call(NvdApiProcessor.java:96)
at org.owasp.dependencycheck.data.update.nvd.api.NvdApiProcessor.call(NvdApiProcessor.java:40)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: org.postgresql.util.PSQLException: The column index is out of range: 71, number of columns: 70.
at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:225)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:521)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:521)
at org.owasp.dependencycheck.data.nvdcve.CveDB.updateOrInsertVulnerability(CveDB.java:1383)
... 8 common frames omitted

Version of dependency-check used
The problem occurs using version 10.0.0 of the CLI

Log file
When reporting errors, 99% of the time log file output is required. Please post the log file as a gist and provide a link in the new issue.

To Reproduce
Steps to reproduce the behavior:
./dependency-check.sh --dbDriverName org.postgresql.Driver --connectionString jdbc:postgresql://localhost/audit --dbUser test --dbPassword test --updateonly --nvdApiKey $API_KEY

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions