kubewarden-audit-scanner
Kubewarden-Audit-Scanner Overview
Secure your stack with a hardened Kubewarden-Audit-Scanner image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.
Kubewarden Audit Scanner is a policy-compliance component of the Kubewarden admission controller for Kubernetes. Running on a schedule as a CronJob, it evaluates resources already present in the cluster against your deployed Kubewarden policies and flags any that violate them, including resources that existed before a policy was created or that the admission webhook never saw. Results are written to Report and ClusterReport custom resources that can be queried with kubectl or visualized in a dashboard.
Try It Out
Prerequisites
- A running Kubernetes cluster (v1.21 or higher is recommended)
- Helm v3.8 or higher for OCI support (Installation instructions)
kubectlinstalled and configured
Step 1: Start Cluster
If you have a cluster to work with, skip this step. Otherwise, start a Minikube cluster. Deployment instructions
Step 2: Add Repository to your Local Client
Add the Helm chart to your local Helm client.
helm repo add kubewarden https://charts.kubewarden.io
helm repo updateStep 3: Deploy the Kubewarden CRDs and Controller
Install the Kubewarden CRDs:
helm upgrade --install kubewarden-crds kubewarden/kubewarden-crds \
-n kubewarden --create-namespace \
--waitInstall the controller, which also deploys the Audit Scanner CronJob. The chart resolves every image it deploys from one shared registry setting, so to swap in only the Minimus Audit Scanner image, the registry is cleared and the controller and pre-delete hook images are pinned back to their public location explicitly:
helm upgrade --install kubewarden-controller kubewarden/kubewarden-controller \
-n kubewarden \
\
--set global.cattle.systemDefaultRegistry="" \
--set image.repository=ghcr.io/kubewarden/adm-controller/controller \
--set preDeleteJob.image.repository=ghcr.io/rancher/kuberlr-kubectl \
\
--set auditScanner.image.repository=reg.mini.dev/kubewarden-audit-scanner \
--set auditScanner.image.tag=latest \
\
--waitWait a minute and check that the controller Pod and Audit Scanner CronJob are up:
kubectl -n kubewarden get po,cronjobConfirm that the Minimus image was set on the Audit Scanner CronJob:
kubectl -n kubewarden get cronjob audit-scanner -o jsonpath='{.spec.jobTemplate.spec.template.spec.containers[0].image}'Step 4: Deploy a Policy Server and Policies
The Audit Scanner needs at least one deployed policy to evaluate resources against. Install the default Policy Server along with Kubewarden's recommended policies:
helm upgrade --install kubewarden-defaults kubewarden/kubewarden-defaults \
-n kubewarden \
--set recommendedPolicies.enabled=true \
--waitStep 5: Trigger a Manual Scan
The Audit Scanner runs on an hourly schedule by default. Trigger an on-demand scan instead of waiting:
kubectl create job -n kubewarden --from cronjob/audit-scanner audit-scanner-manual-testWait for the Job to complete, then check the results:
kubectl -n kubewarden get jobs
kubectl get reports.openreports.io -A
kubectl get clusterreports.openreports.io -AStep 6: Clean Up
Uninstall the charts to delete the namespace and its resources, including Pods, CronJobs, Secrets, ConfigMaps, etc.:
helm uninstall kubewarden-defaults -n kubewarden
helm uninstall kubewarden-controller -n kubewarden
helm uninstall kubewarden-crds -n kubewarden
kubectl delete namespace kubewardenTechnical Considerations
The Kubewarden-Audit-Scanner image provided by Minimus is a slim, security-hardened alternative to the public image from GitHub Container Registry. The images are largely interchangeable, with a few differences as noted below.
Kubewarden-Audit-Scanner built by Minimus:
- Runs as non-root by default as user 65532 to match the public image.
- Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.
The Payoff
A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.
- See the risk reduction dashboard for a detailed CVE comparison over the past 30 days.
- Review the compliance report to see the default hardening and security configurations for the image.
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.