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

chore: add bundle name to bundle-sbom.tar #882

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Conversation

TristanHoladay
Copy link
Collaborator

Description

Adding the bundle name to the bundle-sboms.tar file name for easier distinction when working with multiple bundles.

e.g. <bundle-name>-bundle-sboms.tar

Related Issue

Resolves #880

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Copy link
Collaborator

@decleaver decleaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed implementation and tested out locally. LGTM

Copy link
Collaborator

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but question on sanitizing bundle names

func CreateSBOMArtifact(SBOMArtifactPathMap map[string]string) error {
out, err := os.Create(config.BundleSBOMTar)
func CreateSBOMArtifact(SBOMArtifactPathMap map[string]string, bundleName string) error {
out, err := os.Create(fmt.Sprintf("%s-%s", bundleName, config.BundleSBOMTar))
Copy link
Collaborator

@catsby catsby Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do any sanitation of the bundleName here? This goes a bit beyond just the sbom.tar name, I noticed I could put a space in the bundle name and then the tar/sbom files generated end up with empty spaces in them. Maybe there's some naming rules and validation that I missed though

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah that's a really good point. let's chat about that with the team tomorrow. could be good a conversation for sanitizing overall.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gonna create an issue for sanitizing the bundle name.

@TristanHoladay TristanHoladay merged commit f13e5fa into main Aug 29, 2024
16 checks passed
@TristanHoladay TristanHoladay deleted the bundle-sbom-name branch August 29, 2024 15:49
@TristanHoladay TristanHoladay mentioned this pull request Aug 29, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make SBOM filename reflect the bundle name
3 participants