Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
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.

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.