Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Grype and Syft?

Syft generates a software bill of materials from a container image or directory; Grype takes that inventory and matches it against vulnerability data. Two tools from Anchore, built to work together.

Illustration for the cybersecurity term Grype and Syft
Home / Blog / Cybersecurity Terms / What Are Grype and Syft?
17 November 2026

What Are Grype and Syft?

What Are Grype and Syft?

Syft and Grype are two open-source tools from Anchore that are almost always used together. Syft inspects a container image, filesystem, or archive and produces a software bill of materials — a structured list of every package it can identify, with versions and locations. Grype reads that list, or the image directly, and reports which of those packages have known vulnerabilities. Both are Go binaries under the Apache 2.0 licence.

Why Split the Job in Two

Most scanners do inventory and matching in one opaque pass. Separating them has practical consequences. The inventory is a durable artefact you can sign, store with the release, hand to a customer, or re-scan a year later without rebuilding anything. When a new vulnerability is published on a Tuesday afternoon, you do not need the image or the build environment to answer whether you are affected — you query the bills of materials you already have.

That also makes the two tools answerable separately. If Grype reports nothing for a Java service, the first question is whether Syft catalogued the shaded JARs at all, and you can check by reading the SBOM.

Using Syft

syft ghcr.io/acme/api:1.4.2 -o cyclonedx-json=sbom.cdx.json
syft dir:. -o spdx-json=sbom.spdx.json

Syft understands Alpine apk, Debian and Ubuntu dpkg, RPM, npm, Python wheels and Poetry, Go module metadata compiled into binaries, Java archives, Ruby gems, Rust crates, NuGet, and more. Output formats include CycloneDX, SPDX, and its own richer JSON. The --scope all-layers flag catalogues packages in every image layer rather than only the squashed final filesystem, which surfaces a build-stage dependency that was deleted but still ships in the image.

The SBOM it produces is the same artefact you would attach to a release with Cosign as a signed attestation, and it is what regulators increasingly expect. The EU Cyber Resilience Act, in force since December 2024 with its main obligations applying from December 2027, requires manufacturers of products with digital elements to draw up an SBOM.

Using Grype

grype sbom:./sbom.cdx.json --fail-on high
grype ghcr.io/acme/api:1.4.2 --only-fixed -o table

Grype builds its database from the National Vulnerability Database, GitHub Security Advisories, and distribution-specific feeds including Alpine secdb, Debian and Ubuntu security trackers, Red Hat OVAL, Amazon ALAS, and Wolfi. The distribution feeds are what make it distro-aware: when Red Hat backports a fix into a package that still carries the old upstream version number, Grype knows it is patched. Scanners that compare version strings against upstream data alone produce a stream of false alarms on exactly that pattern.

Two flags do most of the tuning work in a pipeline. --only-fixed hides vulnerabilities with no available fix, which is the difference between a list you can act on and a list you cannot. --fail-on sets the severity at which the build breaks. Longer-lived exceptions go in .grype.yaml as ignore rules, which can be scoped to a specific vulnerability in a specific package rather than a blanket suppression.

Honest Limitations

Both tools match metadata. Syft identifies a package because something on the filesystem declares it — a manifest, a lock file, embedded module data. A dependency vendored into source and compiled in without any metadata will not appear, and neither tool will tell you it is missing. For C and C++ in particular, inventory quality depends heavily on how the image was built.

Grype also reports presence, not reachability. A vulnerable function that no code path reaches is scored exactly like one exposed to the internet. Pairing results with VEX statements, which record whether a listed vulnerability actually affects your product, is the standard way to close that gap; Grype can consume VEX documents to suppress findings you have formally assessed.

Where They Sit Against Trivy

The obvious comparison is Trivy, which also does container and SBOM scanning and adds infrastructure-as-code misconfiguration checks, secret scanning, and a Kubernetes operator in the same binary. Grype and Syft do less by design and compose better: two small tools, two clear outputs, easy to slot into an existing pipeline. Teams that want an all-in-one scanner usually choose Trivy; teams building an SBOM-centred process around signing, storage, and later re-scanning tend to prefer this pair.

For UK organisations working to Cyber Essentials, which expects high and critical vulnerabilities to be remediated within 14 days of a fix being available, the combination of a stored SBOM and a scheduled re-scan is the cheapest way to prove that container dependencies are tracked rather than assumed.

FAQ – Frequently Asked Questions

Do I Need Syft if Grype Can Scan an Image Directly?

Grype will scan an image on its own, but generating the SBOM separately gives you an artefact you can keep. That means you can answer questions about a release months later without rebuilding it, re-scan old versions against today’s vulnerability data, sign the inventory as a supply chain attestation, and share it with customers or auditors who ask for one. The extra step costs seconds.

Why Does Grype Report Fewer Issues Than Some Other Scanners?

Usually because it is distribution-aware. When Red Hat, Debian, or Ubuntu backport a security fix, the package version does not change, so a scanner comparing version numbers against upstream data flags it as vulnerable. Grype consults the distribution’s own security feed and treats it as patched. Fewer findings here generally means fewer false alarms rather than weaker coverage.

Which SBOM Format Should I Generate?

CycloneDX if your priority is security tooling, because it is maintained by OWASP, supports VEX, and is widely consumed by vulnerability platforms. SPDX if licence compliance or a customer requirement drives the decision, since it is published as an ISO standard. Syft produces both from the same scan, so generating each is a reasonable default when you do not control what downstream consumers expect.

Will They Find Vulnerabilities in Code We Wrote Ourselves?

No. Both tools work from package metadata, so they report known vulnerabilities in third-party components only. Flaws in your own source need static analysis such as Semgrep or CodeQL, and dynamic testing against the running application. Dependency scanning and application security testing answer different questions, and a clean Grype report says nothing about your own code.

Related Terms

You May Be Interested In These

What Is Lateral Movement?

Cybersecurity Terms

17 November 2026

What Is Lateral Movement?

Read More
What Are EDR, MDR, XDR and EPP?

Cybersecurity Terms

18 January 2022

What Are EDR, MDR, XDR and EPP?

Read More
What Is Container Security?

Cybersecurity Terms

17 November 2026

What Is Container Security?

Read More