Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a list of packaged files (SBOM, CycloneDX) as an output #88

Open
plaird opened this issue Feb 11, 2021 · 0 comments
Open

Provide a list of packaged files (SBOM, CycloneDX) as an output #88

plaird opened this issue Feb 11, 2021 · 0 comments

Comments

@plaird
Copy link
Contributor

plaird commented Feb 11, 2021

In addition to the executable jar, the rule should produce a Bill of Materials that lists everything packaged in the jar.

The Maven plugin beat us to this. I like their solution, so look at what they are doing:
https://spring.io/blog/2024/05/24/sbom-support-in-spring-boot-3-3

Two outputs:

  • bundle the SBOM inside the springboot executable jar
  • make the SBOM a Bazel output (or a separate rule), such that input into other rules, such as custom validation rules. "scan the SBOM and look for xyz and fail my build if it is found"
sprintboot(
   ...
   sbom_generate = True, # default True as of 2.4.0
   sbom_format = "cyclonedx", # only supported value as of 2.4.0
)

Implemenation:
I learned at BazelCon rules_license has apparently gotten support from rules_jvm_external to populate the sbom provider. Look into rules_license as the primary means for generating the sbom. Balance the benefits of that against taking a hard dependency on another project.

@plaird plaird changed the title Provide a list of packaged files (BOM) as an output Provide a list of packaged files (SBOM, CycloneDX) as an output Oct 29, 2024
@plaird plaird added the 2.4.0 label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant