dependency-check/azuredevops

[error]Dependency Check exited with an error code (exit code: 13)

Closed this issue · 3 comments

Describe the bug
Since the upgrade of 9.x we never had a successful scan through azure Devops pipeline, reading the other user's issue seems to be that NVD API KEY is required, but how do we use this in our pipeline using this plugin?

To Reproduce
Steps to reproduce the behavior:
run the plugin in Azure pipeline

Expected behavior
Scan should be successful and produce a report

Logs

2023-12-07T15:05:07.5414369Z org.h2.message.DbException: Log file error: "D:/a/_tasks/dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72/6.1.3/dependency-check/data/odc.trace.db", cause: "java.nio.file.FileSystemException: D:\\a\\_tasks\\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\\6.1.3\\dependency-check\\data\\odc.trace.db: There is not enough space on the disk.\000d\000a" [90034-214]
2023-12-07T15:05:07.5862578Z org.h2.message.DbException: Log file error: "D:/a/_tasks/dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72/6.1.3/dependency-check/data/odc.trace.db", cause: "java.nio.file.FileSystemException: D:\\a\\_tasks\\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\\6.1.3\\dependency-check\\data\\odc.trace.db: There is not enough space on the disk.\000d\000a" [90034-214]
2023-12-07T15:05:07.5917352Z 	at org.h2.message.DbException.get(DbException.java:212)
2023-12-07T15:05:07.5917352Z 	at org.h2.message.DbException.get(DbException.java:212)
2023-12-07T15:05:07.5917943Z 	at org.h2.message.TraceSystem.logWritingError(TraceSystem.java:294)
2023-12-07T15:05:07.5918268Z 	at org.h2.message.TraceSystem.openWriter(TraceSystem.java:315)
2023-12-07T15:05:07.5918618Z 	at org.h2.message.TraceSystem.writeFile(TraceSystem.java:263)
2023-12-07T15:05:07.5919131Z 	at org.h2.message.TraceSystem.write(TraceSystem.java:247)
2023-12-07T15:05:07.5919452Z 	at org.h2.message.Trace.error(Trace.java:173)
2023-12-07T15:05:07.5919739Z 	at org.h2.engine.Database.setBackgroundException(Database.java:1791)
2023-12-07T15:05:07.5920571Z 	at org.h2.mvstore.db.Store.lambda$new$0(Store.java:125)
2023-12-07T15:05:07.5920923Z 	at org.h2.mvstore.MVStore.handleException(MVStore.java:3318)
2023-12-07T15:05:07.5921214Z 	at org.h2.mvstore.MVStore.panic(MVStore.java:593)
2023-12-07T15:05:07.5921541Z 	at org.h2.mvstore.MVStore.write(MVStore.java:1271)
2023-12-07T15:05:07.5921823Z 	at org.h2.mvstore.MVStore.storeBuffer(MVStore.java:1750)
2023-12-07T15:05:07.5922164Z 	at org.h2.mvstore.MVStore.lambda$serializeAndStore$5(MVStore.java:1600)
2023-12-07T15:05:07.5922481Z 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2023-12-07T15:05:07.5922825Z 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2023-12-07T15:05:07.5923184Z 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2023-12-07T15:05:07.5923516Z 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2023-12-07T15:05:07.5924506Z 	at java.lang.Thread.run(Thread.java:750)
2023-12-07T15:05:07.5925059Z Caused by: org.h2.jdbc.JdbcSQLNonTransientException: Log file error: "D:/a/_tasks/dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72/6.1.3/dependency-check/data/odc.trace.db", cause: "java.nio.file.FileSystemException: D:\\a\\_tasks\\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\\6.1.3\\dependency-check\\data\\odc.trace.db: There is not enough space on the disk.\000d\000a" [90034-214]
2023-12-07T15:05:07.5925771Z 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
2023-12-07T15:05:07.5926167Z 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
2023-12-07T15:05:07.5926418Z 	... 18 more
2023-12-07T15:05:07.5926799Z Caused by: java.nio.file.FileSystemException: D:\a\_tasks\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\6.1.3\dependency-check\data\odc.trace.db: There is not enough space on the disk.
2023-12-07T15:05:07.5927039Z 
2023-12-07T15:05:07.5928048Z 	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
2023-12-07T15:05:07.5928407Z 	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
2023-12-07T15:05:07.5928771Z 	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
2023-12-07T15:05:07.5929118Z 	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
2023-12-07T15:05:07.5929504Z 	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
2023-12-07T15:05:07.5929854Z 	at java.nio.file.Files.newOutputStream(Files.java:216)
2023-12-07T15:05:07.5930161Z 	at org.h2.store.fs.disk.FilePathDisk.newOutputStream(FilePathDisk.java:376)
2023-12-07T15:05:07.5930517Z 	at org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:306)
2023-12-07T15:05:07.5930818Z 	at org.h2.message.TraceSystem.openWriter(TraceSystem.java:312)
2023-12-07T15:05:07.5931100Z 	... 15 more
2023-12-07T15:05:12.1895107Z ##[debug]Agent running environment resource - Disk:C:\ Windows available:81069.00MB out of 261643.00MB, Memory: used 37MB out of 7167MB, CPU: usage 0.14
2023-12-07T15:05:17.1955982Z ##[debug]Agent running environment resource - Disk:C:\ Windows available:81069.00MB out of 261643.00MB, Memory: used 37MB out of 7167MB, CPU: usage 0.14
2023-12-07T15:05:22.2061722Z ##[debug]Agent running environment resource - Disk:C:\ Windows available:81069.00MB out of 261643.00MB, Memory: used 37MB out of 7167MB, CPU: usage 0.14
2023-12-07T15:05:27.6811491Z ##[debug]Agent running environment resource - Disk:C:\ Windows available:81069.00MB out of 261643.00MB, Memory: used 37MB out of 7167MB, CPU: usage 0.14
2023-12-07T15:05:30.5097424Z [INFO] Downloaded 210,000/232,485 (90%)
2023-12-07T15:05:30.5139661Z [ERROR] Failed to process CVE-2023-0941
****omit some logs***
2023-12-07T16:04:35.9755319Z Caused by: org.h2.mvstore.MVStoreException: Writing to sun.nio.ch.FileChannelImpl@d5035fe failed; length 1605632 at 374456320 [2.1.214/2]
2023-12-07T16:04:35.9755642Z 	at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
2023-12-07T16:04:35.9755876Z 	at org.h2.mvstore.DataUtils.writeFully(DataUtils.java:493)
2023-12-07T16:04:35.9756149Z 	at org.h2.mvstore.FileStore.writeFully(FileStore.java:113)
2023-12-07T16:04:35.9756366Z 	at org.h2.mvstore.MVStore.write(MVStore.java:1269)
2023-12-07T16:04:35.9756594Z 	... 7 common frames omitted
2023-12-07T16:04:35.9757090Z Caused by: java.io.IOException: There is not enough space on the disk
2023-12-07T16:04:35.9757352Z 	at sun.nio.ch.FileDispatcherImpl.pwrite0(Native Method)
2023-12-07T16:04:35.9757622Z 	at sun.nio.ch.FileDispatcherImpl.pwrite(FileDispatcherImpl.java:81)
2023-12-07T16:04:35.9757858Z 	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89)
2023-12-07T16:04:35.9758109Z 	at sun.nio.ch.IOUtil.write(IOUtil.java:65)
2023-12-07T16:04:35.9758336Z 	at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:772)
2023-12-07T16:04:35.9758620Z 	at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:755)
2023-12-07T16:04:35.9758847Z 	at org.h2.mvstore.DataUtils.writeFully(DataUtils.java:489)
2023-12-07T16:04:35.9759075Z 	... 9 common frames omitted
2023-12-07T16:04:35.9759299Z [WARN] Unable to update 1 or more Cached Web DataSource, using local data instead. Results may not include recent vulnerabilities.
2023-12-07T16:04:35.9759586Z [ERROR] Unable to continue dependency-check analysis.
2023-12-07T16:04:36.0045086Z [ERROR] One or more fatal errors occurred
2023-12-07T16:04:36.0045754Z [ERROR] org.h2.jdbc.JdbcBatchUpdateException: The database has been closed [90098-214]
2023-12-07T16:04:36.0049039Z [ERROR] No documents exist
2023-12-07T16:04:36.1338477Z 
2023-12-07T16:04:36.1443027Z ##[debug]Exit code 13 received from tool 'D:\a\_tasks\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\6.1.3\dependency-check\bin\dependency-check.bat'
2023-12-07T16:04:36.1444283Z ##[debug]STDIO streams have closed for tool 'D:\a\_tasks\dependency-check-build-task_47ea1f4a-57ba-414a-b12e-c44f42765e72\6.1.3\dependency-check\bin\dependency-check.bat'
2023-12-07T16:04:36.1525137Z Dependency Check completed with exit code 13.
2023-12-07T16:04:36.1528971Z Dependency Check reports:
2023-12-07T16:04:36.1529756Z ##[debug]defaultRoot: 'D:\a\1\TestResults\dependency-check'
2023-12-07T16:04:36.1543828Z ##[debug]findOptions.allowBrokenSymbolicLinks: 'false'
2023-12-07T16:04:36.1544287Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2023-12-07T16:04:36.1551620Z ##[debug]findOptions.followSymbolicLinks: 'true'
2023-12-07T16:04:36.1555167Z ##[debug]matchOptions.debug: 'false'
2023-12-07T16:04:36.1555851Z ##[debug]matchOptions.nobrace: 'true'
2023-12-07T16:04:36.1556372Z ##[debug]matchOptions.noglobstar: 'false'
2023-12-07T16:04:36.1556758Z ##[debug]matchOptions.dot: 'true'
2023-12-07T16:04:36.1557148Z ##[debug]matchOptions.noext: 'false'
2023-12-07T16:04:36.1557515Z ##[debug]matchOptions.nocase: 'true'
2023-12-07T16:04:36.1557890Z ##[debug]matchOptions.nonull: 'false'
2023-12-07T16:04:36.1558263Z ##[debug]matchOptions.matchBase: 'false'
2023-12-07T16:04:36.1578570Z ##[debug]matchOptions.nocomment: 'false'
2023-12-07T16:04:36.1579488Z ##[debug]matchOptions.nonegate: 'false'
2023-12-07T16:04:36.1579931Z ##[debug]matchOptions.flipNegate: 'false'
2023-12-07T16:04:36.1580300Z ##[debug]pattern: '**/*.*'
2023-12-07T16:04:36.1635908Z ##[debug]findPath: 'D:\a\1\TestResults\dependency-check'
2023-12-07T16:04:36.1636525Z ##[debug]statOnly: 'false'
2023-12-07T16:04:36.1636926Z ##[debug]findPath: 'D:\a\1\TestResults\dependency-check'
2023-12-07T16:04:36.1637324Z ##[debug]findOptions.allowBrokenSymbolicLinks: 'false'
2023-12-07T16:04:36.1637732Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2023-12-07T16:04:36.1638130Z ##[debug]findOptions.followSymbolicLinks: 'true'
2023-12-07T16:04:36.1669694Z ##[debug]  D:\a\1\TestResults\dependency-check (directory)
2023-12-07T16:04:36.1682511Z ##[debug]  D:\a\1\TestResults\dependency-check\log (file)
2023-12-07T16:04:36.1683123Z ##[debug]2 results
2023-12-07T16:04:36.1683627Z ##[debug]found 2 paths
2023-12-07T16:04:36.1684095Z ##[debug]applying include pattern
2023-12-07T16:04:36.1684596Z ##[debug]adjustedPattern: 'D:\a\1\TestResults\dependency-check\**/*.*'
2023-12-07T16:04:36.1701557Z ##[debug]0 matches
2023-12-07T16:04:36.1702083Z ##[debug]0 final results
2023-12-07T16:04:36.1746216Z []
2023-12-07T16:04:36.1753735Z Dependency Check failed with message "Dependency Check exited with an error code (exit code: 13)."
2023-12-07T16:04:36.1754791Z ##[debug]task result: Failed
2023-12-07T16:04:36.1977243Z ##[error]Dependency Check exited with an error code (exit code: 13).
2023-12-07T16:04:36.2018135Z ##[debug]Processed: ##vso[task.issue type=error;]Dependency Check exited with an error code (exit code: 13).
2023-12-07T16:04:36.2037091Z ##[debug]Processed: ##vso[task.complete result=Failed;]Dependency Check exited with an error code (exit code: 13).
2023-12-07T16:04:36.2037551Z Ending Dependency Check...
2023-12-07T16:04:36.2302610Z ##[section]Finishing: Dependency Check

Hi!

You can use the key via the Additional Arguments something like this:

image

You can also define it via the UI, if you are not using YAML. Like this:

image

Also the problem for you might be that you need more space:

2023-12-07T16:04:35.9757090Z Caused by: java.io.IOException: There is not enough space on the disk

Thanks @Saturate adding the API key in the azure devops works, and seems like the out of memory issue is also related to this, maybe because of too many retry. we can close this. Thanks for the help