A Grype scan of an image shows no vulnerable library, yet the tester knows an older vulnerable version was installed in a lower layer and deleted in a later one. The tester wants it reported. What should the tester do?
Show the answer
Correct answerA. Add --scope all-layers to the command
AWhy this is right: The all-layers scope makes Grype catalog packages from every layer, not just the squashed final filesystem.
BWhy not this: A database update changes known vulnerabilities, but the deleted package is never cataloged under the default scope.
CWhy not this: --only-fixed filters out findings with no fix; it removes results and cannot reveal deleted packages.
DWhy not this: --fail-on sets an exit-code severity threshold; it does not change which layers are scanned.
By default Grype scans the squashed view of the image, so packages removed in later layers are not seen. The all-layers scope includes every layer. Updating the database only changes which vulnerabilities are known, not which packages are cataloged.