fix(query): the "Image Version Using Latest" dockerfile query was not accounting for specific digest values#8033
Open
cx-andre-pereira wants to merge 5 commits intoCheckmarx:masterfrom
Conversation
…reference (no @sha...)
cx-artur-ribeiro
requested changes
Apr 9, 2026
Contributor
cx-artur-ribeiro
left a comment
There was a problem hiding this comment.
Hey André, can you take a look at my comment please?
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.
Reason for Proposed Changes
Image Version Using Latest" query does not account for digest values appended to the ":latest" tag; causing a FROM statement like :FROM 923847651029.dkr.ecr.eu-west-1.amazonaws.com/echo/echo-fips:latest@sha256:a1f3c2e9b0d74682f5a3c1e8b2d09f47c6e1a3b8d2f04c7e9a1b3d5f7c2e4a6b8to produces a False Positive result.
Proposed Changes
:latest" tag is the suffix of the reference image being used through a regex enforcing end of line ($) after any trailing whitespaces that may exist.I submit this contribution under the Apache-2.0 license.