aws.s3.account-public-access-block
S3 public access is blocked at the account level
Every AWS account has all four S3 Block Public Access settings enabled, so no bucket can be made public by policy or ACL.
Assertion
BlockPublicAcls and IgnorePublicAcls and BlockPublicPolicy and RestrictPublicBuckets are all trueRationale
Bucket-level public access settings drift. A bucket created by a tool, a policy pasted from a tutorial, or an ACL set by an upload client can each expose data, and each has to be found individually. The account-level setting is one switch that makes public exposure impossible regardless of what any bucket policy or ACL says, which is why it is the thing the collector reads.
Observation
The collector calls GetPublicAccessBlock on the S3 Control API for each
account and reads the four flags. All four must be true. An account with no
configuration at all returns NoSuchPublicAccessBlockConfiguration, which
the collector treats as all four being false, because that is what it means.
Remediation
aws s3control put-public-access-block --account-id <account> \
--public-access-block-configuration \
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
Content that must be served to the public, such as the static sites in this organisation, goes through CloudFront with origin access control. The bucket behind it is private, so there is no exception to this control for public websites.