Address 6 critical Prowler IaC findings (mute + grafana RBAC tighten) #340
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "prowler-iac-mutelist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The weekly Prowler IaC scan reported 6 critical findings against
argocd/manifests/. They split cleanly into two patterns:Legitimate-by-design RBAC → mute with new compensating controls
external-secrets-controller,external-secrets-cert-controllermanagesecrets(KSV-0041) and the cert-controller mutates its own webhook configurations (KSV-0114). This is what the operator is for. New CC:operator-purpose-bound-rbac.kube-state-metrics(bothminikube-indriandk3s-ringtail) holdslist/watchon secrets to exposekube_secret_infoandkube_secret_labelsmetrics. KSM's metric schema only reads metadata, never thedata:field. New CC:kube-state-metrics-metadata-only.Over-broad RBAC → fix
grafana-clusterrolehadget/watch/listonsecretsbecause the dashboard-sidecar config usedRESOURCE=both(ConfigMaps + Secrets). Nothing in the cluster labels Secrets withgrafana_dashboard=1, so this was unused power. Switched both sidecar instances toRESOURCE=configmapand removedsecretsfrom the ClusterRole.The IaC cronjob also did not previously pass
--mutelist-file, which is why every IaC finding reported as unmuted regardless of mutelist configuration. The newmutelist/iac.yamlis bundled into the existingprowler-mutelistConfigMap and mounted viaitems:selector.Test plan
kubectl --context=minikube-indri kustomize argocd/manifests/prowler/— already passes locallykubectl --context=minikube-indri kustomize argocd/manifests/grafana/— already passes locallyargocd app set prowler --revision prowler-iac-mutelist && argocd app sync prowlerand same forgrafanaMUTED=Trueon the 6 critical findings (kubectl --context=minikube-indri -n prowler create job --from=cronjob/prowler-iac-scan prowler-iac-test)argocd app set <app> --revision main && argocd app sync <app>post-merge🤖 Generated with Claude Code
Six critical IaC findings against argocd/manifests/ broke into two patterns: legitimate-by-design RBAC (mute) and over-broad RBAC (fix). Plumbing: - cronjob-iac-scan.yaml now passes --mutelist-file (previously unused, which is why all IaC findings reported as unmuted) - new mutelist/iac.yaml is bundled into the prowler-mutelist ConfigMap and mounted into the IaC cronjob via items: selector Compensating controls (in compensating-controls.yaml): - operator-purpose-bound-rbac — external-secrets-operator's whole function is to manage Secret objects; ClusterRole over secrets matches its purpose. cert-controller mutates its own validating webhooks to inject a rotating CA bundle. - kube-state-metrics-metadata-only — KSM exposes only Secret metadata via kube_secret_info / kube_secret_labels; the data field is never read into exposed metrics. Mutes (mutelist/iac.yaml): - KSV-0041 for external-secrets/rbac.yaml, kube-state-metrics/rbac.yaml, kube-state-metrics-ringtail/rbac.yaml - KSV-0114 for external-secrets/rbac.yaml Real fix: - grafana-clusterrole no longer reads secrets. The dashboard sidecar (RESOURCE=both → configmap, both init and watch instances) only needs ConfigMap-labeled dashboards; no Secrets are labeled grafana_dashboard. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>