-
Notifications
You must be signed in to change notification settings - Fork 598
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
feat: 3098 add support for user to flag root package supplier and supplier inheritance #3646
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
…suport-package-supplier * 'main' of https://github.com/anchore/syft: chore(deps): bump github/codeql-action from 3.28.8 to 3.28.9 (#3648) feat: 3626 add option enable license content; disable by default (#3631)
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
@@ -58,6 +59,16 @@ func EncodeComponent(p pkg.Package) cyclonedx.Component { | |||
} | |||
} | |||
|
|||
// TODO: we eventually want to update this so that we can read "supplier" from different syft metadata | |||
func encodeSupplier(_ pkg.Package, sbomSupplier string) *cyclonedx.OrganizationalEntity { |
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.
the equivalent decoder support for this field I think is missing (getting supplier specified in a syft doc when decoding a cyclonedx one)
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.
might be worth updating the encoder-decoder cycle integration test to have a supplier specified in the source.
Description
This PR adds a new flag to syft called
--source-supplier
. This flag allows syft users to associate an optionalsupplier
to the root component of the final document. It makes no determination about other packages cataloged by syft.Formats updated
syft-json
spdx-json
cyclonedx-json
spdx
cyclonedx
The
--source-supplier
will be used to determine the supplier of the root component of the SBOMThis allows organizations generating SBOMs who want to produce NTIA compliant documents to assume the
supplier
field for software/containers they are producing.Adds
supplier
to the following outputs:spdx
go run cmd/syft/main.go -o spdx alpine:latest --source-supplier optional-supplier > test.json
spdx-json
go run cmd/syft/main.go -o spdx-json alpine:latest --supplier optional-supplier > test.json
syft-json
go run cmd/syft/main.go -o json alpine:latest --supplier optional-supplier > test.json
cyclonedx-json
Note: for cyclonedx-json we're putting supplier in two spots that the format supports. One is the top level BOM description. The other is for the root component identified in the bom
go run cmd/syft/main.go -o cyclonedx-json alpine:latest --supplier optional-supplier > test.json
cyclonedx
Fixes
PackageSupplier
in root of SPDX document generated by CLI #3098Type of change
Checklist: