Case 664625 · Cloud · L2 Practitioner

Securing Infrastructure as Code

Practise as: Deep diveLevel: L2 Practitioner
  1. 01 Context
  2. 02 Mechanism
  3. 03 Lessons
What a strong answer covers

Try it out loud first. Then check yourself:

  1. Terraform, CloudFormation and Bicep make cloud config reviewable code, so misconfigs can be caught before deploy
  2. Scan plans in CI (Checkov, Trivy) and enforce policy as code (OPA, Sentinel) for public storage, open ports, no encryption
  3. Terraform state holds resource attributes, secrets included, in plaintext: use an encrypted, locked-down remote backend
  4. The deploy identity is near-admin: use OIDC not static keys, require approval on apply, protect pipeline files
  5. Drift: console changes bypass review, so detect drift and back scanners with runtime guardrails like SCPs or Azure Policy

If the interviewer pushes back

  • A developer can edit the pipeline file in a PR. What can they do with the apply role, and how do you stop it?

More Cloud cards

All Cloud cards →

cardosec draws a security topic and gives you a clock: explain it out loud with no notes, then see what you covered and what you missed. Free during early access.

Reviewed 2026-10-09