-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update for CNB spec 0.8
(Including SBOM support)
#489
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8415ad9
to
92df50f
Compare
e017a10
to
d912f24
Compare
8fe7765
to
bd66373
Compare
57362b1
to
5faabe4
Compare
c74b51a
to
412a2ef
Compare
6cb72fe
to
6d679ef
Compare
This was clarified in the upstream buildpack API 0.7: buildpacks/spec#265
6d679ef
to
ffc4c0d
Compare
edmorley
requested changes
Aug 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you!
Requesting changes pending the discussion about the WorkingDirectory
enum vs using Option<PathBuf>
.
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
edmorley
approved these changes
Aug 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates libcnb.rs to target CNB spec
0.8
. Changes between0.6
and0.8
are minimal with the exception of SBOM support which takes up the majority of this PR. I opted to not open a0.8
branch and target multiple PRs to it to speed up the process. Look at individual commits for easier review.Relevant Documentation
Note on Cloud Native Buildpacks RFC 100
In version
0.8
, a change has landed that added environment variables for values that were previously command line arguments to/bin/detect
and/bin/build
. This is an optional change since the classic command line arguments are still passed in and will never be removed (ref). I decided to not switch over to the environment variables for this PR to keep it smaller. We can easily decide later to make the switch. Right now, I see no benefits for libcnb.rs itself or its users.Highlight: SBOM Support
Since the CNB specification supports multiple SBOM formats and there are many ways to generate and represent them, libcnb.rs treats them as raw bytes with attached metadata about the format.
This means there is no direct support for generating an SBOM file with libcnb.rs. Buildpack authors are expected to leverage external tooling such as build tool plugins or Rust crates to generate SBOM files.
We expect most buildpacks to use language specific tooling directly instead of implementing SBOM generation themselves. Examples are cyclonedx-maven-plugin, sbt-bill-of-materials, cyclone-dx-gradle-plugin, cyclonedx-ruby, cyclonedx-rust-cargo. Alternatively,
syft
has support for many ecosystems built-in: https://github.com/anchore/syft#supported-ecosystems.libcnb.rs offers
From
implementations for Rust SBOM libraries (currently only cyclonedx-bom) so that these library types can be used directory with libcnb.rs without an explicit conversion step. Enable the appropriate features to gain access to them.As the Rust SBOM ecosystem expands, we will add support for additional libraries. Support is quite sparse right now: crates.io: Crates with 'SBOM' keyword.
Highlight: SBOM Testing Support
libcnb-test
was updated to allow downloading of SBOM files from a built OCI image. This feature usespack sbom download
under the hood and provides an easy way to lookup SBOM files in the rather complex directory structurepack sbom download
creates.Fixes #270, Fixes #271, Fixes #299, Fixes #298, Fixes #294, Fixes #269, Fixes GUS-W-10502884