Skip to content
CL

Clair

License: Free (Open-Source, Apache 2.0)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated February 25, 2026
2 min read
Key Takeaways
  • Clair indexes container images and matches them against vulnerability databases covering 9+ Linux distributions including Ubuntu, Debian, RHEL, Alpine, SUSE, Oracle, AWS Linux, and Photon.
  • Powers the vulnerability scanning backend for Red Hat Quay and Quay.io container registries, with 11k GitHub stars and 117 contributors.
  • Continuously ingests security data from NVD and distribution-specific sources, so vulnerability reports always reflect the latest known threats.
  • Written in Go with a modular updater/matcher architecture in the ClairCore library, supporting OCI and Docker image formats.

Clair is an open-source static analysis tool for finding vulnerabilities in container images. Developed by Red Hat (originally CoreOS), Clair parses OCI and Docker image layers and matches discovered packages against vulnerability databases covering 9+ Linux distributions. It serves as the scanning backend for Red Hat Quay and Quay.io container registries. 11k GitHub stars, 117 contributors.

How does Clair scan container images?

Clair scans container images through a three-part pipeline: indexing, matching, and notifications. This architecture separates image analysis from vulnerability correlation, allowing Clair to re-evaluate previously scanned images against newly discovered CVEs without re-indexing.

During indexing, Clair fetches container image layers, examines their contents, and identifies installed packages, language runtimes, and distributions. The output is an IndexReport. Because OCI uses content-addressed layers, Clair skips any layer it has already indexed.

During matching, Clair checks indexed packages against vulnerability databases that update continuously in the background. Every match request returns results based on the latest security data. Distribution-specific updaters paired with matchers determine how vulnerabilities relate to specific packages.

The notification service watches for newly discovered vulnerabilities that affect previously indexed manifests and fires alerts through configured webhooks.

What vulnerability databases does Clair use?

Clair pulls vulnerability data from 9+ distribution-specific sources plus the NVD for severity enrichment:

SourceData Type
Alpine SecDBAlpine Linux advisories
Debian OVALDebian security advisories
Ubuntu OVALUbuntu security advisories
RHEL OVALRed Hat Enterprise Linux advisories
Oracle OVALOracle Linux advisories
SUSE OVALSUSE Linux advisories
AWS LinuxAmazon Linux advisories
VMware PhotonPhoton OS advisories
NVDCVSS severity enrichment

Each updater polls its source periodically, so vulnerability reports stay current without manual intervention.

Architecture

Clair v4 wraps the ClairCore library, which handles distribution detection, vulnerability source integration, and layer indexing. ClairCore can be used on its own for custom scanning implementations; Clair adds the HTTP API and orchestration on top.

Written in Go, Clair exposes a REST API for submitting manifests and retrieving vulnerability reports. It stores state in PostgreSQL and can run as a single combined process or as separate indexer, matcher, and notifier services for scale.

Registry Integration
Clair is designed to work as a scanning service integrated with container registries rather than as a standalone CLI tool. It is the default scanner for Red Hat Quay and Quay.io. For standalone CLI-based scanning, consider Trivy or Grype.

When should you use Clair?

Clair is best suited for organizations that need server-side vulnerability scanning integrated with their container registry workflow. It is the right choice if you already run Red Hat Quay or Quay.io, or if you are building custom registry infrastructure that needs an API-driven scanning backend. The REST API design works well for automated pipelines that scan images on push.

Limitations: Clair only does container image scanning. It does not support filesystem, IaC, or source code scanning. Alpine SecDB does not include severity information, so Alpine-based image vulnerabilities show as “Unknown” severity until NVD enrichment adds CVSS data. Clair requires PostgreSQL and is operationally heavier than CLI-based scanners like Trivy or Grype.

For a broader view of container security options, see our container security tools category page.

Frequently Asked Questions

What is Clair?
Clair is an open-source tool for the static analysis of vulnerabilities in container images. It parses image contents layer by layer and reports known vulnerabilities by matching discovered packages against security databases from 9+ Linux distributions and the National Vulnerability Database (NVD). Clair is developed by Red Hat and powers vulnerability scanning in Quay.io.
How does Clair scan container images?
Clair uses a two-step process: indexing and matching. During indexing, Clair fetches container image layers, examines their contents, and generates an IndexReport listing discovered packages. During matching, it correlates those packages against continuously updated vulnerability databases to produce a VulnerabilityReport with affected CVEs and severity scores.
Which vulnerability databases does Clair use?
Clair pulls vulnerability data from distribution-specific sources including Alpine SecDB, Debian OVAL, Ubuntu OVAL, RHEL OVAL, Oracle OVAL, SUSE OVAL, AWS Linux, and VMware Photon advisories. It enriches this data with CVSS scores from the National Vulnerability Database (NVD) for standardized severity ratings.
Is Clair free to use?
Yes, Clair is fully open-source under the Apache 2.0 license and free for commercial use. It has 11k GitHub stars and 117 contributors. Red Hat Quay includes Clair as its integrated vulnerability scanner, and Clair can also be deployed standalone with any OCI-compliant container registry.
How does Clair compare to Trivy?
Clair is designed as a service that integrates with container registries, particularly Quay.io, and focuses on server-side image scanning through its REST API. Trivy is a CLI-first scanner that runs locally and covers a broader scope including filesystems, Git repositories, and IaC configurations. Clair is best suited for registry-integrated scanning workflows, while Trivy is more versatile as a standalone tool.