iac.htora.dev · security templates

Home/Refreshers/Reviewing infrastructure as a defender: refresher

Reviewing infrastructure as a defender

What to look for in a pull request or a plan, so the next incident is caught in review.

Remember

  1. Who can become this role? Keep that list short.
  2. Does anything grant a permission that grants other permissions?
  3. What records misuse, and could the person misusing it switch that off?
  4. If this is deleted, what is lost, and can anyone restore it?
  5. Does the plan destroy or replace anything that contains data?
Watch forWhy it matters
GitHub OIDC trust with no sub conditionEvery repository on GitHub can assume the role
iam:PassRole on *Any role can be handed to a service the grantee controls
roles/iam.serviceAccountTokenCreatorThe grantee can mint tokens as that service account
Actions pinned by tagA tag can be moved to other code. Pin by commit SHA
pull_request_target that checks out the pull requestA stranger's code runs with your secrets
Logging off, or retention shortenedThe evidence is gone before anyone needs it

Watch out

  • Read the plan as well as the code. The code says what someone meant. The plan says what will happen.
Check it worked

Every finding in the review names the change needed and the team that owns it.

Read the full pageDownload PDF

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.