-
Notifications
You must be signed in to change notification settings - Fork 120
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
question: sbom generated by apko is not detected by trivy #1046
Comments
cc @imjasonh |
i compared sbom generated by trivy and by apko. turns out, trivy was expecting the container image artifact to contain a package (alpine os). i tried adding os package and 1 relationship and it seems to work. // packages
{
"name": "alpine",
"SPDXID": "SPDXRef-OperatingSystem-b234ff30fe4ada0f",
"versionInfo": "3.20.0_alpha20231219",
"downloadLocation": "NONE",
"filesAnalyzed": false,
"primaryPackagePurpose": "OPERATING-SYSTEM"
},
...
// relationship
{
"spdxElementId": "SPDXRef-Package-sha256-e13d8a4cf521332118ed60c661913f2f083790d8aa598b14f7617427996d631d",
"relatedSpdxElement": "SPDXRef-OperatingSystem-b234ff30fe4ada0f",
"relationshipType": "CONTAINS"
}, |
@imjasonh should we fix this in apko or in trivy? I'm leaning toward trivy but wdyt? |
also posted to trivy for discussion aquasecurity/trivy#6172 |
@imjasonh @jonjohnsonjr friendly ping :) trivy maintainer suggest that we implement the fix in here. to add a new element type (operating-system) like this https://spdx.github.io/spdx-spec/v2.3/package-information/#724-primary-package-purpose-field right now, for spdx we have should we update it to
what do you think? if it's ok, i will send a PR over. |
Hi @tuananh were you able to find solution for this ? |
using the following command to scan
if sbom is found, trivy will use sbom instead. https://github.com/aquasecurity/trivy/blob/main/docs/docs/target/container_image.md#sbom
output
I was expecting to see trivy able to find sbom and use that instead. however, it's still pulling image. if sbom is found, it will look sth like this
is there any thing specific about sbom generated by apko?
The text was updated successfully, but these errors were encountered: