Annotate visible/hidden paths when all-layers scope#3855
Merged
Conversation
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
4 tasks
kzantow
approved these changes
May 6, 2025
spiffcs
added a commit
that referenced
this pull request
May 6, 2025
* main: annotate hidden paths in all-layers scope (#3855)
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.
#3138 added the concept of annotating locations raised up from a
file.Resolverwithvisible=trueorvisible=falsefor any location returned so we can discover packages which have been deleted in higher layers or are otherwise hidden. That PR added a newfile.Resolverto take advantage of this new capability, this PR extends these kinds of annotations to theall-layersfile resolver (there are no other file resolvers this makes sense to also apply this to).Here's an example of the changes for a single package in an alpine image where multiple
apk addcommands were performed each in their ownRUNline in the Dockerfile:[ { "path": "/lib/apk/db/installed", "layerID": "sha256:02b7b5e2cb1b34e0ed386a34b364f52eaf770e524e120055bdd642e104dce1cd", "accessPath": "/lib/apk/db/installed", "annotations": { "evidence": "primary", "visible": "false" } }, { "path": "/lib/apk/db/installed", "layerID": "sha256:a16e98724c05975ee8c40d8fe389c3481373d34ab20a1cf52ea2accc43f71f4c", "accessPath": "/lib/apk/db/installed", "annotations": { "evidence": "primary", "visible": "false" } }, { "path": "/lib/apk/db/installed", "layerID": "sha256:eeb7e34dc34ae12fe9df0056d36f9620970ed15c30271462be4dffdef4fc69d2", "accessPath": "/lib/apk/db/installed", "annotations": { "evidence": "primary", "visible": "true" } }, { "path": "/lib/apk/db/installed", "layerID": "sha256:ff1223b81bbf3c1c3ffc402947f2a9dfdcf789f9c6acdd36a9d9e60e7c650aa8", "accessPath": "/lib/apk/db/installed", "annotations": { "evidence": "primary", "visible": "false" } } ]Follow-up to #3138
This does not "fix" #1818 as that issue describes adding an indication on the package and not constituent locations on the package like done in this PR.
Type of change
Checklist