Container images and the Kubernetes clusters that run them represent one of the most complex attack surfaces in modern infrastructure. A single base image can pull in hundreds of transitive dependencies, each with its own vulnerability history. Cluster manifests misconfigure RBAC, network policies, and pod security contexts in ways that routinely end up in breach post-mortems. And runtime behavior in production frequently diverges from what any static scan would catch.
This article covers the major tools that address these problems, organized by where they operate in your stack: image scanning at build time, infrastructure-as-code (IaC) analysis at plan time, and runtime behavioral detection in production. These categories are not interchangeable; a complete security posture needs coverage in all three.
What Problem Are These Tools Solving?
Container security tools broadly address four distinct concerns:
- Vulnerability detection: Known CVEs in OS packages and application dependencies inside your images
- Secrets detection: Hardcoded credentials, tokens, or private keys baked into layers
- Misconfiguration analysis: Kubernetes manifests, Helm charts, Dockerfiles, and Terraform that violate security benchmarks like CIS or PSS
- Runtime threat detection: Unexpected syscalls, privilege escalations, or network connections happening inside running containers
No single tool covers all four equally well. The tools below each have a primary domain, and the practical section at the end explains how to combine them.
Trivy: The Swiss Army Scanner
Trivy, maintained by Aqua Security, has emerged as the most widely adopted open source container scanner available today. As of February 2026, the project sits at version 0.69.1 with over 32,000 GitHub stars and more than 513 contributors. It is licensed under Apache 2.0 with no paywalls or usage caps.
What Trivy Scans
Trivy handles a remarkably broad target set from a single binary:
- OCI and Docker container images
- Filesystems and git repositories
- Kubernetes clusters (via
trivy k8s) - Virtual machine images
- AWS, Azure, and GCP cloud resources (via plugins)
For each target, it detects OS package vulnerabilities (using data from NVD, GHSA, and OS vendor advisories), application dependency vulnerabilities (npm, pip, Maven, Cargo, Go modules, and more), IaC misconfigurations in Kubernetes manifests and Dockerfiles, exposed secrets, and SBOM generation in both CycloneDX and SPDX formats.
Trivy ships as the default embedded scanner in Harbor, the CNCF container registry. It has first-class integrations with GitLab CI, GitHub Actions, AWS Security Hub, and the Kubernetes Operator ecosystem.
Practical Usage
# Scan a local image
trivy image nginx:latest
# Scan a live Kubernetes cluster
trivy k8s --report=summary cluster
# Generate an SBOM in SPDX format
trivy image --format spdx-json --output sbom.json python:3.12-slim
# Scan a Terraform directory for misconfigurations
trivy config ./terraform/
The trivy k8s subcommand deserves special attention. It connects to your cluster via kubeconfig, enumerates running workloads, pulls image references, and scans both the images and the live YAML manifests simultaneously. You get CVEs and misconfiguration findings in one report, which eliminates the need to stitch together results from separate tools when you are triaging a cluster.
Limitations
Trivy’s vulnerability database accuracy is very high but not perfect. Running it alongside a second scanner (covered below) catches edge cases where databases diverge. The IaC scanning is solid for common patterns but the graph-based policy engine in dedicated tools like Checkov goes deeper on complex resource relationships.
Grype and Syft: The Anchore Open Source Stack
Anchore publishes two complementary open source tools that work as a pipeline: Syft generates SBOMs, and Grype scans them for vulnerabilities. Both are Apache 2.0 licensed, actively maintained (documentation updated February 2026), and available as standalone binaries or Go libraries.
How the Pipeline Works
Syft inspects a container image or filesystem and catalogues every installed package: OS packages from dpkg or rpm databases, language runtimes from lock files, and binaries identified by heuristics. It outputs SBOMs in Syft JSON, SPDX, CycloneDX, and several other formats.
Grype takes any SBOM as input and matches it against vulnerability databases from NVD, GitHub Advisory, and OS-specific sources. When you call grype directly on an image, it invokes Syft internally, but you can also feed it a pre-generated SBOM from a separate pipeline step, which is valuable for auditing images at deployment time without re-scanning from scratch.
# Generate an SBOM with Syft
syft nginx:latest -o cyclonedx-json > nginx-sbom.json
# Scan that SBOM with Grype
grype sbom:nginx-sbom.json
# Or scan an image directly
grype python:3.12-slim
# Filter to only show critical/high
grype python:3.12-slim --fail-on high
Why Run Grype Alongside Trivy?
The databases behind Grype and Trivy are similar but not identical. In practice, each tool occasionally finds CVEs the other misses, particularly for language-specific packages where advisories land in GHSA before they propagate to NVD. Running both and diffing their output is a low-cost way to catch gaps, especially for regulated environments where demonstrating due diligence matters.
Checkov: IaC Security Before the Cluster Exists
Checkov, from Bridgecrew (now part of Palo Alto Networks’ Prisma Cloud), addresses the IaC layer. It is open source, free to use, and as of version 3.x it ships with over 2,500 built-in policies covering Terraform, Kubernetes manifests, Helm charts, Dockerfiles, CloudFormation, Bicep, and more.
Kubernetes-Specific Checks
For Kubernetes workloads, Checkov evaluates policies drawn from CIS Kubernetes Benchmark, NSA/CISA hardening guidelines, and community-contributed checks. Common failures it catches include:
- Containers running as root or without a read-only root filesystem
- Missing resource limits and requests
- Privileged containers or dangerous capability grants
- Host namespace sharing (
hostPID,hostNetwork,hostIPC) - Permissive network policies or missing pod disruption budgets
- Images without digest pinning
# Install
pip install checkov
# Scan a Kubernetes manifests directory
checkov -d ./k8s/
# Scan a single Dockerfile
checkov -f Dockerfile
# Scan Helm chart with values
checkov --framework helm -d ./charts/myapp/
# Output SARIF for GitHub Advanced Security integration
checkov -d ./k8s/ --output sarif
Checkov’s graph-based scanning engine can evaluate multi-resource relationships, such as detecting that a Service of type LoadBalancer exposes a Pod whose container runs with excessive privileges, which simple per-resource linting misses.
The enterprise Prisma Cloud platform adds policy-as-code management, drift detection between IaC definitions and live cluster state, and IDE plugins for inline feedback. The open source CLI is genuinely useful on its own without the commercial layer.
Falco: Runtime Detection in Production
Falco occupies a completely different position in the stack. It does not scan images or IaC; it monitors system calls from running containers in real time. Falco graduated from CNCF incubation in February 2024 and is actively developed by Sysdig and a broad community.
How Falco Works
Falco hooks into the Linux kernel using eBPF probes (or a kernel module on older kernels). Every syscall made by every process in every container is evaluated against a rule set. When a rule matches, Falco emits an alert to stdout, a file, syslog, or a webhook.
A default rule set ships with Falco covering the most common threat patterns:
- Shell spawned inside a container (
docker exec bash) - Unexpected outbound network connections from known services
- Write operations to sensitive filesystem paths (e.g.,
/etc/passwd) - Privilege escalation via
setuidbinaries - Container image drift (a binary not present at build time executed at runtime)
# Custom Falco rule example
- rule: Unexpected Curl in Production Container
desc: curl or wget executed inside a running production container
condition: >
spawned_process and
container and
proc.name in (curl, wget) and
container.image.repository != "debug-tools"
output: >
Unexpected download tool in container
(user=%user.name cmd=%proc.cmdline container=%container.name image=%container.image.repository)
priority: WARNING
tags: [container, network]
At KubeCon North America 2025 in Atlanta, the Falco project demonstrated integration with Stratoshark: when a Falco rule fires, it can trigger capture of SCAP (System CAPture) files scoped to that event, giving you forensic-level packet and syscall data exactly when and where you need it without continuously capturing everything.
Falco is free and open source. Sysdig offers a commercial platform built on Falco with managed rules, a hosted UI, and response automation.
Snyk Container: Developer-First with Broad Integrations
Snyk Container takes a developer experience-first approach, integrating scanning directly into the places developers already work: IDEs, pull request checks, and container registry webhooks. It is not just a CLI tool; it is a platform with SCM integrations that open fix PRs automatically.
Key Differentiators
Snyk’s base image recommendation feature is practically useful. When it finds vulnerabilities in your base image, it does not just list CVEs; it evaluates alternative tags of the same base image and recommends the one that eliminates the most findings with the smallest surface area change.
# Install
npm install -g snyk
# Authenticate
snyk auth
# Scan a container image
snyk container test nginx:latest
# Monitor an image continuously
snyk container monitor nginx:latest --file=Dockerfile
Pricing
Snyk offers a free tier for individual developers. The Team plan runs $25 per developer per month with a five-developer minimum. Enterprise pricing is custom. The free tier imposes limits on the number of tests per month, which is worth checking against your pipeline volume before relying on it for CI.
Clair: The Registry-Native Scanner
Clair, maintained under the Quay project and backed by Red Hat, is the scanner embedded in quay.io and self-hosted Quay installations. It is a static analysis service designed to run continuously alongside a container registry: images are scanned on push and re-analyzed as new vulnerabilities are published without re-reading image content.
Clair v4 is the current actively maintained version. If you are running a self-hosted Quay registry, Clair is the natural choice because it ships as part of that stack. As a standalone scanner outside of the Quay ecosystem, Trivy or Grype offer a simpler operational model. Clair’s value is primarily as a registry-embedded service rather than a CI pipeline tool.
Comparison Table
| Tool | Best For | Pricing | Open Source? | Key Strength |
|---|---|---|---|---|
| Trivy | All-in-one scanning across images, clusters, IaC, and secrets | Free | Yes (Apache 2.0) | Broadest target coverage from a single binary |
| Grype + Syft | SBOM-first pipelines, complementary second scanner | Free | Yes (Apache 2.0) | SBOM generation and reuse; pairs well with Trivy |
| Checkov | IaC and manifest misconfiguration at plan/PR time | Free (CLI); enterprise via Prisma Cloud | Yes (Apache 2.0) | 2,500+ policies, graph-based multi-resource analysis |
| Falco | Runtime threat detection in production Kubernetes | Free (CLI); enterprise via Sysdig | Yes (Apache 2.0) | Only tool in this list that catches runtime threats |
| Snyk Container | Developer-first with auto fix PRs and IDE integration | Free tier; Team from $25/dev/month | Partial (CLI open, platform closed) | Base image recommendations and developer workflow integrations |
| Clair | Registry-embedded scanning in Quay deployments | Free | Yes (Apache 2.0) | Continuous re-analysis without re-reading image layers |
Combining Tools Into a Practical Pipeline
No single tool covers all four security concerns. A realistic pipeline for a Kubernetes-deployed service looks like this:
At commit time (developer laptop or pre-commit hook):
checkov -d ./k8s/ -d ./terraform/ # Catch IaC issues before they hit CI
trivy fs . # Scan the source tree for secrets and deps
In CI (on every pull request):
trivy image --exit-code 1 --severity HIGH,CRITICAL myapp:${SHA}
grype myapp:${SHA} --fail-on high # Second scanner for database coverage
snyk container test myapp:${SHA} # If using Snyk for fix PR automation
At image push (registry side):
Clair or Trivy integrated into Harbor or Quay scans every pushed image and blocks promotion to production registries when findings exceed your policy threshold.
In production clusters:
Falco deployed as a DaemonSet, watching for runtime anomalies that no static scan could have predicted.
Recommendations by Use Case
For a startup shipping fast: Start with Trivy in CI and Falco in production. Both are free, both have zero infrastructure requirements, and Trivy’s single-binary design means setup in a GitHub Actions workflow takes about ten minutes. Add Checkov for IaC once you have manifests in version control.
For a team using self-hosted Quay: Clair is already part of your registry. Add Checkov to your CI pipeline for IaC coverage and Falco for runtime detection. You do not need to add Trivy unless you want a second scan opinion.
For a mid-size engineering organization with regulated compliance requirements: Snyk Container gives you the developer workflow integrations (fix PRs, IDE plugins, registry monitoring) that reduce friction at scale. Pair it with Checkov for IaC and Falco for runtime. The Snyk Team plan’s per-developer pricing scales predictably.
For enterprise with an existing Palo Alto/cloud security contract: Prisma Cloud (built on Checkov) with Falco for runtime covers the full lifecycle and integrates with the broader cloud security posture management you likely already have.
For defense-in-depth at any scale: Run Trivy and Grype together in CI (they take different code paths through similar databases), Checkov on IaC, and Falco in production. This combination is entirely free, entirely open source, and covers every layer in the stack.
What Actively Maintained Means in This Space
All six tools covered here are under active development as of early 2026. Falco graduated CNCF in February 2024. Trivy released v0.69.1 in February 2026. Grype’s documentation was updated in February 2026. Checkov ships under Palo Alto Networks with ongoing investment. Snyk raised significant capital and continues platform development. Clair is maintained by Red Hat with quay.io as its continuous real-world test environment.
The velocity of CVE publication means a scanner that is not actively maintained becomes a liability within months. Verify your chosen tools’ release cadence before committing to them in production pipelines.
🔍 Free scanner: K8s YAML Security Linter — paste your K8s YAML and get 12 security checks with an A–F grade instantly.
🛠️ Try These Free Tools
Paste your Kubernetes YAML to detect deprecated APIs before upgrading.
Paste a Dockerfile for instant security and best-practice analysis.
Paste your dependency file to check for end-of-life packages.
Track These Releases