Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Secure Helm chart deployments by validating chart integrity, scanning templates for misconfigurations, and enforcing security contexts in Kubernetes releases.
.claude/skills/securing-helm-chart-deployments/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✗ | = Same ✗ | — | — |
| case-12 | ✗→✗ | = Same ✗ | — | — |
| case-14 | ✗→✗ | = Same ✗ | — | — |
Helm is the Kubernetes package manager. Securing Helm deployments requires validating chart provenance, scanning templates for security misconfigurations, enforcing pod security contexts, managing secrets securely, and controlling RBAC for Helm operations.
bash# Generate GPG key for signing gpg --full-generate-key # Package and sign chart helm package ./mychart --sign --key "helm-signing@example.com" --keyring ~/.gnupg/pubring.gpg # Verify chart signature helm verify mychart-0.1.0.tgz --keyring ~/.gnupg/pubring.gpg
bash# Verify chart from repository helm pull myrepo/mychart --verify --keyring /path/to/keyring.gpg # Check chart provenance file cat mychart-0.1.0.tgz.prov
bash# Render templates without deploying helm template myrelease ./mychart --values values-prod.yaml > rendered.yaml # Scan with kubesec kubesec scan rendered.yaml # Scan with checkov checkov -f rendered.yaml --framework kubernetes # Scan with trivy trivy config rendered.yaml # Scan with kube-linter kube-linter lint rendered.yaml
bash# Lint chart helm lint ./mychart --values values-prod.yaml --strict # Lint with debug output helm lint ./mychart --debug
yaml# values.yaml - Security hardened defaults securityContext: runAsNonRoot: true runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 readOnlyRootFilesystem: true allowPrivilegeEscalation: false capabilities: drop: - ALL podSecurityContext: seccompProfile: type: RuntimeDefault resources: limits: cpu: 500m memory: 512Mi requests: cpu: 100m memory: 128Mi networkPolicy: enabled: true serviceAccount: create: true automountServiceAccountToken: false image: pullPolicy: Always # Use digest instead of tag for immutability # tag: "1.0.0" # digest: "sha256:abc123..."
yaml# templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "mychart.fullname" . }} spec: template: spec: automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" resources: {{- toYaml .Values.resources | nindent 12 }}
yaml# templates/external-secret.yaml apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: {{ include "mychart.fullname" . }}-secrets spec: refreshInterval: 1h secretStoreRef: name: aws-secretsmanager kind: ClusterSecretStore target: name: {{ include "mychart.fullname" . }}-secrets data: - secretKey: db-password remoteRef: key: production/database property: password
bash# Install helm-secrets plugin helm plugin install https://github.com/jkroepke/helm-secrets # Encrypt values file helm secrets encrypt values-secrets.yaml # Deploy with encrypted secrets helm secrets install myrelease ./mychart -f values.yaml -f values-secrets.yaml # Decrypt for editing helm secrets edit values-secrets.yaml
yaml# helm-deployer-role.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: helm-deployer namespace: production rules: - apiGroups: ["", "apps", "batch", "networking.k8s.io"] resources: ["deployments", "services", "configmaps", "secrets", "ingresses", "jobs"] verbs: ["get", "list", "create", "update", "patch", "delete"] - apiGroups: [""] resources: ["pods", "pods/log"] verbs: ["get", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: helm-deployer-binding namespace: production subjects: - kind: ServiceAccount name: helm-deployer namespace: production roleRef: kind: Role name: helm-deployer apiGroup: rbac.authorization.k8s.io
yaml# .github/workflows/helm-security.yaml name: Helm Chart Security on: pull_request: paths: ['charts/**'] jobs: lint-and-scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Helm lint run: helm lint ./charts/mychart --strict - name: Render templates run: helm template test ./charts/mychart -f charts/mychart/values.yaml > rendered.yaml - name: Scan with kube-linter uses: stackrox/kube-linter-action@v1 with: directory: rendered.yaml - name: Scan with trivy uses: aquasecurity/trivy-action@master with: scan-type: config scan-ref: rendered.yaml - name: Scan with checkov uses: bridgecrewio/checkov-action@master with: file: rendered.yaml framework: kubernetes
latest--strict flag| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.