Kubernetes vulnerability scanning checks container images, manifests and live clusters for known vulnerabilities and misconfigurations. Trivy is the best free starting point: it scans images, filesystems and clusters, generates SBOMs, and can fail a build on high or critical CVEs. Pair it with Kubescape for posture and compliance, and fix findings by updating base images and dependencies.
Key takeaways
- Scan images in CI/CD, manifests before deploy, and the live cluster continuously, not just once.
- Trivy is the best free starting point for image, config and cluster scanning, with SBOM generation built in.
- Fix findings by updating base images and dependencies, then re-scan; triage by exploitability, not just severity.
A Kubernetes cluster runs dozens or hundreds of container images, each built from a base image and layers of dependencies. Any one of them can carry a known vulnerability. Scanning finds those flaws before attackers do — if you scan the right things, at the right time.
What is Kubernetes vulnerability scanning?
Kubernetes vulnerability scanning checks container images, Kubernetes manifests and live clusters for known vulnerabilities and misconfigurations. It compares the software in an image against vulnerability databases, and it checks manifests and cluster settings against security benchmarks.
A scanner does not attack anything. It reads an image layer by layer, builds an inventory of the operating system, packages and language dependencies, then compares that inventory with its vulnerability database. The database is built from sources such as the National Vulnerability Database, the GitHub Advisory Database and distribution security trackers.
Scanning covers four things: vulnerabilities in OS packages and language dependencies, misconfigurations in manifests and infrastructure as code, exposed secrets in ConfigMaps and environment variables, and insecure cluster settings such as privileged containers or weak RBAC.
Why does Kubernetes vulnerability scanning matter?
Containers make it easy to ship software fast, and easy to ship old software by accident. A base image pinned last year can carry dozens of known CVEs, and a manifest copied from a tutorial can run a pod as root with no resource limits.
Attackers scan public registries and clusters for known vulnerabilities too. A CVE with a public exploit is a known door, and scanning tells you which doors are open in your cluster before someone else finds them.
Scanning also creates the evidence auditors ask for. A software bill of materials (SBOM) lists every component in an image, so you can prove what you shipped and trace a new CVE to the images that contain it.
What should you scan in Kubernetes?
Scan at three points: the image at build time, the manifests before deploy, and the live cluster continuously. Each point catches different problems, and none of them alone is enough.
| What to scan | When | Tool | What it finds |
|---|---|---|---|
| Container image | Every build, in CI/CD | Trivy, Grype | Known CVEs in OS and language packages |
| Dockerfile and IaC | Every pull request | Trivy config | Misconfigurations before the image is built |
| Kubernetes manifests | Before deploy | Trivy config, Kubescape | Privileged pods, root users, missing limits |
| Live cluster | Daily, continuously | Trivy Operator, Kubescape | New CVEs in running images, drift |
| Secrets | Every scan | Trivy secret scan | Hardcoded keys in images and ConfigMaps |
| SBOM | Every build | Trivy, Syft | Full component inventory for audits |
New CVEs are published every day, so a clean image last week can have a known vulnerability today. That is why live-cluster scanning matters: it catches drift in images that were deployed weeks ago. The Kubernetes cloud-native security documentation likewise recommends scanning container images for known vulnerabilities and updating dependencies when fixes are available.
How does a Kubernetes vulnerability scanner work?
A scanner works in two steps: inventory first, then a database lookup. It reads an image layer by layer and lists the operating system and release, the packages in their exact versions, and the language dependencies from lock files and binaries.
Then it compares that inventory with its vulnerability database. Trivy's database is built from many sources — distribution security trackers, the GitHub Advisory Database, the Go vulnerability database and others — and downloaded as one file of a few hundred megabytes.
The scanner reports what is known. It cannot know whether the vulnerable code path is reachable in your application, so reading the results is always a second step done by a human. A critical CVE in a library your code never calls is less urgent than a high CVE in a package your service actually uses.
Which Kubernetes vulnerability scanning tools should you use?
Trivy is the best free starting point, and it covers most teams on its own. Kubescape adds posture and compliance checks, Grype is a focused alternative for image scanning, and commercial platforms add correlation across clusters for larger estates.
| Tool | Type | Best for | Price |
|---|---|---|---|
| Trivy | Open source, Aqua Security | Image, config and cluster scanning | Free, Apache 2.0 |
| Kubescape | Open source, CNCF | Posture, compliance, runtime | Free; ARMO platform quote-based |
| Grype | Open source, Anchore | Image and filesystem scanning | Free |
| Falco | Open source, CNCF | Runtime threat detection | Free, Apache 2.0 |
| Snyk | Commercial | Developer-first scanning | Free tier; paid plans |
| Wiz | Commercial | Agentless attack-path visibility | Quote-based |
| Sysdig Secure | Commercial | Kubernetes runtime depth | Quote-based |
| Aqua | Commercial | Full-lifecycle enforcement | Quote-based |
For free, production-grade coverage, pair Trivy for image and config scanning with Kubescape for posture and compliance and Falco for runtime detection. Kubescape checks clusters and manifests against frameworks such as NSA-CISA, MITRE ATT&CK and CIS, according to the CNCF Kubescape project page.
How do you set up Trivy for Kubernetes?
Start with image scanning in CI/CD. A minimal pipeline gate that fails the build on any high or critical CVE looks like this: trivy image --severity HIGH,CRITICAL --exit-code 1 myregistry/api:1.4.2. Scan a directory of manifests with trivy config --severity HIGH,CRITICAL ./k8s/.
Then scan the live cluster. The trivy k8s command connects with your current kubeconfig and scans all workloads. Scan the whole cluster with trivy k8s --report summary cluster, a namespace with --namespace production, or a single deployment with --report all deployment/nginx-deployment.
For continuous scanning, install the Trivy Operator with Helm. It watches workloads, starts ephemeral scan jobs, and publishes findings as native custom resources such as VulnerabilityReport and ConfigAuditReport. Query them with kubectl get vulnerabilityreports -n default. You can also generate an SBOM with trivy image --format cyclonedx --output sbom.cdx.json python:3.11-slim.
How do you read and triage scan results?
Do not panic at the total count. One nightly scan of a small setup can report hundreds of findings, and most of them are far less alarming than they sound once you sort them. Trivy reports what is known; it cannot tell you whether the vulnerable code is reachable.
Triage by exploitability, not just severity. A critical CVE in a package your service actually loads matters more than a critical CVE in a library that is installed but never called. Check whether a fix exists, whether the vulnerable function is reachable, and whether the workload is exposed to the internet.
Use severity filters to keep the signal high. Start by failing builds only on high and critical findings, and use --ignore-unfixed to skip vulnerabilities with no fix yet. Track unfixed findings separately so they are not forgotten.
What are the most common Kubernetes vulnerabilities?
The most common findings are outdated base images, privileged containers, pods running as root, missing resource limits, exposed secrets, and weak RBAC. Trivy and Kubescape flag all of these in manifests and live clusters.
Outdated base images are the largest category. Pinning an image to latest hides drift, while pinning to an exact version without a rebuild schedule lets CVEs accumulate. Use a minimal base image, pin to an exact version, and rebuild on a schedule.
Misconfigurations are just as common as CVEs. A pod that runs as root, has no resource limits, or mounts the host filesystem can turn a single vulnerability into a cluster compromise. Kubescape checks live clusters against CIS and NSA frameworks and reports these settings.
How do you fix Kubernetes vulnerabilities?
Fix findings by updating the base image or dependency to a fixed version, rebuilding the image, re-scanning it, and redeploying. That is the only fix that removes a CVE; suppressing a finding hides it without fixing it.
If no fix exists, isolate the workload: restrict its network access with a NetworkPolicy, remove unnecessary privileges, and track the CVE until a fix is published. Document the exception with an expiry date, so it is reviewed rather than forgotten.
Prevent repeat findings by using minimal base images, pinning exact versions, and adding a scan gate to CI/CD that fails the build on high or critical CVEs. A gate that blocks a vulnerable image is cheaper than an incident response after it is deployed. For a wider security baseline, see our small business cybersecurity checklist.
What mistakes do teams make with Kubernetes scanning?
The biggest mistake is scanning only at build time and never again. New CVEs appear daily, and a running image can become vulnerable weeks after it was deployed. Scan the live cluster continuously, not just in CI/CD.
Another mistake is treating every finding as equal. A scan that reports hundreds of findings is not hundreds of emergencies. Triage by reachability and exposure, fix the real risks first, and track the rest.
Teams also forget secrets and configuration. An image scan finds CVEs, but it will not catch a hardcoded key in a ConfigMap or a pod running as root unless you also run config and secret scanning. Run all three, and check your public services with our free security headers checker as part of the same routine.
The bottom line
Kubernetes vulnerability scanning works when it runs at build time, deploy time and runtime. Trivy is the best free place to start, Kubescape adds posture and compliance, and Falco adds runtime detection.
Start with a CI/CD gate that fails on high and critical CVEs, add live-cluster scanning with the Trivy Operator, and triage by exploitability. You can check the public side of your services with the free SSL checker while you set the scanning pipeline up.
Frequently asked questions
What is Kubernetes vulnerability scanning?
Kubernetes vulnerability scanning checks container images, Kubernetes manifests and live clusters for known vulnerabilities (CVEs) and misconfigurations. It finds outdated packages, exposed secrets, privileged containers and insecure settings before attackers exploit them.
What is the best free Kubernetes vulnerability scanner?
Trivy is the best free starting point. It is open source under the Apache 2.0 license, scans images, filesystems, Git repositories and live clusters, and generates SBOMs. Kubescape is the best free companion for posture, compliance and runtime checks.
How often should I scan a Kubernetes cluster?
Scan images on every build, manifests on every pull request, and the live cluster at least daily. New CVEs are published every day, so a clean image last week can have a known vulnerability today. Continuous scanning catches that drift.
What is the difference between Trivy and Grype?
Both are free, open-source image scanners. Trivy also scans Kubernetes manifests, IaC, secrets and live clusters, and generates SBOMs. Grype focuses on image and filesystem vulnerability scanning and pairs with Syft for SBOM generation. Many teams use Trivy as the main scanner.
Can vulnerability scanning find misconfigurations?
Yes. Trivy config scanning and Kubescape check manifests and live clusters against CIS benchmarks and best practices. They flag pods running as root, privileged containers, missing resource limits, exposed secrets and weak RBAC settings.
What should I do with a critical CVE in a running image?
Check whether the vulnerable package is actually used, then update the base image or dependency to a fixed version, rebuild, re-scan and redeploy. If no fix exists, isolate the workload, restrict network access, and track the CVE until a fix is published.
Does vulnerability scanning replace runtime security?
No. Scanning finds known vulnerabilities before deploy, but it cannot see what a running container does. Pair scanning with runtime detection such as Falco, which watches system calls for malicious behavior, and with network policies that limit what a compromised pod can reach.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the Trivy documentation, the Trivy Operator guide, the CNCF Kubescape project page, the Grype README and Kubernetes security documentation, all opened in November 2026.
How we write and fact-check →