-
Notifications
You must be signed in to change notification settings - Fork 178
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
[feature] Questions regarding adding REST Endpoints for Vulnerability and Legal info in an SBOM #2058
Comments
What's the use case for searching a single SBOM versus the entire graph? One of the nice things about GUAC is the fact that it operates across multiple SBOMs at once, so I'm not sure why we'd want to look at a single SBOM.
I think being able to choose between the two is good. The more indirect the dependency, the harder it will be to remediate, but people will still want to know about it. The performance issue is a concern, though, so having a way to specify a max depth (or a simple direct-dependencies-only) would be good for those larger instances. |
The use case is "I want to know the current (vulns/licenses) of the dependencies in my software". current: Your software likely builds SBOMs and ingests into GUAC automatically. In this circumstance you will have multiple SBOMs in GUAC. Maybe every build, or just every release. Hopefully you are updating your dependencies over time from older vulnerable ones to newer ones without vulns. For this reason, you want to analyze your latest sbom, not old ones. my: You can put SBOMs for any software into your GUAC instance, including those delivered by a third party. Also, using the deps.dev collector, you get additional "sboms" for any open source dependencies you use. Therefore, we think folks will want to analyze a specific piece of software, and not the entire graph. |
IMO there should not be any concept of "spec" in the REST api. We don't want to reuse any GraphQL tree-based concepts here in the pacakge/source trees. I think the decision here is between"guac-id" and "purl":
In this case if one or both sboms are attached to artifact, I would always use the "IsOccurrance" node to find the package version and compare the versions there.
I would only include the packages under "IncludedSoftware" attached to the "HasSBOM" node. Any other dependency relationships found in the GUAC graph are likely due to an alternative dependency resolution graph that does not reflect the current/latest build. As we know dependency resolution is sensitive to time and other factors and can result in different graphs based on those circumstances. |
I see what you're getting at, but a single SBOM is not necessarily the answer. What happens if my software is 2 SBOMs of unrelated applications? Or three? Or 10? In that case, a label of some kind to indicate which SBOMs are "mine" might be better. That's more work, of course, so the single SBOM query is definitely an improvement over nothing, but I don't think it fully solves that use case. |
@funnelfiasco good idea, specifying a max depth along with a toggle (Or just setting max depth to 1) we can search direct dependencies as well as transitive dependencies. @jeffmendoza you are right that we shouldn't be using the spec. When first thinking about this I didn't want to use the purl because of the fact that it isn't that precise. Even though you don't need to query GraphQL for the purl, I think the id would be a better option. Additionally, I think that accepting both package version and package name ids shouldn't be a problem. Thank you for pointing out that that artifact would be attached to an isOccurrance, I totally forgot about that! And, yes I was thinking of only searching Thank you for helping answer my questions! |
Some thoughts at a higher level. I know we won't be able to follow this guidance in every situation.
Specifically on the proposed endpoints above, I also wonder if the SBOM is the right primitive, for a few reasons.
EDIT - just an idea, but another way to implement this may be to use the transitive dependencies endpoint, to handle the case where a package or artifact listed in the the top level SBOM also has an SBOM itself. |
@mdeicas thanks for your feedback! I have been thinking about this, and have a couple ideas on how to go about it.
I agree that a purl should be the identifier, and I think that the best way to implement this is to do something like: #1734. I have been working on adding a purl endpoint similar to this, and I think it will allows users to search via purl in a generic manor and then add flags to search for vulns or license.
If we were to search via purl in a method similar to #1734 we would be able to search rest via something like: |
Sounds good to me! Passing purls as path parameters isn't the most readable but it does better indicate that it is a required parameter. For reference it's also what deps.dev does (e.g. https://api.deps.dev/v3alpha/systems/go/packages/github.com%2Fgoogle%2Fwire/versions/v0.5.0). |
When talking about GUAC, a common issue that pops up is that it's hard to find your vulnerabilities or legal information in a specific SBOM. Currently, to find this, the user would have to make multiple different graphql calls which is cumbersome, to solve this we could use a couple REST endpoints.
Since this comes up often, I would like to start working on it. But, before I do, I'd like to get some feedback from the GUAC community on a few of my questions.
This feature is probably going to be made up of three REST endpoints.
Here are some of my questions regarding this feature:
id
or the spec?The text was updated successfully, but these errors were encountered: