sbom: remove elf-package cataloger during .apk scan#1420
Merged
xnox merged 1 commit intowolfi-dev:mainfrom Feb 9, 2025
Merged
Conversation
luhring
suggested changes
Jan 25, 2025
Contributor
luhring
left a comment
There was a problem hiding this comment.
holding for offline discussion
luhring
reviewed
Jan 27, 2025
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
Follow up TODO to consider turning it on:
- chainguard-dev/internal-dev#8731
e6b91c6 to
b58af8b
Compare
luhring
approved these changes
Feb 9, 2025
This file contains hidden or 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
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 scancan theniterate on that at a later point.
Fixes: #1409