All drills

doors/no-public-buckets-in-terraform

No S3 bucket defined in Terraform is public.

highofficial

Install

firedrill hub add doors/no-public-buckets-in-terraform

Reads

repos, files.terraform

Fix when it fails

Remove the public ACL or policy, and add a public access block.

Test cases

CaseExpected
privatePASS
publicFAIL
no terraformN/A

Drill file

firedrill: v0
id: doors/no-public-buckets-in-terraform
safeguard: "No S3 bucket defined in Terraform is public."
severity: high
for_each: repos
fetch:
  terraform: { fact: files.terraform }
pass_when:
  - terraform.found.all(b, !b.public_acl && !b.public_policy)
fix: "Remove the public ACL or policy, and add a public access block."