Output Schema
{
"example": {
"counts": {
"critical": 2,
"high": 1,
"info": 1,
"low": 8,
"medium": 4
},
"findings": [
{
"fix": "Never mount the runtime socket into workloads",
"message": "Mounts the container runtime socket (/var/run/docker.sock): full control of the node",
"object": "Deployment/web",
"rule": "container-socket",
"severity": "critical"
},
{
"container": "app",
"fix": "Remove privileged; add only the specific capability needed",
"message": "privileged: true gives the container root on the node",
"object": "Deployment/web",
"rule": "privileged",
"severity": "critical"
},
{
"container": "app",
"fix": "Use valueFrom.secretKeyRef",
"message": "env DB_PASSWORD has a literal secret-like value",
"object": "Deployment/web",
"rule": "secret-in-env",
"severity": "high"
},
{
"container": "app",
"fix": "Set allowPrivilegeEscalation: false",
"message": "allowPrivilegeEscalation is not false",
"object": "Deployment/web",
"rule": "privilege-escalation",
"severity": "medium"
},
{
"container": "app",
"fix": "Set runAsNonRoot: true and runAsUser: 10001",
"message": "runAsNonRoot is not set: the container may run as root",
"object": "Deployment/web",
"rule": "maybe-root",
"severity": "medium"
},
{
"container": "app",
"fix": "Pin a version tag or digest",
"message": "Image 'nginx' uses no tag (= latest)",
"object": "Deployment/web",
"rule": "image-latest",
"severity": "medium"
},
{
"container": "app",
"fix": "Set resources.limits.memory",
"message": "No memory limit: one leak can starve the node",
"object": "Deployment/web",
"rule": "no-memory-limit",
"severity": "medium"
},
{
"fix": "Set automountServiceAccountToken: false unless the app calls the Kubernetes API",
"message": "Service account token is auto-mounted",
"object": "Deployment/web",
"rule": "sa-token-automount",
"severity": "low"
},
{
"fix": "Set securityContext.seccompProfile.type: RuntimeDefault",
"message": "No seccompProfile set",
"object": "Deployment/web",
"rule": "no-seccomp",
"severity": "low"
},
{
"container": "app",
"fix": "Set readOnlyRootFilesystem: true (mount emptyDir for temp dirs)",
"message": "Root filesystem is writable",
"object": "Deployment/web",
"rule": "writable-rootfs",
"severity": "low"
},
{
"container": "app",
"fix": "Set capabilities.drop: [ALL]",
"message": "Capabilities are not dropped",
"object": "Deployment/web",
"rule": "caps-not-dropped",
"severity": "low"
},
{
"container": "app",
"fix": "Set resources.limits.cpu (or rely on a LimitRange)",
"message": "No CPU limit",
"object": "Deployment/web",
"rule": "no-cpu-limit",
"severity": "low"
},
{
"container": "app",
"fix": "Set resources.requests.cpu and .memory",
"message": "Missing CPU/memory requests (scheduler cannot place it well)",
"object": "Deployment/web",
"rule": "no-requests",
"severity": "low"
},
{
"container": "app",
"fix": "Add a livenessProbe so hung containers restart",
"message": "No livenessProbe",
"object": "Deployment/web",
"rule": "no-liveness",
"severity": "low"
},
{
"container": "app",
"fix": "Add a readinessProbe so traffic waits until ready",
"message": "No readinessProbe",
"object": "Deployment/web",
"rule": "no-readiness",
"severity": "low"
},
{
"fix": "Make sure this is intended; prefer ClusterIP + Ingress with TLS",
"message": "Service type LoadBalancer exposes it outside the cluster",
"object": "Service/web",
"rule": "service-exposed",
"severity": "info"
}
],
"note": "Static audit of the YAML (Pod Security 'restricted' rules, RBAC, secrets, resources, probes). It does not query a cluster.",
"objects": [
{
"findings": 15,
"kind": "Deployment",
"name": "web",
"namespace": null
},
{
"findings": 1,
"kind": "Service",
"name": "web",
"namespace": null
}
],
"score": 0,
"summary": "15 issue(s); worst: Deployment/web: Mounts the container runtime socket (/var/run/docker.sock): full control of the node",
"verdict": "fix_now"
},
"type": "json"
}