Provide feedback to user when an exact manifest digest was not provided #485
Labels
enhancement
New feature or request
I/O
Describes bug or enhancement around application input or output
Background
Today, Grype (and Syft) can scan an image from an OCI registry. To do this, the user can specify the image in a number of ways:
syft registry:ubuntu@<manifestDigest>
)syft registry:ubuntu@<manifestListDigest>
)syft registry:ubuntu:latest
)syft registry:ubuntu
)Case 1 is explicit, and there's no ambiguity: the user's reference refers to exactly one image, and that image is what the tool scans.
But cases 2, 3, and 4 are implicit: The user is not providing an exact image digest to the tool, so the tool chooses an image out of the possible images for which the user's provided reference applies.
The good
Grype and Syft do show exactly what image was selected. For example, if you run:
...you'll see both the user input that was provided and the exact manifest digest that was analyzed:
The bad
The output doesn't tell you how this image was selected.
Also, it's not immediately obvious to users that an image was selected by the tool on the user's behalf. (Technically, users can conclude whether this happened by determining if the
userInput
differs from themanifestDigest
, but this is implicit and not always shown to the user.)What would you like to be added
In our community Slack, I asked @xtreme-conor-nosal how Grype or Syft would ideally respond to an implicit image reference, and he provided this answer:
💬 Further discussion is needed on which of these options make the most sense for Grype (and Syft)...
But, the chosen implementation should satisfy these criteria:
The text was updated successfully, but these errors were encountered: