Aikido

Grype vs Trivy: Container Scanning and Remediation

Written by
Ruben Camerlynck

Grype is a focused vulnerability matcher for images, filesystems and software bills of materials (SBOMs). Trivy combines image vulnerability scanning with secrets and misconfiguration checks in one CLI. For an open-source pipeline, the choice is about inputs, matching behavior and workflow. When the harder problem is fixing the findings, Aikido offers another route: compare rebuilt image options and create reviewable Dockerfile fixes. This article compares standalone Grype and Trivy, not Anchore Enterprise or Aqua's commercial platform.

This comparison uses published product documentation, not a hands-on accuracy or speed benchmark.

TL;DR

  • Choose Grype for focused image and SBOM vulnerability matching, with exploit-risk scoring inside a pipeline your team controls.
  • Choose Trivy for one open-source CLI covering container vulnerabilities, secrets and configuration checks, with configurable detection and filtering.
  • Consider Aikido when you need verified container fix options and patched base-image replacements, rather than another report to translate into changes.

Grype vs Trivy at a glance

This table focuses on the shared container-security job. Aikido's differentiators are the steps between identifying a vulnerable image and shipping its replacement. For other options, see our Trivy alternatives and container scanning tools guides.

Swipe horizontally to see all columns.

Decision pointGrypeTrivyAikido Security
Core workflowImage and SBOM vulnerability matching in your pipeline.Image CVEs, plus configurable secrets and misconfiguration checks.Connect image findings to the repository and Dockerfile that need changing.
Triage controlsEPSS, known-exploited annotations, risk ranking and VEX filtering.Detection modes, severity/status filters and VEX; VEX is experimental.Review base-image context and the vulnerability impact of proposed fixes.
Fix verificationRebuild candidate images and rescan through your own workflow.Rebuild/rescan or integrate external patching tools.Rebuilds images to assess fixes; application tests are still required.
Dockerfile fix deliveryArrange source changes and PR automation outside the scanner.Use separate update, patching and PR automation.Review Dockerfile variants and create PRs; eligible images support scheduled fixes.
When upstream has no fixObtain a patched base or package from another source.Use another patch provider or a compatible replacement image.Backported replacements for supported bases through Aikido Images; plan limits apply.
Local pipeline checksLocal CLI with configurable severity-based failure thresholds.Local CLI with severity filters and configurable exit codes.Local release/PR checks upload findings to Aikido; not an offline-only CLI.
Best fitFocused vulnerability matching in an existing modular pipeline.Several security checks standardized around one open-source CLI.Teams that need verified image fixes and maintained patched-base options.

Scan coverage and SBOM workflows

Grype separates vulnerability matching from the wider security toolchain. It scans images directly or consumes an existing SBOM. Its architecture documentation explains that direct scans use Syft's cataloging capabilities internally. You do not have to run a separate Syft command before every Grype scan.

That separation is useful when you already retain inventories for released images. Rescanning the same inventory against new advisories can identify newly disclosed vulnerabilities without rebuilding the application. The inventory still needs to describe the exact artifact being assessed, not a different tag or an earlier build.

Trivy can generate and scan SBOMs too. It also checks secrets and misconfigurations, although scanner availability and defaults depend on the target. For example, image-configuration misconfiguration scanning must be enabled explicitly. Running one default image command is not the same as enabling every Trivy capability.

SBOM interoperability deserves a real test. Trivy documents limitations interpreting some third-party SBOM metadata. Anchore likewise notes that SPDX and CycloneDX exports may omit Syft-specific details. A valid file format does not guarantee identical package identification across tools.

Choose based on your inputs: Grype fits a deliberately modular inventory-and-matching workflow. Trivy fits teams standardizing several checks around one CLI. Test either with your distribution, language packages and existing SBOM format before standardizing on it.

Why Grype and Trivy disagree

A higher CVE count is not an accuracy score. Different package identification, advisory sources, detection settings and suppression rules can produce different results for the same image.

Trivy's vulnerability documentation explains its preference for distribution advisories when software was installed through an OS package manager. A distribution may backport a security fix without adopting the latest upstream version. Matching only the upstream version can therefore misrepresent whether the installed package is vulnerable.

Trivy also exposes precise and comprehensive detection modes. The default prioritizes fewer false positives; the broader mode may recover additional findings while increasing review work. Neither mode establishes a universal advantage over Grype.

Grype's result documentation exposes matching details and distinguishes exact matches from CPE-based matches that warrant closer inspection. Its output includes exploit-probability information, known-exploited vulnerability annotations and risk ranking. It is not simply an unprioritized list of CVEs.

Both tools support exceptions. Grype provides ignore rules and VEX filtering; Trivy supports severity/status filters and VEX, currently marked experimental in its documentation. VEX records whether a vulnerability affects a particular product; accepting such a statement still requires trust in its author and scope.

For a useful comparison, hold the image digest, architecture and package scope constant. Record scanner versions and database timestamps, then investigate disagreements package by package. Also separate vulnerabilities with available fixes from those without one. Filtering an unfixed issue out of a report does not remediate it.

CI/CD gates and ongoing operation

Both tools work as local or pipeline checks. Grype's --fail-on threshold can return a failing result at a chosen severity. Trivy separates severity filtering from its exit-code behavior, so the command must be configured to fail the build rather than merely print findings.

Database management is part of that setup. Grype and Trivy document local database handling and updates. A disconnected runner needs a deliberate refresh process; caching should not silently turn into scanning against stale advisories.

Performance also depends on what you ask the scanner to do. Compare cold starts separately from warm-cache runs, use the same image, and enable equivalent checks. Timing a vulnerability-only Grype scan against Trivy with additional scanners enabled would not answer which is faster at the same task.

Aikido also supports local image scanning. Images are scanned in your environment and findings are uploaded to Aikido. Its gating options distinguish release checks from PR checks for newly introduced vulnerabilities. Do not confuse that arrangement with an entirely offline, standalone CLI.

Grype or Trivy can be the right choice when the required output is a reliable machine-readable result. Aikido becomes more relevant when the team also needs to connect that result to the repository and change that resolve it.

From scan results to rebuilt images

A fixed package version is useful guidance, but it is not yet a working image. Someone must choose a base tag, update the Dockerfile or package installation, rebuild, rescan and run application tests.

Grype and Trivy can participate in automated remediation pipelines; they should not be labeled "manual-only." Trivy's ecosystem documentation describes Helmper using Trivy with Copacetic for OS-level patching. That is a composed workflow involving additional tools, not native Dockerfile remediation by the scanner alone.

Aikido's container workflow connects registry findings to the owning repository. Linking the correct Dockerfile enables AutoFix to propose the source change rather than leaving the finding detached from its build instructions.

The difference is how much of the fix process you assemble yourself. A team with a maintained rebuild-and-patch pipeline may prefer to keep it. A team repeatedly researching candidate tags and translating reports into Dockerfile edits has a concrete reason to evaluate Aikido's remediation workflow.

Pricing, packaging and operating effort

Grype and Trivy are free, Apache-2.0-licensed tools, as their project repositories and license information show. There is no scanner seat price to compare with a commercial subscription. The relevant budget is the workflow you need around each scanner.

Swipe horizontally to see all columns.

Pricing considerationGrypeTrivyAikido Security
Scanner license$0; Apache-2.0 open source.$0; Apache-2.0 open source.$0 Developer plan; paid tiers and enterprise options.
Container allowanceNo commercial image quota; your infrastructure determines capacity.No commercial image quota; your infrastructure determines capacity.Developer: 2 images. Basic: 50. Pro: 100. Plan limits apply.
Remediation workflowBudget for rebuilds, fix orchestration and any external patch service.Budget for update/rebuild tooling or additional patching integrations.Container AutoFix within plan allowances; Developer lists 10 AI AutoFixes/month.
Patched-base accessSource maintained or backported images separately.Source maintained or backported images separately.Aikido Images is listed from Pro; supported catalog and plan limits apply.
‍

Aikido's pricing lists a free Developer plan with two container images and ten AI AutoFixes per month. Larger plans increase the image allowance; Aikido Images appears from Pro. Check the selected plan's limits and scanning cadence rather than assuming every automation or hardened-image entitlement is included in free scanning.

For a fair evaluation, price the same image estate and operating requirements. Include runner time, database distribution, exception reviews and remediation maintenance. Keep Anchore Enterprise and Aqua's commercial products outside this comparison unless you are actually buying them. Aikido may replace work you would otherwise build, but no documented subscription price alone establishes lower total cost.

When Aikido is a better fit

Aikido's case is stronger container remediation, not merely a longer feature list. Two workflows matter when the bottleneck is selecting and delivering a fix.

Compare rebuilt fixes before choosing

Container AutoFix proposes several Dockerfile variants tied to alternative base images. Each option shows vulnerabilities addressed and newly introduced findings. The setup documentation explains that Aikido rebuilds the image to assess the change, with controls for build arguments, allowed tag patterns and OS-package updates.

Illustrative workflow: an application must stay on the same runtime major version and Alpine family. Restrict candidate tags, compare the rebuilt results and create a PR for the chosen Dockerfile change. An option with a larger CVE reduction is not automatically preferable if it changes the application's runtime assumptions.

Grype and Trivy can rescan every candidate you build, but you must supply the surrounding candidate-selection and change-delivery process. Aikido brings those steps together. Rebuild-and-rescan evidence verifies vulnerability impact, not application compatibility; your tests still determine whether the change is safe to deploy.

Patch supported bases without a migration

Sometimes the preferred fix is unavailable in the base release you need to retain. Aikido's hardened-image offering backports patches rather than always requiring a distribution upgrade. Its documentation gives a concrete example: an Aikido Images variant of Debian Bookworm carries a patched library for a vulnerability whose upstream fixes were available in newer Debian releases.

For supported images, that creates a remediation option that neither standalone scanner supplies as a maintained image service. Both Grype and Trivy can still scan a replacement sourced elsewhere. The distinction is obtaining and applying the patched base, not claiming exclusive detection.

Aikido Images also provides SBOM, VEX and provenance artifacts. Check the exact tag, architecture and plan entitlement, and test compatibility. Known-CVE remediation is not a guarantee against undisclosed vulnerabilities or application-layer issues.

Grype vs Trivy: which should you choose?

Choose Grype for focused, inspectable vulnerability matching in a modular pipeline. Choose Trivy when its additional scanning modes and shared CLI fit your existing workflow. Neither choice requires buying a platform to get useful container checks.

Choose Aikido when the larger cost is turning those checks into approved, rebuilt images. Its case rests on comparing concrete Dockerfile fixes and making supported patched bases available, not on winning a CVE-count contest. Evaluate Aikido container scanning with one representative image and take a finding through fix selection, PR review and your deployment tests.

Share:

https://www.aikido.dev/blog/grype-vs-trivy

Subscribe for news

4.7/5
Tired of false positives?

Try Aikido like 100k others.
Start Now
Get a personalized walkthrough

Trusted by 100k+ teams

Book Now
Scan your app for IDORs and real attack paths

Trusted by 100k+ teams

Start Scanning
See how AI pentests your app

Trusted by 100k+ teams

Start Testing

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system.
Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.
Trusted by 150k+ orgs