feat: add support for custom metadata in SBOM uploads#13
Open
alexanderbsingh wants to merge 6 commits into
Open
feat: add support for custom metadata in SBOM uploads#13alexanderbsingh wants to merge 6 commits into
alexanderbsingh wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for attaching arbitrary user-defined metadata to SBOM upload requests, allowing callers (e.g., CI workflows) to provide extra context as query parameters alongside existing Git/image metadata.
Changes:
- Introduces a
--metadata key=valueflag that can be repeated to collect custom metadata. - Adds
CustomMetadataparsing and propagates it through the task layer into the API upload request query string (asmetadata.<key>=<value>). - Extends unit tests and documentation to cover valid/invalid metadata formats and query encoding behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new --metadata flag with an example and adds it to the options table. |
| internal/bifrost/sbom_upload.go | Wires parsed custom metadata into APIConfig when creating the API client for uploads. |
| internal/bifrost/options.go | Adds customMetadata to CLI options and registers the repeatable --metadata flag. |
| internal/bifrost/custom_metadata.go | Implements CustomMetadata and flag.Value parsing for key=value inputs. |
| internal/bifrost/cli_test.go | Adds CLI-level tests for valid/invalid metadata and special-character handling. |
| internal/bifrost/api.go | Appends custom metadata as metadata.<key> query parameters during upload. |
| internal/bifrost/api_test.go | Adds API-level test ensuring custom metadata query parameters are included and encoded as expected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a43fbcb to
5a06b39
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.