Control: 2 S3 buckets should prohibit public read access
Description
This control checks whether your S3 buckets allow public read access by evaluating the Block Public Access settings, the bucket policy, and the bucket access control list (ACL).
Unless you explicitly require everyone on the internet to be able to write to your S3 bucket, you should ensure that your S3 bucket is not publicly writable.
It does not check for read access to the bucket by internal principals, such as IAM roles. You should ensure that access to the bucket is restricted to authorized principals only.
Remediation
- Open the Amazon S3 console.
- Choose the name of the bucket identified in the finding.
- Choose Permissions and then choose Public access settings.
- Choose Edit, select all four options, and then choose Save.
- If prompted, enter
confirm
and then choose Confirm.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_s3_2
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_s3_2 --share
SQL
This control uses a named query:
s3_bucket_restrict_public_read_access