KubeBolt docs
ENES GitHub

Security

Trivy: vulnerabilities and misconfiguration

Install Trivy Operator and light up all four security lenses — CVEs and exposed secrets, misconfiguration, RBAC posture and the CIS benchmark.

On this page
  1. What KubeBolt reads
  2. Install
  3. How KubeBolt finds it
  4. Verify
  5. What becomes a finding
  6. The CIS rollup trap

Trivy Operator scans what is actually running: the CVEs in your images, workload misconfiguration, exposed secrets, RBAC posture and the CIS benchmark. Its findings land across all four lenses — Vulnerabilities, Configuration, Permissions and Compliance — of Security & Compliance.

Nothing is pushed. Trivy writes CRDs and KubeBolt lists them on its sweep — no token, no webhook, no exposed endpoint. KubeBolt does not scan anything itself: what it shows is what the operator reported.

What KubeBolt reads

Six report types, all aquasecurity.github.io/v1alpha1, listed cluster-wide on every sweep:

ReportScopeLens
VulnerabilityReportper workloadVulnerabilities
ExposedSecretReportper workloadVulnerabilities
ConfigAuditReportper workloadConfiguration
RbacAssessmentReportper RolePermissions
ClusterRbacAssessmentReportper ClusterRolePermissions
ClusterComplianceReportclusterCompliance

The infra-assessment reports (InfraAssessmentReport, ClusterInfraAssessmentReport) do not become findings. They are read only when you open a compliance control, to name the resources that fail it.

Install

helm repo add aqua https://aquasecurity.github.io/helm-charts/
helm install trivy-operator aqua/trivy-operator \
  -n trivy-system --create-namespace \
  --set="trivy.ignoreUnfixed=true"

ignoreUnfixed=true is a recommendation, not a requirement. A CVE with no published fix is real, but it is not a task — there is nothing to upgrade to. Turn it off when you need the full inventory for an audit, and expect the list to grow a lot.

The chart’s defaults already run every scanner KubeBolt reads. The compliance reports — the CIS benchmark plus the other specs listed under compliance.specs — run on their own schedule, compliance.cron, every six hours by default. KubeBolt reads each report’s summary, which is what the operator writes with its default compliance.reportType=summary; keep it.

How KubeBolt finds it

By the label app.kubernetes.io/name=trivy-operator, falling back to pods named trivy-operator* in the trivy-system, trivy-operator or security namespaces. A hand-rolled manifest without the standard labels is still found if it lives in one of those. The result is the Trivy Operator card under Administration → Agents & Ingest → Integrations, for the cluster selected in the top bar.

Reading the reports needs a connection that can list them: direct, in-cluster, or the agent with its proxy on. A metrics-only agent produces no findings — see What it needs.

Verify

Reports appear a few minutes after install, one per workload:

kubectl get vulnerabilityreports -A
kubectl get exposedsecretreports -A
kubectl get configauditreports -A
kubectl get rbacassessmentreports -A
kubectl get clusterrbacassessmentreports
kubectl get clustercompliancereports

Findings show up in KubeBolt on the next sweep, within 10 minutes.

SymptomCause
Card says “not installed”No pods matching the label or the fallback namespaces
Card says “degraded”Operator pods present but not Ready
Reports exist, nothing at all in KubeBoltThe cluster is connected metrics-only, or (self-hosted) authentication is off
Reports exist, no CVEs in KubeBoltThey are all MEDIUM/LOW — see below
No reports after 10 minutesThe operator cannot pull images (private registry, no credentials)
CIS empty, everything else fineThe compliance report runs on its own schedule (every six hours by default); give it a cycle
Permissions lens empty while RBAC reports existEvery failing check sits on Kubernetes’ built-in roles, which are skipped
A fixed CVE never resolvesOne of the six report types cannot be listed — its CRD is missing on an older operator, or the connection lacks permission. A finding is never resolved from a partial sweep

What becomes a finding

CVEs: only CRITICAL and HIGH. MEDIUM, LOW and UNKNOWN are dropped on purpose. On a busy cluster they are thousands of rows, and a list nobody can finish is a list nobody reads. The full detail always stays in the reports themselves.

Misconfiguration: CRITICAL, HIGH and MEDIUM. Wider than the CVE gate, deliberately. Trivy’s MEDIUM band is where “runs as root”, “can escalate its own privileges” and “seccomp disabled” live — several of those matter more than things it calls HIGH. LOW is dropped: it is dominated by “runs with a low UID” (10000 or below) and “CPU/memory not limited”, and the latter is a capacity concern KubeBolt already raises as an insight. Each finding is titled by its check id (AVD-KSV-…), so a reworded check does not reopen it.

Compliance: only failing controls. A passing control produces nothing. A failing control keeps its severity when it is CRITICAL or HIGH, and is filed as medium otherwise.

Exposed secrets are counted apart from CVEs, and they have no severity gate: a LOW one is still a live credential in a layer anyone who can pull the image can read. An unrecognised severity band is treated as HIGH. The finding never contains the secret — Trivy’s partially masked match text is not stored, only the file and the image — and the remediation says to rotate the credential, not just remove it.

RBAC assessment: CRITICAL, HIGH and MEDIUM, the same gate as misconfiguration, for both namespaced and cluster-wide roles. Kubernetes’ own bootstrap roles — system:*, cluster-admin, admin, edit, view — are skipped: they are identical on every conformant cluster, and the control plane puts them back if you edit them, so a finding on one could never be acted on.

Each CVE carries its remediation ready to act on — upgrade <pkg> <installed> → <fixed> — and the full image reference, rebuilt from the three fields Trivy splits it across. That last part matters more than it looks: two workloads sharing an image are one fix, and without the reference nothing in the row says so.

Trivy reports against the ReplicaSet. KubeBolt files each finding under the owning Deployment, so a rollout does not reopen it with its age back at zero.

The CIS rollup trap

Some CIS controls are not independent checks — they are sums of checks KubeBolt already stores one by one. Any control whose checks are AVD-KSV-* is evaluated from the same config-audit reports that already produced their own findings.

Counting both would file the same problem twice: once as N workload misconfigurations, again as the control that groups them. Those controls are flagged as rollups, so the dashboard shows them as posture without adding them to the actionable total. Controls evaluated by control-plane and node checks (AVD-KCV-*) are never rollups: they are the only place that class of problem shows up.

This was verified against a live cluster: for all 35 controls where both sides had data, the control’s own failing count equalled the summed failing results of exactly those checks. The duplication is arithmetic, not approximate.

Cost of the sweep. KubeBolt lists six report types per cluster, each a cluster-wide LIST across the agent tunnel. The cost tracks payload, not object count: measured on a dev cluster, 57 vulnerability reports took 110 ms while 120 config-audit reports took 29 ms — a vulnerability report carries hundreds of CVEs, an assessment report a handful of checks. If the sweep ever shows up in your latency, the lever is Trivy’s scan scope, not KubeBolt’s read.