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

sambhav
Copy link
Member

@sambhav sambhav commented Nov 23, 2021

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 <[email protected]>
Co-authored-by: Sambhav Kothari <[email protected]>
Signed-off-by: Daniel Mikusa <[email protected]>
Signed-off-by: Sambhav Kothari <[email protected]>
@sambhav sambhav requested a review from dmikusa November 23, 2021 18:54
@sambhav sambhav added semver:patch A change requiring a patch version bump type:enhancement A general enhancement labels Nov 23, 2021
@sambhav sambhav merged commit a33b367 into main Nov 24, 2021
@sambhav sambhav 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.

2 participants