Policy as Code is the practice of defining decision logic programmatically. With this approach, policies for security, compliance, audits and monitoring are defined using a general purpose, domain-specific or markup programming language. These policies are applied as a function of a CI/CD and continuous testing pipeline. Ultimately, policy as code allows DevOps teams to automate workflows while managing security, risk and compliance. Let’s look at how policy as code works.