A vulnerability scanner for container images and filesystems. Easily install the binary to try it out. Works with Syft, the powerful SBOM (software bill of materials) tool for container images and filesystems.
Features
Scan the contents of a container image or filesystem to find known vulnerabilities. Find vulnerabilities for major operating system packages:
Find vulnerabilities for language-specific packages:
If you encounter an issue, please let us know using the issue tracker.
Installation
snap install grype
Getting Started
To scan for vulnerabilities in an image:
grype <image>
The above command scans for vulnerabilities that are visible in the container (i.e., the squashed representation of the image). To include software from all image layers in the vulnerability scan, regardless of its presence in the final image, provide --scope all-layers
:
grype <image> --scope all-layers
Supported sources
Grype can scan a variety of sources beyond those found in Docker.
# scan a container image archive (from the result of `docker image save ...`, `podman save ...`, or `skopeo copy` commands)
grype path/to/image.tar
# scan a Singularity Image Format (SIF) container
grype path/to/image.sif
# scan a directory
grype dir:path/to/dir
Sources can be explicitly provided with a scheme:
podman:yourrepo/yourimage:tag use images from the Podman daemon
docker:yourrepo/yourimage:tag use images from the Docker daemon
docker-archive:path/to/yourimage.tar use a tarball from disk for archives created from "docker save"
oci-archive:path/to/yourimage.tar use a tarball from disk for OCI archives (from Skopeo or otherwise)
oci-dir:path/to/yourimage read directly from a path on disk for OCI layout directories (from Skopeo or otherwise)
singularity:path/to/yourimage.sif read directly from a Singularity Image Format (SIF) container on disk
dir:path/to/yourproject read directly from a path on disk (any directory)
sbom:path/to/syft.json read Syft JSON from path on disk
registry:yourrepo/yourimage:tag pull image directly from a registry (no container runtime required)
If an image source is not provided and cannot be detected from the given reference it is assumed the image should be pulled from the Docker daemon. If docker is not present, then the Podman daemon is attempted next, followed by reaching out directly to the image registry last.
Output Formats
The output format for Grype is configurable as well:
grype <image> -o <format>
Where the formats available are:
table
: A columnar summary (default).cyclonedx
: An XML report conforming to the CycloneDX 1.6 specification.cyclonedx-json
: A JSON report conforming to the CycloneDX 1.6 specification.json
: Use this to get as much information out of Grype as possible!sarif
: Use this option to get a SARIF report (Static Analysis Results Interchange Format)template
: Lets the user specify the output format.Documentation
Our GitHub contains further details:
https://github.com/anchore/grype
For commercial support options with Syft or Grype, please contact Anchore
This prototype Grype snap is built using the configuration here: https://github.com/popey/grype-snap
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
You are about to open
Do you wish to proceed?
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Snap can be installed on Fedora from the command line:
sudo dnf install snapd
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap
and /snap
:
sudo ln -s /var/lib/snapd/snap /snap
To install Grype - Container Vulnerability Scanner, simply use the following command:
sudo snap install grype --classic
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.
Get to know Canonical, the company behind the products.
The world's favourite Linux OS for servers, desktops and IoT.
One subscription for security maintenance, support, FIPS and other compliance certifications.
The app store for Linux: secure packages and ultra-reliable updates.
A pure-container hypervisor. Run system containers and VMs at scale.
Build a bare metal cloud with super fast server provisioning.
Upgrades, maintenance, support, and fully managed options for long-term, low-cost infra.
Software-defined storage that lowers your total cost of ownership.
App portability for K8s on VMware, Amazon, Azure, Google, Oracle, IBM and bare metal.
Deploy, integrate and manage applications at any scale, on any infrastructure.
Stream Android applications to any device.
The software collaboration platform behind Ubuntu.
Optimised Ubuntu for public clouds.
Spin up Ubuntu VMs on Windows, Mac and Linux.
Control and customise your cloud instances.
Systems management and security patching for Ubuntu.
Simplify and standardise complex network configuration.
AI and MLOps at any scale, on any cloud.
Deploy a fully functional cloud in minutes.