Module 07 of 10

Infrastructure as Code Security

Lessons

About This Module

Posture management finds misconfigurations after they are live. A better place to catch them is before they ever exist. Modern teams define their cloud with code, so a single mistake in a template, such as a public bucket or an open firewall rule, can be copied into every environment the next time it is deployed.

Infrastructure as Code (IaC) tools like Terraform describe infrastructure in files that can be reviewed, tested, and scanned like any other software. Static scanners such as Checkov, tfsec, and Terrascan read those files and flag insecure settings before anything is deployed. This is the shift left idea: the earlier a problem is caught, the cheaper it is to fix.

Policy as code goes one step further by writing your rules as code, for example with Open Policy Agent (OPA), and enforcing them automatically in the CI/CD pipeline so a non-compliant change simply cannot be merged or applied. Watch the lessons in order, then continue on to Container & Kubernetes Security.

Lessons

4 videos
01

Terraform Security Scanning with Checkov: Code & Planfile Analysis

Why Terraform needs security scanning, and how Checkov analyses both source code and plan files for misconfigurations.

02

Compliance as Code in Terraform with Checkov, tfsec & Terrascan

Using three popular scanners to check Terraform against security and compliance rules automatically.

03

How to use Open Policy Agent (OPA) to secure your Infrastructure using Terraform

Implementing policy as code with OPA to enforce security rules on Terraform deployments.

04

Policy as Code with Open Policy Agent (OPA): Enforce Security at Scale

A hands-on lesson on writing and enforcing policies as code with OPA.