Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2ffab6f
feat(ci): add Checkov security scanning workflow
Aug 28, 2025
780ab52
fix(ci) checkov only in chart dir
Aug 28, 2025
7e0c7b3
fix(chart): add skyhook namespace for CKV_K8S_21
Aug 27, 2025
423c8c7
fix(chart) cpu/memory limits for BC_K8S_[9-12]
Aug 27, 2025
1eb42ec
fix(chart): update security context for admission BC_K8S_[22,27,34]
Aug 27, 2025
65f354b
fix(chart): update security context for CKV_K8S_[19,37]
Aug 27, 2025
874b0fe
fix(chart): image issues for BC_K8S_[13,14,39]
Aug 27, 2025
8a7a1a0
fix(chart): add livenessProbe for BC_K8S_7
Aug 27, 2025
861e54f
fix(chart): updates for BC_K8S_[7,8,29,35]
Aug 27, 2025
2c3c9d2
fix(chart): update security context for BC_K8S_[28,43]
Aug 27, 2025
b1b21e3
fix(chart): fixes for ci tests
Aug 28, 2025
c79e21e
chore(chart): update digest
Aug 29, 2025
5c48e70
fix(chart): using multi-arch digests
Aug 29, 2025
c56f292
fix(chart): update tests
Aug 29, 2025
602464b
fix(chart): probes
Aug 29, 2025
6054382
test
Sep 1, 2025
1594b8c
add manifest list digest for cleanup
Sep 2, 2025
3aee5a0
fix web secret checkov issue
t0mmylam Sep 4, 2025
974a2ce
use tag and digest
t0mmylam Sep 4, 2025
8599364
template caBundle and update field for webhooks to minimize rbac
t0mmylam Sep 4, 2025
2042d83
Merge branch 'checkov' into helm-chart-security-scan-checks
t0mmylam Sep 4, 2025
d315477
test
t0mmylam Sep 4, 2025
c41cedc
fix checkov
t0mmylam Sep 4, 2025
2790927
cli output
t0mmylam Sep 4, 2025
c372cfa
fix license symlink
t0mmylam Sep 4, 2025
7fb1180
address comments
t0mmylam Sep 8, 2025
5a50017
move all validations in deployment to specific file
t0mmylam Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/security-checkov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ jobs:
directory: chart
framework: helm
output_format: cli
skip_check: CKV2_K8S_6 # not in nspect or local checkov
4 changes: 0 additions & 4 deletions chart/templates/cleanup-webhook-job.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{{- if .Values.webhook.enable }}
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -49,7 +46,6 @@ spec:
readOnlyRootFilesystem: true
capabilities:
drop:
- NET_RAW
- ALL
seccompProfile:
type: RuntimeDefault
Expand Down
3 changes: 0 additions & 3 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
3 changes: 0 additions & 3 deletions chart/templates/leader-election-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand Down
3 changes: 0 additions & 3 deletions chart/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
Expand Down
3 changes: 0 additions & 3 deletions chart/templates/mutating-webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{{- if .Values.webhook.enable }}
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
Expand Down
20 changes: 20 additions & 0 deletions chart/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "chart.fullname" . }}-controller-manager-allow-all
namespace: "{{ .Release.Namespace }}"
labels:
{{- include "chart.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
control-plane: controller-manager
{{- include "chart.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
- {}
egress:
- {}

3 changes: 0 additions & 3 deletions chart/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
3 changes: 0 additions & 3 deletions chart/templates/validating-webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{{- if .Values.webhook.enable }}
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
Expand Down
5 changes: 5 additions & 0 deletions chart/templates/validations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}


3 changes: 0 additions & 3 deletions chart/templates/webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- if eq .Release.Namespace "default" }}
{{- fail "Deployment to 'default' namespace is not allowed for security reasons. Please specify a different namespace." }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
Expand Down
17 changes: 17 additions & 0 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,23 @@ Fetch a multi-arch digest (example for bitnami/kubectl used by the webhook clean
docker-buildx imagetools inspect bitnami/kubectl:1.33.1
```

Example output (look for the top-level Digest):

```
Name: docker.io/bitnami/kubectl:1.33.1
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest: sha256:9081a6f83f4febf47369fc46b6f0f7683c7db243df5b43fc9defe51b0471a950

Manifests:
Name: docker.io/bitnami/kubectl:1.33.1@sha256:c8efec87588c7a2d84c760d54446b2e081e607a709f16f19283774d5612191b7
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/amd64

Name: docker.io/bitnami/kubectl:1.33.1@sha256:2af8ed9feaeada845f4d60f1fe4db951df2e5334ea01bec4b5ef4f191ad20d65
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm64
```

Update the digest in `chart/values.yaml` for kube-rbac-proxy, operator, and agent images:

Note:
Expand Down
8 changes: 4 additions & 4 deletions operator/internal/controller/webhook_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ func (r *WebhookController) CheckOrUpdateWebhookConfigurations(ctx context.Conte
existingValidating := &admissionregistrationv1.ValidatingWebhookConfiguration{}
if err := r.Get(ctx, types.NamespacedName{Name: validatingName}, existingValidating); err != nil {
if errors.IsNotFound(err) {
return false, nil
return false, fmt.Errorf("ValidatingWebhookConfiguration %q not found; creation is handled by the Helm chart. Ensure the chart is installed and webhooks are enabled: %w", validatingName, err)
}
return false, err
return false, fmt.Errorf("failed to get ValidatingWebhookConfiguration %q: %w", validatingName, err)
}

needUpdate := false
Expand All @@ -250,9 +250,9 @@ func (r *WebhookController) CheckOrUpdateWebhookConfigurations(ctx context.Conte
existingMutating := &admissionregistrationv1.MutatingWebhookConfiguration{}
if err := r.Get(ctx, types.NamespacedName{Name: mutatingName}, existingMutating); err != nil {
if errors.IsNotFound(err) {
return changed, nil
return changed, fmt.Errorf("MutatingWebhookConfiguration %q not found; creation is handled by the Helm chart. Ensure the chart is installed and webhooks are enabled: %w", mutatingName, err)
}
return false, err
return false, fmt.Errorf("failed to get MutatingWebhookConfiguration %q: %w", mutatingName, err)
}

needUpdate = false
Expand Down