OS Manuals

/usr/bin/grype

Vulnerability scanner for container images, filesystems, and SBOMs

From grype-fips 0.121.2-r1 (enterprise-packages), captured 2026-11-08 by running grype --help (exit 0). permalink

A vulnerability scanner for container images, filesystems, and SBOMs.

Supports the following image sources:
    grype yourrepo/yourimage:tag             defaults to using images from a Docker daemon
    grype path/to/yourproject                a Docker tar, OCI tar, OCI directory, SIF container, or generic filesystem directory

You can also explicitly specify the scheme to use:
    grype podman:yourrepo/yourimage:tag          explicitly use the Podman daemon
    grype docker:yourrepo/yourimage:tag          explicitly use the Docker daemon
    grype docker-archive:path/to/yourimage.tar   use a tarball from disk for archives created from "docker save"
    grype oci-archive:path/to/yourimage.tar      use a tarball from disk for OCI archives (from Podman or otherwise)
    grype oci-dir:path/to/yourimage              read directly from a path on disk for OCI layout directories (from Skopeo or otherwise)
    grype singularity:path/to/yourimage.sif      read directly from a Singularity Image Format (SIF) container on disk
    grype dir:path/to/yourproject                read directly from a path on disk (any directory)
    grype file:path/to/yourfile                  read directly from a file on disk
    grype sbom:path/to/syft.json                 read Syft JSON from path on disk
    grype registry:yourrepo/yourimage:tag        pull image directly from a registry (no container runtime required)
    grype purl:path/to/purl/file                 read a newline separated file of package URLs from a path on disk
    grype PURL                                   read a single package PURL directly (e.g. pkg:apk/openssl@3.2.1?distro=alpine-3.20.3)
    grype cpes:path/to/cpes/file                 read a newline separated file of package CPEs from a path on disk
    grype CPE                                    read a single CPE directly (e.g. cpe:2.3:a:openssl:openssl:3.0.14:*:*:*:*:*:*:* or cpe:/a:openssl:openssl:3.0.14)
    grype zarf:path/to/package.tar.zst           scan all SBOMs within a Zarf package archive

You can also pipe in Syft JSON directly:
	syft yourimage:tag -o json | grype

Usage:
  grype [IMAGE] [flags]
  grype [command]

Available Commands:
  completion  Generate a shell completion for Grype (listing local docker images)
  config      show the grype configuration
  db          vulnerability database operations
  explain     Ask grype to explain a set of findings
  help        Help about any command
  version     show version information

Flags:
      --add-cpes-if-none       generate CPEs for packages with no CPE data
      --by-cve                 orient results by CVE instead of the original vulnerability ID when possible
  -c, --config stringArray     grype configuration file(s) to use
      --distro string          distro to match against in the format: <distro>[-:@]<version>
      --exclude stringArray    exclude paths from being scanned using a glob expression
  -f, --fail-on string         set the return code to 2 if a vulnerability is found with a severity >= the given severity, options=[negligible low medium high critical]
      --file string            file to write the default report output to (default is STDOUT)
      --from stringArray       specify the source behavior to use (e.g. docker, registry, podman, containers-storage, oci-dir, ...)
  -h, --help                   help for grype
      --ignore-states string   ignore matches for vulnerabilities with specified comma separated fix states, options=[fixed not-fixed unknown wont-fix]
      --name string            set the name of the target being analyzed
      --only-fixed             ignore matches for vulnerabilities that are not fixed
      --only-notfixed          ignore matches for vulnerabilities that are fixed
  -o, --output stringArray     report output formatter, formats=[json table cyclonedx cyclonedx-json sarif template], deprecated formats=[embedded-cyclonedx-vex-json embedded-cyclonedx-vex-xml]
      --platform string        an optional platform specifier for container image sources (e.g. 'linux/arm64', 'linux/arm64/v8', 'arm64', 'linux')
      --profile stringArray    configuration profiles to use
  -q, --quiet                  suppress all logging output
  -s, --scope string           selection of layers to analyze, options=[squashed all-layers deep-squashed] (default "squashed")
      --show-suppressed        show suppressed/ignored vulnerabilities in the output (only supported with table output format)
      --sort-by string         sort the match results with the given strategy, options=[package severity epss risk kev vulnerability] (default "risk")
  -t, --template string        specify the path to a Go template file (requires 'template' output to be selected)
  -v, --verbose count          increase verbosity (-v = info, -vv = debug)
      --version                version for grype
      --vex stringArray        a list of VEX documents to consider when producing scanning results

Use "grype [command] --help" for more information about a command.
Options (24)
OptionDescriptionSource
--add-cpes-if-nonegenerate CPEs for packages with no CPE datahelp
--by-cveorient results by CVE instead of the original vulnerability ID when possiblehelp
-c, --config stringArraygrype configuration file(s) to usehelp
--distro stringdistro to match against in the format: <distro>[-:@]<version>help
--exclude stringArrayexclude paths from being scanned using a glob expressionhelp
-f, --fail-on stringset the return code to 2 if a vulnerability is found with a severity >= the given severity, options=[negligible low medium high critical]help
--file stringfile to write the default report output to (default is STDOUT)help
--from stringArrayspecify the source behavior to use (e.g. docker, registry, podman, containers-storage, oci-dir, ...)help
-h, --helphelp for grypehelp
--ignore-states stringignore matches for vulnerabilities with specified comma separated fix states, options=[fixed not-fixed unknown wont-fix]help
--name stringset the name of the target being analyzedhelp
--only-fixedignore matches for vulnerabilities that are not fixedhelp
--only-notfixedignore matches for vulnerabilities that are fixedhelp
-o, --output stringArrayreport output formatter, formats=[json table cyclonedx cyclonedx-json sarif template], deprecated formats=[embedded-cyclonedx-vex-json embedded-cyclonedx-vex-xml]help
--platform stringan optional platform specifier for container image sources (e.g. 'linux/arm64', 'linux/arm64/v8', 'arm64', 'linux')help
--profile stringArrayconfiguration profiles to usehelp
-q, --quietsuppress all logging outputhelp
-s, --scope stringselection of layers to analyze, options=[squashed all-layers deep-squashed] (default "squashed")help
--show-suppressedshow suppressed/ignored vulnerabilities in the output (only supported with table output format)help
--sort-by stringsort the match results with the given strategy, options=[package severity epss risk kev vulnerability] (default "risk")help
-t, --template stringspecify the path to a Go template file (requires 'template' output to be selected)help
-v, --verbose countincrease verbosity (-v = info, -vv = debug)help
--versionversion for grypehelp
--vex stringArraya list of VEX documents to consider when producing scanning resultshelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.