-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
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.
Discussed implementation and tested out locally. LGTM
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.
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)) |
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.
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
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.
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.
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.
gonna create an issue for sanitizing the bundle name.
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
Checklist before merging