-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add github_repository_sbom table #353
Add github_repository_sbom table #353
Conversation
Hey @lwakefield , thanks for opening this PR! I had a look at the SBOM API, and I think including top level SBOM data is OK and having the To make querying easier in examples, you can include an example like: select
s.name as spdx_name,
p.name as package_name,
p.version as package_version,
p.license as package_license
from
github_repository_sbom as s,
jsonb_array_elements(packages) as p
where
repository_full_name = 'turbot/steampipe'; Also, I did have a quick look at if this was possible in GitHub's GraphQL API, and it seems like right now it's only in preview mode, which means it's also subject to API changes, so I think implementing this with the v3 REST API right now makes sense, and we can look at migrating to the GraphQL API when it's more widely available. |
Thanks @cbruno10 - I pivoted based on your feedback! |
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.
@lwakefield Thanks for making the quick pivot!
I've left a few additional suggestions, can you please have a look?
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform" | ||
) | ||
|
||
func tableGitHubRepositorySbom() *plugin.Table { |
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.
Can you please post what select * from github_repository_sbom
produces?
2ca8634
into
turbot:add_github_repository_sbom_table
Co-authored-by: Lawrence Wakefield <[email protected]> Co-authored-by: Madhushree Ray <[email protected]>
Example query results
Results
First time contributor! I'm looking for / expecting feedback on:
Is this the right way to model the data since it is focusing on the packages and not top level SBOM metadata? I can see a possibility where it might be preferred to move this to a- Pivoted based on feedback!github_repository_sbom_packages
table instead, but unsure if that is the right move or not.Pending 2 - there are some fields missing, I wanted to get feedback before adding them!- Addressed!