doors/no-public-buckets-in-terraform
No S3 bucket defined in Terraform is public.
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
| Case | Expected |
|---|---|
| private | PASS |
| public | FAIL |
| no terraform | N/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."