> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/scanner-selection.md).

# Choose a scanner: Aqua Trivy or Grype

Compare Aqua Trivy and Grype to choose the right built-in container scanner for your Harness Artifacts registry, and understand when switching makes sense.

Harness Artifacts offers two built-in container scanners: **Aqua Trivy** and **Grype**. Both scan Docker and Helm images automatically on push, produce findings in the same format, and enforce the same policy sets. The choice between them is about detection characteristics: Trivy prioritizes breadth, and Grype prioritizes precision.

This page explains what sets them apart and helps you pick the one that fits your stack.

## What both scanners do

Before comparing, it helps to understand what they share:

* Both scan container images for known vulnerabilities (CVEs) in OS packages and application language dependencies.
* Both produce findings on the **Vulnerabilities** tab with the same fields: CVE ID, severity, affected package, installed version, fixed-in version.
* Both run inside the same **HARNESS ARTIFACT SCAN PIPELINE** that Harness creates and manages automatically.
* Both support policy-set enforcement; a Critical finding triggers quarantine the same way regardless of which scanner found it.
* Switching scanners on a registry does not affect existing policy sets, existing scan results, or other registries.

You configure one scanner per registry. The scanner applies to all images pushed to that registry.

## How they differ

|                               | Aqua Trivy                                                                                                                                                                               | Grype                                                                                                                                                                          |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Maintained by**             | Aqua Security                                                                                                                                                                            | Anchore                                                                                                                                                                        |
| **Strength**                  | Breadth: widest OS and language ecosystem coverage                                                                                                                                       | Precision: lower false positive rate on application packages                                                                                                                   |
| **OS packages scanned**       | Alpine, Debian, Ubuntu, Red Hat Enterprise Linux (RHEL), CentOS, Oracle Linux, Amazon Linux, SUSE, Photon OS                                                                             | Alpine, Debian, Ubuntu, RHEL, CentOS, Oracle Linux, Amazon Linux                                                                                                               |
| **Language packages scanned** | npm, pip, Maven, Gradle, Go modules, Cargo, NuGet, Ruby gems, PHP Composer, Dart, R, and others                                                                                          | npm, pip, Maven, Gradle, Go modules, Cargo, NuGet, Ruby gems, PHP Composer                                                                                                     |
| **Vulnerability databases**   | NVD, GitHub Advisory Database, plus OS-vendor advisories: Red Hat OVAL, Debian Security Tracker, Ubuntu CVE Tracker, Alpine secdb, Amazon Linux ALAS, Oracle OVAL, SUSE OVAL, and others | Grype DB (aggregates NVD, GitHub Security Advisories, Red Hat VDB, Debian Security Tracker, Ubuntu Security Notices, Alpine secdb, Amazon Linux ALAS, Oracle OVAL, and others) |
| **False positive tendency**   | Higher on application-layer packages                                                                                                                                                     | Lower on application-layer packages                                                                                                                                            |
| **SBOM integration**          | Broad SBOM generation support                                                                                                                                                            | Native integration with Syft (SBOM generator from the same project)                                                                                                            |

Both scanners pull from overlapping sources. The difference in breadth is at the edges: less common OS distributions and additional language ecosystems where Trivy has explicit vendor advisory integrations that Grype does not.

## Choose based on your situation

### Choose Aqua Trivy if

* Your images use less common base OS distributions, such as SUSE, Oracle Linux, or Photon OS, where Trivy has dedicated vendor advisory integrations.
* Your images bundle language dependencies beyond the mainstream set (Dart, R, some PHP edge cases).
* Compliance reporting requires findings pulled from the widest possible set of advisory databases.
* Your team prefers to see every possible CVE and filter noise manually.

### Choose Grype if

* Your images are built on common base images: Alpine, Ubuntu, Debian, RHEL.
* Your images carry heavy application-layer dependencies (npm, pip, Maven, Go modules) and your team is spending time triaging false positives.
* You want a cleaner signal from the start: fewer findings that are more reliably accurate.
* You are using Syft for SBOM generation outside Harness, and want the scanner and SBOM tool to share the same vulnerability data model.

### Not sure? Start with Grype

For teams deploying containerized applications on standard base images, Grype produces a less noisy result set out of the box. If you later find that specific packages or OS distributions are producing gaps in coverage, switch to Trivy. You can change the scanner at any time; it takes effect on the next push.

## What switching scanners changes (and what it does not)

**Changes**:

* New pushes are scanned by the new scanner.
* Future findings may differ in count and package attribution. The two scanners do not always identify the same set of CVEs for a given image.

**Does not change**:

* Existing scan results on previously pushed artifacts. Those results remain and reflect the scanner that was active at the time of the push.
* Policy sets attached to the registry. Severity-based rules evaluate the same way regardless of scanner.
* Other registries. Scanner selection is per registry.

If you switch scanners and want comparable results across your artifact history, re-push the images you care about to trigger a fresh scan with the new scanner.

## Change the scanner for a registry

Go to [Configure security scanning](https://developer.harness.io/artifact-registry/3.0/registries/configure-security-scanning.md) for the step-by-step walkthrough. The scanner selection is in the **Security** section of the registry's **Configuration** tab.

## Next steps

* [Configure security scanning](https://developer.harness.io/artifact-registry/3.0/registries/configure-security-scanning.md) to enable scanning and select your scanner.
* [Vulnerability scanning: view and triage](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/vulnerability-scanning.md) to read and act on scan results.
* [Quarantine](https://developer.harness.io/artifact-registry/3.0/security-and-compliance/quarantine.md) to manage artifacts blocked by a policy violation.

{% @harness-feedback/feedback %}
