In large microservice environments, the number of Helm charts quickly grows into the hundreds or thousands. Each chart packs dozens of templates, helpers, and default values, making it easy to miss dangerous misconfigurations: a forgotten allowPrivilegeEscalation flag, a container running as root, or a mounted host Docker socket.
Established scanners like Trivy, Checkov, and Kube-linter work well as final CI/CD gates, but they are heavy and produce multi-page text reports. When a security engineer or SRE team needs to scan an entire internal chart registry and see risks in a single table, traditional scanners bog down in details. Researcher Vahid Rafiei built helmsniff, a lightweight Go CLI utility, to solve this.
Matrix-Based Manifest Auditing and Container Escape Checks
Unlike cluster-connected tools such as Headlamp KubeBuddy, helmsniff performs pure static analysis on rendered YAML files. It never connects to the Kubernetes API server and doesn't parse Go templates directly—instead, it reads the final YAML generated by helm template.
The output is a strict binary matrix in CSV or JSON format:
- Each row represents one Kubernetes object (Deployment, StatefulSet, Secret, Service, etc.);
- Each check column holds a binary flag:
1if a potential issue is found,0if the configuration is clean; - The schema contains 22 columns: 2 identifiers (
DIRandYAML_FULL_PATH), 18 security checks, and 2 parsing-status markers (K8S_STATUS,HELM_STATUS).
The tool flags the most dangerous container-escape and node-compromise vectors:
TRUE_HOST_PID,TRUE_HOST_NET,TRUE_HOST_IPC: pod sharing host namespaces;DOCKERSOCK_PATH: mounting/var/run/docker.sockviahostPath;CAP_SYS_ADMIN,CAP_SYS_MODULE: granting Linux kernel capabilities to a container;ALLOW_PRIVI:allowPrivilegeEscalation: trueenabled;SECCOMP_UNCONFINED: seccomp syscall filtering disabled;WITHIN_MANIFEST_SECRET: hardcoded secrets in plaintext inside the manifest;INSECURE_HTTP: unencrypted network URLs;NO_RESO: missing CPU and memory requests or limits;NO_NETWORK_POLICY: a two-pass chart-level flag indicating zero NetworkPolicies for traffic isolation.
Practical Example: Manifest Inspection and Batch Auditing
Here is a sample Deployment manifest containing several critical security misconfigurations that helmsniff catches:
apiVersion: apps/v1
kind: Deployment
metadata:
name: billing-service
labels:
app.kubernetes.io/managed-by: Helm
spec:
template:
spec:
hostPID: true # Triggers TRUE_HOST_PID = 1
hostNetwork: true # Triggers TRUE_HOST_NET = 1
containers:
- name: billing
image: internal-registry.local/billing:2.4.0
env:
- name: NOTIFY_URL
value: "http://events.internal/hook" # Triggers INSECURE_HTTP = 1
securityContext:
allowPrivilegeEscalation: true # Triggers ALLOW_PRIVI = 1
capabilities:
add: ["SYS_ADMIN"] # Triggers CAP_SYS_ADMIN = 1
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock # Triggers DOCKERSOCK_PATH = 1
The next snippet shows how to build helmsniff, pipe a chart straight from helm template, and batch-scan thousands of rendered charts:
# 1. Build the helmsniff binary from source
git clone https://github.com/VahidR/helmsniff.git
cd helmsniff && make build
# 2. Stream-audit a chart in a build pipeline
helm template my-app ./charts/billing-service \
| ./bin/helmsniff --root - --out - --format json
# 3. Batch-audit rendered manifests with GNU parallel
parallel ./bin/helmsniff --root {} --out reports/{/}.csv ::: rendered-charts/*/
Analytics Potential and Tool Limitations
Because the report is a flat matrix of zeros and ones, it plugs straight into data analysis workflows. Engineers can load the CSV into pandas (df = pd.read_csv('report.csv')), sum risks across teams in seconds, and compute a security score for every service.
Keep three implementation caveats in mind before adopting it:
INSECURE_HTTPuses a simple substring match forhttp://, which can trigger false positives on harmless URLs inside comments or annotations;SEC_CONT_OVER_PRIVILandVALID_TAINT_SECRETare reserved placeholders in the current release and always return0;- The scanner does not validate Go Template syntax—if a chart fails to render with
helm template, helmsniff won't process it.
For routine audits across hundreds of repositories, helmsniff is hard to beat. Millisecond execution per chart and zero runtime overhead make continuous Kubernetes manifest hygiene practical.


