When running atlassian/bitbucket-dependency-scanner:0.6.0
in our Bitbucket Pipelines, the scanner detects vulnerabilities in the Hangfire.MySqlStorage
package but does not generate a CodeInsights Report like with other vulnerabilities.
Observed behaviour:
- The scanner flags Hangfire.MySqlStorage
due to vulnerabilities in its dependencies.
- No detailed report is generated, leaving us without actionable information.
- Previous versions (0.3.0) fail due to EoF errors, so downgrading is not a viable workaround.
Is this a known issue with 0.6.0
? Are there any recommended fixes or workarounds to obtain a detailed report?
Logs:
... Status: Downloaded newer image for bitbucketpipelines/bitbucket-dependency-scanner:0.6.0 [31m✖ Dependency scan failed. The result status code: 15, [INFO] Checking for updates [INFO] NVD API has 1,242 records in this update [INFO] Downloaded 1,242/1,242 (100%) [INFO] Completed processing batch 1/1 (100%) in 4,822ms [INFO] Updating CISA Known Exploited Vulnerability list: https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json [INFO] Begin database defrag [INFO] End database defrag (10333 ms) [INFO] Check for updates complete (34988 ms) [INFO] 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. About ODC: https://jeremylong.github.io/DependencyCheck/general/internals.html False Positives: https://jeremylong.github.io/DependencyCheck/general/suppression.html 💖 Sponsor: https://github.com/sponsors/jeremylong [INFO] Analysis Started [INFO] Finished File Name Analyzer (0 seconds) [INFO] Finished MSBuild Project Analyzer (0 seconds) [WARN] Analyzing `/src/package-lock.json` - however, the node_modules directory does not exist. Please run `npm install` prior to running dependency-check [INFO] Finished Node.js Package Analyzer (0 seconds) [INFO] Finished Dependency Merging Analyzer (0 seconds) [INFO] Finished Hint Analyzer (0 seconds) [INFO] Finished Version Filter Analyzer (0 seconds) [INFO] Created CPE Index (2 seconds) [INFO] Finished NPM CPE Analyzer (3 seconds) [INFO] Created CPE Index (3 seconds) [INFO] Finished CPE Analyzer (3 seconds) [INFO] Finished False Positive Analyzer (0 seconds) [INFO] Finished NVD CVE Analyzer (0 seconds) [INFO] Finished Node Audit Analyzer (0 seconds) [INFO] Finished Sonatype OSS Index Analyzer (0 seconds) [INFO] Finished Vulnerability Suppression Analyzer (0 seconds) [INFO] Finished Known Exploited Vulnerability Analyzer (0 seconds) [INFO] Finished Dependency Bundling Analyzer (0 seconds) [INFO] Finished Unused Suppression Rule Analyzer (0 seconds) [INFO] Analysis Complete (8 seconds) [INFO] Writing JSON report to: /opt/atlassian/pipelines/agent/build/./dependency-check-report.json [ERROR] One or more dependencies were identified with vulnerabilities that have a CVSS score greater than or equal to '7.0': AuthenticatedWebsitesDS.SyncService.csproj (pkg:nuget/Hangfire.MySqlStorage@2.0.3, cpe:2.3:a:hangfire:hangfire:2.0.3:*:*:*:*:*:*:*, cpe:2.3:a:mysql:mysql:2.0.3:*:*:*:*:*:*:*, cpe:2.3:a:storage_project:storage:2.0.3:*:*:*:*:*:*:*, cpe:2.3:a:www-sql_project:www-sql:2.0.3:*:*:*:*:*:*:*): CVE-2017-15945(7.8) See the dependency-check report for more details. Feb 20, 2025 7:26:54 AM org.apache.lucene.util.HotspotVMOptions WARNING: Lucene cannot optimize algorithms or calculate object sizes for JVMs that are not based on Hotspot or a compatible implementation. WARNING: A restricted method in java.lang.foreign.Linker has been called WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module Feb 20, 2025 7:26:54 AM org.apache.lucene.store.MemorySegmentIndexInputProvider INFO: Using MemorySegmentIndexInput and native madvise support with Java 21 or later; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false Feb 20, 2025 7:26:54 AM org.apache.lucene.internal.vectorization.VectorizationProvider lookup WARNING: Java runtime is not using Hotspot VM; Java vector incubator API can't be enabled. [0m Searching for files matching artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/** Artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/** matched 0 files
Hi Max and welcome to the community.
The pipe generates a file named dependency-check-report.json in the build directory. If you want to access it, you can define it as an artifact in your step. You could use a definition as follows:
script:
- pipe: atlassian/bitbucket-dependency-scanner:0.6.0
variables:
NVD_API_KEY: $NVD_API_KEY
artifacts:
- dependency-check-report.json
When the step finishes, if you open the build log of this step on Bitbucket's website, you will see a tab named Artifacts where you can download the file. Please keep in mind that artifacts are stored for 14 days following the execution of the step that produced them. If you need artifact storage for longer than 14 days, you could upload the file to the Downloads page of the repo or to a server of yours. If you upload to the Downloads page, please keep in mind that when a file is uploaded with the same name as an existing file, then the existing file will be replaced. You may want to rename the file to append the build number before uploading it.
It is also possible to use the variable DEBUG: "true" in the pipe and then the pipe will generate verbose logging information as an artifact dependency-check-report-bitbucket-build-number.log. You could use a definition as follows for this:
script:
- pipe: atlassian/bitbucket-dependency-scanner:0.6.0
variables:
NVD_API_KEY: $NVD_API_KEY
DEBUG: "true"
artifacts:
- dependency-check-report-*.log
With regards to the CodeInsights Report not being generated, are there perhaps more than 10 reports on the commit the build ran for or more than 1000 annotations on a report? We have a limit of 10 reports per commit and 1000 annotations per report.
Kind regards,
Theodora
Hi @Max Harazin.
Please, provide us with bitbucket-pipelines.yml configuration file to properly understand your case.
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.