using dotnet to generate SBOM

SBOM is really useful to ensure we are using secure packages in our code base. This involve ensuring we are aware of any CVE / vulnerable packages. And this is what SBOM comes into the picture. There are many tool that you can use such as CycloneDX, SPDX and SWID.

In this post, we are going to look at CycloneDX.

dotnet tool install --global CycloneDX

Then you can generate a sbom.xml (by default) in OUTPUT_DIRECTORY)

dotnet CycloneDX <path> -o <OUTPUT_DIRECTORY>

To output in json instead of XML. 

dotnet CycloneDX . -o sbom --json

A example output for my test project

And then you can use tool like trivy to check for vulnerabilities

trivy sbom .\sbom.json




https://github.com/CycloneDX/cyclonedx-dotnet



Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm