-
Notifications
You must be signed in to change notification settings - Fork 59
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
sbom: remove elf-package cataloger during .apk scan #1420
Draft
xnox
wants to merge
1
commit into
wolfi-dev:main
Choose a base branch
from
xnox:remove-elf-package
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With this change .apk which contain ELF package notes scan the same way as they did before. This unblocks enabling ELF package notes, whilst design on how to incorporate them into `wolfictl scan` can then iterate on that at a later point. ``` $ ./wolfictl --log-level=debug scan scanelf-1.3.8-r2.apk 2025/01/25 22:10:38 DEBU checking cache for SBOM expectedPath=/home/xnox/.cache/wolfictl/sbom/apk/scanelf-1.3.8-r2-sha256-8f340707e80c5a4159c41ef40ed6d3e2dc052f806b5cfbf906b1ade9b575ab14.syft.json 2025/01/25 22:10:38 DEBU SBOM cache miss cachedPath=/home/xnox/.cache/wolfictl/sbom/apk/scanelf-1.3.8-r2-sha256-8f340707e80c5a4159c41ef40ed6d3e2dc052f806b5cfbf906b1ade9b575ab14.syft.json 2025/01/25 22:10:38 INFO generating SBOM for APK file path=scanelf-1.3.8-r2.apk distroID=wolfi 2025/01/25 22:10:38 DEBU created temp directory to unpack APK path=/tmp/wolfictl-sbom-2146823426 2025/01/25 22:10:38 DEBU unpacked APK file to temp directory apkFilePath=scanelf-1.3.8-r2.apk 2025/01/25 22:10:38 DEBU apk temp directory item path=. 2025/01/25 22:10:38 DEBU apk temp directory item path=.PKGINFO 2025/01/25 22:10:38 DEBU apk temp directory item path=.melange.yaml 2025/01/25 22:10:38 DEBU apk temp directory item path=usr 2025/01/25 22:10:38 DEBU apk temp directory item path=usr/bin 2025/01/25 22:10:38 DEBU apk temp directory item path=usr/bin/scanelf 2025/01/25 22:10:38 DEBU apk temp directory item path=var 2025/01/25 22:10:38 DEBU apk temp directory item path=var/lib 2025/01/25 22:10:38 DEBU apk temp directory item path=var/lib/db 2025/01/25 22:10:38 DEBU apk temp directory item path=var/lib/db/sbom 2025/01/25 22:10:38 DEBU apk temp directory item path=var/lib/db/sbom/scanelf-1.3.8-r2.spdx.json 2025/01/25 22:10:38 DEBU synthesized APK package for SBOM name=scanelf version=1.3.8-r2 id=0b4aac8b80c2df13 2025/01/25 22:10:38 DEBU created Syft source from directory description="{fae5e479007d6102592372c66694727566238f1264d6deafd13639209ca07b7e /tmp/wolfictl-sbom-2146823426 {/tmp/wolfictl-sbom-2146823426 }}" 2025/01/25 22:10:39 INFO finished Syft SBOM generation packageCount=1 2025/01/25 22:10:39 DEBU cleaning up temp directory path=/tmp/wolfictl-sbom-2146823426 🔎 Scanning "scanelf-1.3.8-r2.apk" 2025/01/25 22:10:40 DEBU scanning APK SBOM for vulnerabilities packageCount=1 2025/01/25 22:10:40 INFO converted packages to grype packages packageCount=1 2025/01/25 22:10:40 DEBU grype matching finished matchCount=0 ✅ No vulnerabilities found ``` Fixes: wolfi-dev#1409
luhring
requested changes
Jan 25, 2025
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.
holding for offline discussion
luhring
reviewed
Jan 27, 2025
@@ -102,6 +102,7 @@ func Generate(ctx context.Context, inputFilePath string, f io.Reader, distroID s | |||
pkgcataloging.ImageTag, | |||
).WithRemovals( | |||
"sbom", | |||
"elf-package", |
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.
Once we have a TODO here, this LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change .apk which contain ELF package notes scan the same
way as they did before. This unblocks enabling ELF package notes,
whilst design on how to incorporate them into
wolfictl scan
can theniterate on that at a later point.
Fixes: #1409