This rule ensures that S3 buckets prohibit public write access to enhance data security.
Rule | S3 buckets should prohibit public write access |
Framework | CISA-cyber-essentials |
Severity | ✔ High |
Rule Description:
According to the CISA-Cyber Essentials framework, S3 buckets should not allow public write access. Public write access allows unauthorized users to upload, modify, or delete objects within the S3 bucket, which can lead to potential data breaches or unauthorized data modifications.
Troubleshooting Steps (if applicable):
Necessary Codes (if applicable):
There may be instances where you need to modify the bucket ACLs or policies to restrict public write access. Here are some code snippets that can be used to achieve this:
aws s3api put-bucket-acl --bucket YOUR_BUCKET_NAME --acl private
aws s3api put-bucket-policy --bucket YOUR_BUCKET_NAME --policy YOUR_POLICY_FILE.json
Ensure to replace
YOUR_BUCKET_NAME
with the name of your S3 bucket and YOUR_POLICY_FILE.json
with the path to a JSON file containing the updated bucket policy.Remediation Steps:
Following these steps will help ensure that your S3 buckets prohibit public write access, aligning with the CISA-Cyber Essentials framework and mitigating the risk of unauthorized modifications or breaches.