-
Notifications
You must be signed in to change notification settings - Fork 58
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
scan: expected exactly one APK package, found 2 #1409
Comments
Adding notes from our discussion this morning: Ultimately it sounds like we don't want the ELF metadata to result in a second APK package in Syft's analysis, because we don't consider it a distinct package in an SCA sense, and we don't intend for the second package to be subject to vulnerability scanning. We should figure out the right way to deduplicate these two packages, either in wolfictl (if we believe the duplicate APK package would not also be present when upstream Syft/Grype scan our images), or by proposing a change upstream in Syft. |
for syft i think it is more subtle. I think currently it identifies it as a binary packges; rather than a secondary discovered location (also present as). |
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
Description
Fetch .apk from https://github.com/wolfi-dev/os/pull/39152/checks?check_run_id=36032861217 which implements https://systemd.io/ELF_PACKAGE_METADATA/
wolfictl scan
on those fails like so:Note the binary package name is scanelf, but the origin for it is pax-utils:
Note syft knows how to catalog that
More details
Which has
I am hoping for this to just work.
The packaging metadata we provide is similar to what other distributions do, i.e.:
The text was updated successfully, but these errors were encountered: