plugins/enforce/skills/policy-as-code-template-library/SKILL.md
Production-ready policy template library: 48 battle-tested policies (28 Kyverno + 20 OPA). Pod security, image validation, RBAC, resource governance, network security, and CI/CD integration.
npx skillsauth add adaptive-enforcement-lab/claude-skills policy-as-code-template-libraryInstall 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.
48 production-ready policies for Kubernetes security and governance. Reduce the Rego learning curve. Copy, customize, deploy.
<!-- more -->Template Library Overview
This library contains 28 Kyverno policies and 20 OPA/Gatekeeper constraint templates covering pod security, image validation, RBAC, resource governance, network security, mutation, and generation. Each template includes complete YAML/Rego, customization variables, validation commands, and real-world use cases.
Deploy in Audit Mode First
Always start with
audit(Kyverno) ordryrun(OPA) mode. Monitor violations for 48 hours before switching to enforcement. Existing workloads may violate policies.
See examples.md for detailed code examples.
See examples.md for detailed code examples.
Choose the right policy engine for your team:
| Feature | Kyverno | OPA/Gatekeeper | |---------|---------|----------------| | Policies | 28 (validation, mutation, generation) | 20 (validation only) | | Language | YAML + JMESPath | Rego (Go-like DSL) | | Learning Curve | < 1 hour | 4-8 hours | | Best For | Kubernetes-native teams, fast adoption | Multi-platform policies, complex logic | | Mutation | ✅ Native support | ❌ Validation only | | Generation | ✅ Auto-create resources | ❌ Validation only |
See Decision Guide → for detailed comparison and recommended starter paths.
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.