SBOM generation and CVE checking #90604
Unanswered
Rico-van-Dongen
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I think I found a tiny bug in the SBOM writer scripts. ( zephyr/scripts/west_commands/zspdx/writer.py Line 104 in 21b20de according to https://spdx.github.io/spdx-spec/v2.3/package-information/#721-external-reference-field the package manager field should be of type 'PACKAGE-MANAGER' rather than 'PACKAGE_MANAGER' I manually changed the underscore in the output spdx file and then the processing works fine. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
lately we started making use of the
west spdx
command to generate SBOM files and it works pretty nice. We are using cve-bin-tool to automatically also check for vulnerabilities but there something goes wrong.I tried deliberately to use an older version of mbedtls in my project such that it would flag the vulnerability but mbedtls is not being recognized correctly.
I've debugged the generated SPDX files and i found that the cve-bin-tool gets confused by the PURL reference.
as an example, the generated modlules-deps.spdx has an entry like this:
if I run this file trough the vulnerability scanner, mbedtls is not correctly listed with a vendor and version and more importantly no vulnerability is flagged. instead in only shows the product mbedtls-deps with unknown vendor
however, if I take out the
ExternalRef: PACKAGE_MANAGER purl pkg:github/Mbed-TLS/mbedtls@V3.5.1
then it is correctly identified and the vulnerability is correctly flagged.Does anybody happen to know if there is a way to skip purl references from my sbom generation or knows an alternative vulnerability scanner that does correctly link the purl and the cpe reference?
furthermore. I noticed that the mbtls repo uses 'trusedfirmware' in their cpe reference as vendor rather than 'arm' perhaps this should be adopted in the zephyr fork to avoid confusion?
https://github.com/Mbed-TLS/mbedtls/blob/127c78e5895640206b5426f9a0888699d71d38fa/scripts/sbom.cdx.json#L16
finally, it would be nice if all the other zephyr forks get a cpe entry in their module.yml such that the SBOM gets more and more complete.
Beta Was this translation helpful? Give feedback.
All reactions