Helm Chart values.yaml Privilege Auditing & Kubernetes Pod Security Standards Without Cloud Uploads A developer published a zero-dependency Python auditor that scans Helm values.yaml files for privilege-escalation and Pod Security Standards violations before cluster admission, without uploading manifests to external scanners. The script uses standard-library regex checks to flag privileged containers, host namespaces, privilege escalation, hostPath mounts, root users, and mutable latest tags, scoring posture from 0 to 100. Tested against an insecure values file it returned a score of 0 and grade F with 8 findings, while a hardened snippet scored 100 and grade A+ with zero bytes uploaded. Kubernetes workloads routinely reach production through Helm charts whose defaults look harmless until helm template renders privileged: true , host namespaces, or :latest image tags across dozens of templates. Checking security posture before cluster admission catches privilege escalation in local CI without uploading proprietary manifests to external SaaS scanners. In this guide, we implement a zero-dependency Python Helm values.yaml auditor audit helm chart values security and pair it with the live audit kubernetes pod security baseline https://nandai.org/api/mcp tool 107 in the 108 -tool stateless MCP registry documented at https://nandai.org/stacks/appsec-devsecops-eu-cra-release-stack https://nandai.org/stacks/appsec-devsecops-eu-cra-release-stack . audit helm chart values security Auditor Helm values.yaml files encode security defaults that downstream templates inherit securityContext , podSecurityContext , hostNetwork , resources.limits , and image tags . Running deterministic regex and structural checks in Python standard library flags high-risk overrides in milliseconds with zero PyPI packages: bash /usr/bin/env python3 """Zero-dependency Helm values.yaml privilege & PSS Restricted auditor.""" import json import re def audit helm chart values security values yaml: str - dict: if not values yaml or not values yaml.strip : return {"valid": False, "score": 0, "grade": "F", "findings": "EMPTY VALUES" } findings = score = 100 checks = "HELM PRIVILEGED CONTAINER", "CRITICAL", 30, r" ?im ^\s privileged\s :\s true\b" , "HELM HOST NAMESPACE", "CRITICAL", 25, r" ?im ^\s hostNetwork|hostPID|hostIPC \s :\s true\b" , "HELM PRIVILEGE ESCALATION", "HIGH", 20, r" ?im ^\s allowPrivilegeEscalation\s :\s true\b" , "HELM HOST PATH MOUNT", "HIGH", 15, r" ?im ^\s hostPath\s :" , "HELM ROOT USER", "HIGH", 15, r" ?im ^\s runAsNonRoot\s :\s false|runAsUser\s :\s 0 \b" , "HELM MUTABLE LATEST TAG", "MEDIUM", 10, r" ?im ^\s tag\s :\s \"' ?latest \"' ?\s $" , for fid, sev, pen, pat in checks: if re.search pat, values yaml : score -= pen findings.append {"id": fid, "severity": sev, "penalty": pen} if not re.search r" ?im readOnlyRootFilesystem\s :\s true\b", values yaml : score -= 10 findings.append {"id": "HELM WRITABLE ROOTFS", "severity": "MEDIUM", "penalty": 10} if not re.search r" ?im type\s :\s RuntimeDefault\b", values yaml : score -= 10 findings.append {"id": "HELM MISSING SECCOMP", "severity": "MEDIUM", "penalty": 10} if not re.search r" ?im ^\s limits\s :", values yaml : score -= 10 findings.append {"id": "HELM MISSING RESOURCE LIMITS", "severity": "LOW", "penalty": 10} score = max 0, score grade = "A+" if score = 95 else "A" if score = 85 else "C" if score = 60 else "F" return {"valid": score = 80, "score": score, "grade": grade, "findings": findings, "bytes uploaded": 0} if name == " main ": hardened = """image: tag: "2.0.0@sha256:05f9b8a6" podSecurityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true resources: limits: cpu: 500m memory: 512Mi """ print json.dumps audit helm chart values security hardened , indent=2 Tested locally against an insecure values.yaml privileged: true , hostNetwork: true , allowPrivilegeEscalation: true , runAsNonRoot: false , tag: latest , the auditor drops the posture to score: 0 , grade: "F" , valid: false across 8 concrete findings. Against the hardened snippet above, it returns score: 100 , grade: "A+" , valid: true , bytes uploaded: 0 . 107 Because Helm values.yaml directives transform through Go templates into Deployment , StatefulSet , DaemonSet , Job , and CronJob objects, pipe helm template output into a rendered Kubernetes PSS Restricted auditor. The live stateless JSON-RPC 2.0 endpoint at https://nandai.org/api/mcp https://nandai.org/api/mcp exposes 108 read-only MIT tools OpenAPI 3.1.0 descriptor at https://nandai.org/api/mcp?format=openapi https://nandai.org/api/mcp?format=openapi , including Tool 107 audit kubernetes pod security baseline : curl -sS -X POST https://nandai.org/api/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "audit kubernetes pod security baseline", "arguments": {"sample": true, "profile": "restricted"} } }' Live execution returns ok: true , profile: "restricted" , workloads count: 1 , privileged containers count: 0 , host namespaces count: 0 , host path mounts count: 0 , mutable images count: 0 , score: 100 , grade: "A+" , and bytes uploaded: 0 . To audit proprietary rendered charts strictly offline with zero network egress, clone the MIT repository from https://nandai.org/git/destiny.git/ https://nandai.org/git/destiny.git/ or download the pinned tarball https://nandai.org/releases/destiny-verify-2.0.0.tar.gz https://nandai.org/releases/destiny-verify-2.0.0.tar.gz 6,511,290 B, SHA-256 05f9b8a62d2e2d7bd554c609fc4f18e59f171408aa0c6d75a17743b9c4a09763 and run cli/destiny-verify.sh k8s-pss or python3 mcp/destiny mcp server.py over local stdio . | Control | Vulnerable Default | Hardened Restricted Target | |---|---|---| | Container Escalation | allowPrivilegeEscalation: true or omitted | allowPrivilegeEscalation: false + capabilities.drop: "ALL" | | Pod Identity & Sandbox | runAsUser: 0 / missing seccompProfile | runAsNonRoot: true + seccompProfile.type: RuntimeDefault | | Host Isolation | hostNetwork: true / hostPath: volumes | hostNetwork/hostPID/hostIPC: false + emptyDir / CSI volumes | | Filesystem & Quotas | Writable / + unbounded CPU/RAM | readOnlyRootFilesystem: true + explicit resources.limits | | Image Provenance | tag: latest | Semantic tag pinned with immutable @sha256: digest | 108 -Tool Streamable HTTP MCP https://nandai.org/api/mcp 3.1.0 Schema Descriptor 111 Schemas https://nandai.org/api/mcp?format=openapi https://nandai.org/.well-known/openapi-rest-mcp-bridge-spec.json https://nandai.org/security https://nandai.org/git/destiny.git/ https://doi.org/10.5281/zenodo.24642737