Open-source alternative to Snyk Container

Snyk Container can be replaced by self-hosted Trivy in CI, Harbor's built-in Trivy scanning at the registry and Trivy Operator in clusters. Coverage gaps, especially base image advice, need a plan.

On this page

Can open-source Trivy replace Snyk Container for image scanning?

For most image vulnerability scanning, yes. Trivy, Harbor's built-in scanning and Trivy Operator can cover the three places where container images matter: the CI pipeline that builds them, the registry that stores them and the Kubernetes cluster that runs them. What they do not give you is base image advice, the recommendation that a newer or different base image would clear a set of findings, and the fix workflow that Snyk's hosted tooling provides. Plan those two gaps before you set a renewal date. This section covers the scanning replacement only. Snyk's plan limits, credit rules and Enterprise-only features are covered on the Snyk hub, so check those there before comparing contract terms.

Trivy is the scanner in all three places. Trivy is licensed under Apache-2.0 and scans container images, so a CI job can fail a build when a vulnerability above your threshold is found. Harbor provides static vulnerability analysis through Trivy when it is installed with the --with-trivy option, and it can also connect to an external Trivy instance. Harbor itself is licensed under Apache-2.0, so the registry, its scanning and its replication features carry no license fee. Trivy Operator, also Apache-2.0, scans workloads continuously inside the cluster, for example when a new Pod is created, and stores results as Kubernetes custom resources. Confirm which Trivy version your Harbor release bundles against the Harbor release notes before you rely on its database freshness.

Decide who owns the findings. Each scan point produces its own report, so an image can look clean in CI and still be flagged in the cluster when a new CVE is published. Choose one system of record for triage, such as DefectDojo or a ticketing queue, and decide who reviews findings for images that are already running. Ask your security team to confirm the required scan frequency and the evidence format they need, because a scanner report alone may not satisfy an audit request. Check the database mirror process for air-gapped networks too, since Trivy's vulnerability data must be kept current inside your boundary.

Mapping Snyk Container capabilities to open-source options

This table maps the main things Snyk Container does to the open-source tools that cover them: Trivy in CI, Harbor at the registry and Trivy Operator in clusters. Read each row for what the open-source option covers and which gaps you must confirm against the current Snyk feature list and each tool's documentation before you cancel anything. The main takeaway is that the open-source stack covers scanning and reporting well, but base image upgrade advice and hosted fix pull requests need a separate plan.

CapabilityOpen-source optionCoverage notes
Image vulnerability scanningTrivy in CI and Harbor's Trivy integrationTrivy scans container images for known CVEs in OS packages and language dependencies. Confirm the database update schedule in your pipeline and mirror it internally if runners lack internet access.
OS package and dependency detectionTrivy scannersTrivy identifies OS packages and software dependencies in images and filesystems. Confirm that the language ecosystems in your images are covered before removing Snyk from those builds.
SBOM generationTrivy SBOM outputTrivy can generate an SBOM for an image and can also scan an existing SBOM. Confirm the SBOM format your downstream tools need, since Dependency-Track consumes CycloneDX.
Secrets and misconfiguration checksTrivy secret and misconfiguration scannersTrivy checks for exposed secrets and Dockerfile or configuration issues. Snyk's depth in these areas may differ, so compare rule sets on a sample of your own images.
Registry scanningHarbor with Trivy enabled at installHarbor scans images it stores through the bundled Trivy scanner, enabled with the --with-trivy option. Confirm scan-on-push and scheduled rescan settings in your Harbor version.
In-cluster scanningTrivy OperatorTrivy Operator scans workloads as they run and stores vulnerability and config audit reports as Kubernetes custom resources. Confirm it reaches the namespaces and image registries you need.
Base image upgrade adviceNot provided by Trivy as a core featureTrivy reports vulnerable packages but does not recommend a replacement base image. Confirm this against the current Snyk feature list and plan a manual or scripted base image review.
Fix pull requests and hosted remediationNot provided by Trivy or HarborSnyk offers hosted fix workflows. Confirm the exact Snyk plan that includes them and budget time for developers to triage and fix findings directly.
ReportingTrivy table, JSON, SARIF and template outputs, plus DefectDojoTrivy supports table, JSON, SARIF, template and SBOM formats for pipelines and dashboards. Confirm which formats your ticketing and tracking systems import.

Which Trivy deployment fits each scanning point

Trivy can run at three points in a container lifecycle: the build pipeline, the registry on push, and inside the Kubernetes cluster while workloads run. Each point catches different problems, so the right choice depends on where your gates and evidence need to sit.

Trivy in CI for build gating

Run the Trivy CLI in the pipeline after the image build and before the push or deploy step. Its scanners cover OS packages, language dependencies, known CVEs, misconfigurations, secrets and licenses, and the table, JSON and SARIF formats let you fail a build on a severity threshold and attach results to code review. For controlled networks, mirror trivy-db and the other databases to an internal registry and point the scanner at them with the repository flags. Check that the mirror refresh job runs, because stale databases quietly weaken every gate.

Trivy self-hosting docs

Harbor with Trivy at push time

Install Harbor with the --with-trivy option so every image pushed to a project is scanned at the registry, regardless of which pipeline or developer pushed it. Harbor adds role-based access control, LDAP, AD or OIDC single sign-on, audit logs and proxy cache projects that serve cached upstream images when the upstream is unreachable. The trade-off is operational: Harbor is a stateful service with its own database, cache and upgrade cadence. Recent releases changed the bundled database and cache and introduced breaking webhook and content trust behavior, so plan a backup and a staging upgrade before each move.

Harbor scanning docs

Trivy Operator for in-cluster scanning

Trivy Operator scans workloads as they are created and keeps re-evaluating them, storing vulnerability, config audit, exposed secret, RBAC and compliance reports as Kubernetes custom resources. This catches images that were scanned clean at build time but now carry newly published CVEs, and it reports on running clusters rather than only on pipeline output. Its compliance reports cover the CIS Kubernetes Benchmark and Pod Security Standards profiles. The trade-off is cluster access: the operator needs read permissions across namespaces and a place to run, so review its RBAC scope and where its reports are readable before installing.

Trivy Operator README

How image scans flow from build to registry to cluster

The flow starts with a developer commit that builds a container image in CI. Trivy scans the image before the push, and a failing result stops the pipeline. Harbor stores the accepted image and runs its own bundled Trivy scan, and the cluster pulls the image from Harbor. Trivy Operator then reports on the Pods that are actually running. The subgraph marks the self-hosted boundary: Harbor and the internal trivy-db mirror must be kept updated, because stale vulnerability data makes both scans less reliable. Check that the CI scanner, Harbor's scanner and the operator all read from the same mirror.

Image scans at three points: CI gate, registry, and running Pods.

Base image advice Trivy does not give

Trivy tells you which CVEs are present in an image, but it does not tell you which base image to move to or how far the upgrade will ripple through your build. That decision needs a base image policy, a rebuild schedule and a named owner before the switch from Snyk Container. Without them, a report full of findings becomes a backlog nobody is accountable for. Write the policy down: which base images are approved, which upstream tags are allowed to be used as a source, how long a base may stay in use after a patched release appears, and who approves an exception.

A practical way to build this is to pull upstream images through Harbor's proxy cache rather than letting builds reach public registries directly. Proxy cache projects serve the cached copy if the upstream is unreachable and apply a default 7-day retention policy, so you should set retention explicitly for base images you rely on. Pair the cache with a short, curated list of base images that your platform team rebuilds on a fixed schedule, scans with Trivy in CI, and publishes to a separate Harbor project. Application teams then build from that project only, and the owner tracks which services still reference an older base tag. Before you switch, confirm with Snyk which base image recommendations your current plan and contract include, since that guidance may not carry over to Trivy and should not be assumed to exist in your tier.

Reporting image findings to engineers, security and auditors

Engineers mostly need findings where they already work: the CI log, the pull request and the ticket. Trivy's table output gives a readable summary in the pipeline log, while JSON gives scripts a stable structure to parse. SARIF is the format to use when your code hosting platform accepts it for code scanning results, since it places findings alongside the code they relate to. Trivy supports table, JSON, SARIF, template, SBOM and GitHub dependency snapshot formats, so teams can match output to each consumer.

  • Table output in CI: Print a severity-filtered table in the job log so a failing build explains itself without a download.
  • SARIF for code hosting: Upload SARIF to the code host's security view if it supports the format, so findings appear on the affected branch.
  • JSON for scripts: Parse JSON to open tickets, post comments or apply custom fail rules based on fix availability.
  • Template output: Use a template when a team needs a fixed layout for a chat message or ticket body.
  • Exit codes: Configure the scan to fail the job on chosen severities so the report and the gate stay in sync.

Before you standardize, confirm which report formats your pipeline runner, code host and ticketing tool accept, and test each one with a sample image.

Migrating Snyk Container scans to Trivy and Harbor

This sequence moves image scanning from Snyk Container to Trivy in CI, a Harbor registry scanning on push, and optional in-cluster scanning, with a parallel run before Snyk is cancelled. Each step ends with a check you can verify before the next one starts.

  1. Inventory Snyk Container projects and export results

    The platform or security lead lists every image Snyk Container monitors, the registries and base images behind them, and the owning teams. Export what your plan allows, which may be limited on free and Team plans, so ask Snyk in writing what is available for your tier. Keep a dated copy of current findings and the ignore or exception list, since those decisions will need to be re-recorded in the new tooling. This step is done when every image has an owner and an exported findings snapshot is stored outside Snyk.

  2. Add Trivy to CI in report-only mode

    The pipeline owner adds a Trivy image scan step to the existing build jobs and configures it to write results in SARIF or JSON without failing the build. Run it alongside Snyk on the same images so differences are visible from the first build. Compare finding counts per image and note where Trivy reports packages or CVEs that Snyk does not, and the reverse. This step is done when two or more weeks of comparable reports exist for each pipeline, which you should confirm against your own release cadence.

  3. Mirror trivy-db to an internal registry

    The platform team publishes the trivy-db, trivy-java-db and trivy-checks OCI images to an internal registry and points Trivy at them with the --db-repository, --java-db-repository and --checks-bundle-repository options. Where the network has no internet access, download the database archive on a connected machine and copy it into the cache db directory on the offline system. Assign an owner and a refresh schedule, because the Trivy documentation warns that stale mirrors quietly reduce coverage. This step is done when a CI job pulls the databases from the internal mirror and the mirror's last update date is visible to the team.

  4. Enable Harbor scanning or connect external Trivy

    The registry administrator either installs Harbor with the --with-trivy option or connects Harbor to an existing Trivy instance. Before upgrading any existing Harbor, back up the database and check the v2.15.2 notes: that release moves the bundled database from PostgreSQL 15 to PostgreSQL 18 on container startup and replaces Redis with Valkey, and it recommends a reindexdb run if index problems appear. Also check v2.15.3 for two breaking changes: webhooks to internal network addresses are blocked by default, and signing unsigned images fails in projects that enforce content trust. Confirm both with your CI notifications and signing workflows. This step is done when a test push to a Harbor project shows a completed scan report.

  5. Set severity gates for build and deploy

    The security lead defines which severities block a build, which only warn, and how accepted risks are recorded with an owner and expiry. Apply the gate in CI first, then in Harbor's project policies that prevent pulling vulnerable images, so that developers see the same rule at both points. Because Trivy does not recommend base images, document a separate base image update process that tells teams which tags to rebuild on. This step is done when a deliberately vulnerable test image fails the gate and a documented exception path exists.

  6. Run Trivy Operator in a test cluster

    The cluster team installs Trivy Operator in a non-production cluster, which scans new workloads as they are created and stores vulnerability reports as Kubernetes custom resources. Review the generated reports with the same owners who triaged the Snyk output, and confirm whether the cluster's kubelet and pod settings allow the operator's jobs to run. Plan for the operator's reports to feed the same review queue or a reporting tool such as DefectDojo. This step is done when every test workload has a report resource and the team agrees on where those reports are reviewed.

  7. Cut over and cancel Snyk after a parallel run

    The engineering manager moves production gates to Trivy and Harbor only after the parallel period shows that critical and high findings match the agreed triage. Keep Snyk monitoring active until the parallel period has covered at least one full release cycle for each critical service. Then confirm the contract end date in writing, revoke tokens and integrations, and archive the exported data. This step is done when Snyk is disabled, the archived exports are stored in your own infrastructure, and the Harbor and Trivy schedules are on the platform team's runbook.

Running Trivy beside the rest of the Snyk suite

Some teams keep parts of Snyk for a period after moving image scanning to Trivy, because Snyk Open Source, Code or IaC may still be under contract. The four cards below cover the places where two tools meet, and what to settle before either one becomes the record of truth.

Shared pipeline stages

Trivy can scan dependency manifests, lockfiles and IaC files in the same CI job that builds the image, so one stage can replace several Snyk steps. Keep the stage order explicit: image scan, filesystem scan and IaC scan should each write their own report with a stable name. Check which Snyk checks your pipeline calls by name, because removing a step silently can leave a gate that still passes with no scan behind it.

Trivy report formats

Duplicate findings across tools

A single vulnerable package can appear in a Snyk Open Source report, a Trivy filesystem report and a Trivy image report, each with a different identifier or severity source. Decide which tool owns each finding class before you start, for example image OS packages from Trivy and application dependencies from one source only. Confirm how your tracker deduplicates these items, since a count that doubles during parallel running will mislead audit evidence.

Separate tokens and access

Each Snyk integration uses its own organization and API token, and Trivy-based jobs need their own registry credentials and, if you use a central database mirror, read access to that mirror. Map every credential to one job and one owner, and record which account can view or export results. Rotate and revoke the Snyk tokens when the contract ends, since a forgotten token is a common reason a retired tool keeps access to repository data.

Two sources of truth

When Snyk and Trivy both report on the same release, the organization can end up with two severity ratings, two ignore lists and two answers to the question of whether a build is safe. Name one system as the source of record for vulnerability status and export the other tool's results into it, for example through a DefectDojo or Dependency-Track import. Confirm the overlap against your own Snyk plan limits, since which Snyk features you can still call depends on your plan and contract terms.

What does a Snyk Container replacement cost and take?

What are the cost components of replacing Snyk Container with Trivy and Harbor?

The cost is made of recurring infrastructure and recurring people time, with a smaller one-time setup. Trivy itself is Apache-2.0 and has no license fee, so the main line items are the CI runners that run scans, the servers and storage for a Harbor registry if you adopt it, the database mirror you keep current, and the staff hours that set up pipelines, tune policies and triage findings. Trivy's vulnerability databases are published as OCI images, so an internal mirror and its update job are a recurring cost to plan for. Ask the provider to split the quote into one-time build work and recurring run work, and to show the hours assumed for triage.

  • Compute for scans in CI and, if used, the Trivy Operator inside clusters
  • Storage and backup for Harbor and its bundled database
  • Upgrades, patch releases and database mirror maintenance
  • Triage time and support, which usually grow with the number of images
Can our team replace Snyk Container without outside help?

Yes, many teams can, provided they have someone who owns CI pipelines and someone who owns container security decisions. Trivy's CLI is straightforward to add to a build, and its reports can be produced as table, JSON or SARIF output. The harder parts are the things Trivy does not decide for you: base image selection, exception handling, a registry that enforces scan results, and a retained history of findings for auditors. Teams with a small platform group often start alone for CI scanning and bring in outside help for the registry and cluster pieces, or for a fixed-scope rollout. Decide early which parts your staff will own after handover.

How long does a Snyk Container migration pilot take, and what drives the length?

The pilot length depends on how many images and pipelines are in scope, how many teams approve exceptions, and whether Harbor, the Trivy Operator or both are part of the plan. This page does not supply a duration, so ask for one in the written scope rather than relying on a generic figure. A pilot that scans one service in parallel with Snyk is much shorter than one that moves every registry and cluster. Ask the provider to list the milestones, the images in scope, the parallel-run period and the acceptance criteria before work starts.

What does the security team need to provide during the migration?

Security teams set the policy the pipeline enforces: which severities block a build, how exceptions are approved and how long they last, and which findings must be reviewed before release. They also need to confirm what evidence they must keep. Trivy reports can be stored in JSON or SARIF, and Harbor keeps scan results alongside images, so the team can decide retention before rollout. Expect the security team to review a sample of findings during the parallel run to confirm that the new gate does not block work the old one allowed for the wrong reasons.

What does the platform team need to provide for the registry and cluster parts?

The platform team provides the runners, the registry hosting, storage, network access and the upgrade plan. Harbor's documentation lists installation prerequisites and a high-availability path through Helm, and its releases change bundled components, so upgrades need a backup and a test window. Harbor's v2.15.2 release notes recommend a backup before upgrading, and v2.15.3 changed defaults for webhooks and content trust. Ask the provider to confirm how upgrades, backups and restores are handled for the registry and any Kubernetes cluster that runs the Trivy Operator.

Do Harbor and Trivy Operator require Kubernetes skills?

Trivy in CI needs no Kubernetes skills, but Harbor in high availability and the Trivy Operator both run on Kubernetes, so they do. Harbor can also be installed with its installer on a single host, which is a different skill set and usually a different risk profile. The Trivy Operator stores its reports as Kubernetes custom resources, so someone must know how to read those objects and secure access to them. Kubernetes authenticates users with certificates, tokens or an authenticating proxy, and stores Secrets unencrypted in etcd unless encryption at rest is configured. If your team lacks these skills, budget for them in the quote or ask for training as part of the scope.

What should we ask for in a quote for this replacement?

Ask for a written scope that names each image source, pipeline, registry and cluster in the migration, along with the deliverables and acceptance tests. Request one-time and recurring costs as separate lines, the hours assumed for build, triage and handover, and who holds the upgrade and database mirror tasks after handover. Ask how the provider will handle Harbor and Kubernetes upgrades, backups, and retesting after changes. DeployOpen does not publish a price list, and most engagements are fixed-scope, so a quote follows from the written scope rather than a standard rate.

How DeployOpen scopes and delivers image scanning replacements

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For a Snyk Container replacement, that means a written scope covering Trivy in your pipelines, registry-level scanning and in-cluster reporting, run in your cloud accounts, data centers or air-gapped networks.

How we scope

  • Inventory which images, registries and clusters Snyk Container scans today and who acts on the results
  • Agree in writing which pipelines, Harbor instances and Kubernetes clusters are in scope and which are not
  • Confirm base image ownership, rebuild responsibility and the patch timeline your own policy requires

How we build

  • Wire Trivy into CI with severity gates, SARIF or JSON output and a mirrored vulnerability database
  • Configure Harbor scanning with Trivy, project policies and access controls, plus Trivy Operator where clusters need continuous reports
  • Test the setup, including database update paths, offline cache behavior and report permissions

How we hand over

  • Deliver runbooks for database mirror updates, Harbor upgrades and scanner version pinning
  • Document the mapping from Snyk Container policies and alerts to the new gates and reports, with the gaps listed
  • Provide evidence for your vulnerability management process review, such as scan configuration and report samples

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
  • Ongoing support, upgrades and continuous testing are available as a retainer, which you can request in the quote
  • Ask for the quote to separate one-time setup from recurring maintenance, mirror operations and on-call coverage

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.