plugins/enforce/skills/opa-rbac-templates/SKILL.md
OPA RBAC policies preventing cluster-admin privilege escalation, restricting privileged verbs, and blocking wildcard permissions.
npx skillsauth add adaptive-enforcement-lab/claude-skills opa-rbac-templatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
RBAC policies control who can perform which actions on which resources. These templates prevent privilege escalation through overly permissive roles.
Wildcards Grant Unrestricted Access
RBAC rules with
resources: ["*"]orverbs: ["*"]grant access to all current and future resources or actions. Avoid wildcards except for break-glass admin roles.
Block cluster-admin except for approved break-glass accounts:
# Enforced by: cluster-admin.yaml
# Result: Only subjects in approved list can receive cluster-admin binding
# Impact: Prevents privilege escalation to cluster-admin
Prevent use of escalate, bind, impersonate:
# Enforced by: privileged-verbs.yaml
# Result: Roles cannot include escalate/bind/impersonate verbs
# Impact: Prevents users from granting themselves additional permissions
Require explicit resource and verb lists:
# Enforced by: wildcards.yaml
# Result: Roles must specify resources: ["pods"], not resources: ["*"]
# Impact: Reduces blast radius of compromised service accounts
See the full implementation guide in the source documentation.
Grant minimum permissions required for each workload:
pods, configmaps, not *get, list, not *Block RBAC manipulation verbs:
escalate - Allows creating roles with more permissions than creator hasbind - Allows granting roles to arbitrary subjectsimpersonate - Allows acting as other users without authenticationOnly cluster admins should have these verbs.
Use annotations to enforce temporary access:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: temporary-debug-access
annotations:
rbac.expires: "2025-01-05T00:00:00Z"
subjects:
- kind: User
name: [email protected]
roleRef:
kind: ClusterRole
name: debug-read-only
OPA policies can validate expiration and block expired bindings.
See reference.md for additional techniques and detailed examples.
See examples.md for code examples.
See reference.md for complete documentation.
documentation
Workload Identity Federation implementation guide. GKE setup, IAM bindings, ServiceAccount configuration, migration from service account keys, and troubleshooting patterns.
development
Secure GitHub Actions trigger patterns for pull requests, forks, and reusable workflows. Preventing privilege escalation and code injection through trigger misconfiguration.
development
Structured framework for evaluating GitHub Actions security before adoption. Trust tiers, risk assessment checklist, and decision tree for action evaluation.
testing
Securely store GitHub App credentials across different environments. GitHub Actions secrets, external CI, Kubernetes, and automated rotation patterns.