Skip to content

Commit

Permalink
Fix: rolebindingClusterAdminRole check
Browse files Browse the repository at this point in the history
Fix additionalSchemaStrings templating
  • Loading branch information
greg5813 authored Oct 7, 2024
1 parent 9b5438d commit 39f0bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/checks/rolebindingClusterAdminRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ schemaString: |
minLength: 1
additionalSchemaStrings:
rbac.authorization.k8s.io/Role: |
type: object
# This schema is validated for all roleBindings, regardless of their roleRef.
{{ if eq .roleRef.kind "Role" }}
{{ if and (not (hasPrefix .metadata.name "system:")) (ne .metadata.name "gce:podsecuritypolicy:calico-sa") }}
# This schema is validated for all roleBindings, regardless of their roleRef.
type: object
required: ["metadata", "rules"]
allOf:
- properties:
Expand Down

0 comments on commit 39f0bf2

Please sign in to comment.