Skip to content

fix: default accessGlobalSecretsAndServiceAccount to false#2942

Open
rzala wants to merge 1 commit intoaquasecurity:mainfrom
rzala:fix/disable-global-secrets-default-upstream
Open

fix: default accessGlobalSecretsAndServiceAccount to false#2942
rzala wants to merge 1 commit intoaquasecurity:mainfrom
rzala:fix/disable-global-secrets-default-upstream

Conversation

@rzala
Copy link
Copy Markdown

@rzala rzala commented Mar 31, 2026

Summary

  • Default operator.accessGlobalSecretsAndServiceAccount to false (was true)
  • Applies the principle of least privilege: the operator no longer gets cluster-wide RBAC permissions to create/get/update secrets, get serviceaccounts, and get nodes/proxy by default
  • Users who need private registry image pulling can explicitly enable it with operator.accessGlobalSecretsAndServiceAccount=true

Changes

  • deploy/helm/values.yaml — default changed to false
  • deploy/helm/README.md — updated default value in docs table
  • pkg/operator/etc/config.goenvDefault changed to "false"
  • deploy/static/trivy-operator.yaml — static manifest default changed
  • docs/getting-started/installation/configuration.md — docs table updated

Motivation

When accessGlobalSecretsAndServiceAccount is true, the operator's ClusterRole includes permissions to create/get/update secrets and get serviceaccounts across all namespaces. This is only needed when vulnerability scan jobs need to pull images from private registries. Defaulting to false reduces the attack surface for the majority of deployments that don't require this.

Apply the principle of least privilege by disabling global secrets and
service account access by default. When enabled, the operator gets
cluster-wide RBAC permissions to create/get/update secrets, get
serviceaccounts, and get nodes/proxy. Most deployments do not need
these permissions unless pulling images from private registries.

Users who need this for private registry access can explicitly set
operator.accessGlobalSecretsAndServiceAccount=true.

Updated across all locations:
- Helm chart values.yaml and README.md
- Go config default (envDefault)
- Static deployment manifest
- Configuration documentation
@rzala rzala requested a review from simar7 as a code owner March 31, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant