Skip to content

Conversation

TheGrizzlyDev
Copy link
Collaborator

This change allows a user to create an intermediate sbom format via the sbom target that can later be consumed into a serialized format like SPDX by specialized rules.

@@ -0,0 +1,23 @@
load("@rules_go//go:def.bzl", "go_binary", "go_library")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd put this into //sbom/spdx/generator. I'd like to keep //lib/supplychain-go light and not pull in lots of dependencies for all kinds of sbom formats


go_library(
name = "supply-chain-go",
name = "supplychain-go",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mind splitting this one out into its own PR?

Also, we should probably add an alias for the old name

return rule(
_sbom_impl,
attrs = {
"target": attr.label(aspects = [gathering_aspect], doc="The target for which to generate an SBOM."),
Copy link
Collaborator

Choose a reason for hiding this comment

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

From internal experience, this should be label_list

return gather_metadata_info_common(
target,
ctx,
want_providers = [PackageAttributeInfo, PackageMetadataInfo, LicenseKindInfo],
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do we need AttributeInfo and LicenseKindInfo for? They are referenced in the JSON file

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.

2 participants