Open jopemachine opened 3 days ago
In Harbor version 2.11 and above, we can use trivy to automatically generate an SBOM when an image is pushed. (See https://goharbor.io/docs/edge/administration/sbom-integration/)
Through this feature, we can easily generate and use SBOM in Harbor registries without incurring additional costs.
Let’s add this feature for Harbor and other registries that support such functionality, and implement support for other registries in a follow-up PR.
(As a fallback implementation, as described in the issue, this could be implemented by making an RPC call to the agent where the image is installed. Ideally, selecting the agent with the least load would also be a desirable feature.)
Additionally, we will need to abstract and design an interface for these features.
We could consider adding a CLI command like backend.ai mgr image sbom-report <image>
,
This would allow administrators to generate and review a report of the packages installed on a specific image.
We also consider creating related APIs that allow the WebUI to fetch the packages installed on an image. @achimnol @kyujin-cho Any ideas regarding the implementation details?
Main idea
Generate report to list all installed packages and to check their locations
In this issue, we will only support registries with SBOM auto-generation features, such as Harbor, And the implementation of fallbacks for other registries will be addressed in a follow-up issue (#3142).
Implementation
We can consider implementing CLI command like the following.
We can make the above command to print information about the packages info using tabulate, and print raw SBOM using the
--raw
flag.Considerations