QuestionQ95

VerifiedDevSecOps Pipeline-Build and Test Stage

Judi Dench has recently joined an IT company as a DevSecOps engineer. Her organization develops software products and web applications related to electrical engineering. Judi wants to use the Anchore tool suite for container vulnerability scanning and Software Bill of Materials (SBOM) generation.

Using Anchore Grype, she wants to:

  • Scan container images and file systems for known vulnerabilities
  • Find vulnerabilities in major operating system packages such as Alpine, CentOS, Ubuntu, etc.
  • Find vulnerabilities in language-specific packages such as Ruby, Java, etc.

Which of the following commands should Judi run to scan for vulnerabilities in the image using grype?

Explanation

Grype is invoked directly against a scan target using the syntax grype <image> (or grype <path> for a filesystem/directory). There is no packages subcommand in grype's CLI — that pattern is not part of grype's command structure. Running grype <image> performs a full vulnerability scan of the container image's final filesystem layer, detecting both operating-system-level packages (from distros like Alpine, CentOS, Ubuntu) and language-specific packages (such as Ruby gems or Java JARs) by leveraging the embedded package cataloger (Syft) and cross-referencing against grype's vulnerability database. The --scope all-layers flag is an optional modifier for scanning every image layer rather than just the squashed final state, which is not what the base requirement described here calls for.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!