NEW350+ rooms now have a live terminal, so you can learn by typing the commands, right in your browser.Learn in a live terminal. 350+ rooms.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
[>_] ROOM · Cybersecurity
Compliance as Code
Master compliance as code using Open Policy Agent (OPA) and Rego. Learn to automate policy enforcement, test infrastructure configurations, and integrate compliance into CI/CD.
Room tasks
1What Is Compliance as Code and Why Does It Matter
2CIS Benchmarks and Control Frameworks (SOC 2, PCI DSS)
3Automated Audits with Chef InSpec
4Continuous Compliance Evidence Collection
5Guided Lab: Automating a CIS Benchmark Audit
Frequently Asked Questions
What is compliance as code?
Compliance as code expresses regulatory and security requirements as machine-readable policies that run automatically against infrastructure and pipelines. It replaces manual audits with repeatable checks that produce consistent, auditable results.
What is Rego used for?
Rego is the policy language of Open Policy Agent. You write rules that evaluate structured data, such as Terraform plans or Kubernetes manifests, and return allow or deny decisions that can block non-compliant changes in a pipeline.
Can I practice compliance as code for free?
Yes. The Compliance as Code room on Codelivly is free and hands-on, guiding you through writing OPA policies, testing configurations with Conftest and enforcing checks in CI/CD pipelines.