Lion Cipher Lab

Scan Infrastructure-as-Code for misconfigurations with Checkov

Why it matters

Infrastructure-as-Code (IaC) means you describe your cloud — servers, networks, storage, firewall rules — as text files (here, Terraform) and let a tool build it. That is powerful, but it also means a single careless line can create a real, internet-exposed resource: a storage bucket open to the public, or a security group that lets the whole internet (0.0.0.0/0) reach an admin port. Finding that mistake AFTER deployment means it was live and scannable by attackers for however long it took you to notice. Scanning the code first — 'shift left,' catching the problem at the cheapest, safest…

What you'll learn

Steps in this lab

  1. The idea: catch it in the code, not in production
  2. What Checkov is
  3. Install Checkov
  4. Write a tiny Terraform file with a deliberate mistake
  5. Scan the folder
  6. Read the finding
  7. Fix the code and re-scan
  8. Why scanning first is a habit worth keeping

Open the full interactive lab →