Repository navigation
Keep the apk package list so scanners see OS packages - #25
Merged
Merged
Conversation
Removing /lib/apk also removed /lib/apk/db/installed, the list scanners read. Trivy found 0 OS packages and reported 0 OS CVEs, which said nothing about the image. /sbin/apk and /etc/apk stay removed, so apk remains unavailable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The image removes all of
/lib/apk, including/lib/apk/db/installed, the list scanners read. Trivy therefore finds 0 OS packages, so its "0 OS CVEs" says nothing about the image.This PR keeps
/lib/apk/dband removes only/lib/apk/exec./sbin/apkand/etc/apkstay removed, so apk remains unavailable. Under the permission model the server can't read the list either (ERR_ACCESS_DENIED).Trivy 0.76.1, as in the workflow, on an otherwise identical image:
What changes for releases
apk-toolsstays in the list although its binary is gone, and the same applies tobusyboxand its removedwget,ncandsu./usr/local, not from apk, so it isn't among these packages.Test plan
/lib/apk/db/installedpresent,/lib/apk/exec,/sbin/apkand/etc/apkabsent/healthrespondsrelease-v1.9.3, so that its scan already covers OS packagesIndependent of #24. Trivy reports 0 vulnerabilities for npm packages on this branch, although it still has zod 3.25.76, so only Docker Scout reports the zod CVE. The Trivy scan therefore can't confirm the fix in #24.
🤖 Generated with Claude Code