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

Polish PR: Additional updates for SBOM Support #98

Merged
merged 2 commits into from Nov 24, 2021
Merged

Conversation

samj1912
Copy link
Member

This adds tests for #97 and makes validate SBOM function to be private.

cc: @dmikusa-pivotal

Daniel Mikusa and others added 2 commits November 20, 2021 21:35
- Adds SBOMFormats (maps to `sbom-formats` in buildpack.toml) to the BuildpackInfo struct. This makes the information accessible to buildpacks.
- Modifies build such that it only writes the old-style build and launch BOM information if the buildpack API is less than 0.7. If it's 0.7+, it should not write the old style format as that can conflict with the new SBOM format and cause the lifecycle to fail. Omits a warning message if this occurs.
- Adds validation of the new SBOM files that are written by a buildpack. We check that the extension matches up with a valid MIME type that is listed in buildpack.toml's `sbom-formats` field. If it does not match up, then it fails. This should not generally happen with published buildpacks. This check can be helpful while authoring buildpacks, to ensure everything is correctly setup.

Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
@samj1912 samj1912 added semver:patch A change requiring a patch version bump type:enhancement A general enhancement labels Nov 23, 2021
@samj1912 samj1912 merged commit a33b367 into main Nov 24, 2021
@samj1912 samj1912 deleted the polish-pr-97 branch November 24, 2021 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants