remediating-s3-bucket-misconfiguration

Remediates public S3 bucket misconfigurations using AWS CLI, Config, and SCP controls.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill remediating-s3-bucket-misconfiguration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remediating-s3-bucket-misconfiguration
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/cloud-security/remediating-s3-bucket-misconfiguration
Command: npx skills add https://github.com/xalgord/xalgorix --skill remediating-s3-bucket-misconfiguration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Publicly exposed or misconfigured Amazon S3 buckets are a leading cause of cloud data breaches. This Skill provides a structured, step-by-step workflow to detect public buckets, lock down access, enforce encryption, and deploy preventive controls so exposures are fixed and cannot recur.

Core Features & Use Cases

  • Detection and auditing: Identify public buckets using IAM Access Analyzer, AWS Config rules, and bucket policy scans for Principal "*" grants.
  • Remediation workflows: Enable Block Public Access at account and bucket levels, remove public ACLs via BucketOwnerEnforced, enforce KMS default encryption, and enable access logging with CloudTrail data events.
  • Preventive controls: Deploy Service Control Policies and AWS Config auto-remediation to stop future misconfigurations across an AWS Organization.
  • Use Case: A security researcher reports a publicly readable bucket containing PII. Follow the workflow to immediately block public access, audit CloudTrail logs for who accessed the data, run Macie for classification, and deploy an SCP preventing recurrence.

Quick Start

Audit my AWS account for publicly accessible S3 buckets and walk me through remediating each finding with Block Public Access and encryption.

Frequently Asked Questions about remediating-s3-bucket-misconfiguration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find publicly accessible S3 buckets in my AWS account?

Use IAM Access Analyzer to detect external access, AWS Config rules like s3-bucket-public-read-prohibited for compliance status, and CLI checks of bucket policies for Principal "*" grants. Combining all three catches buckets that any single method misses.

How do I block public access to all S3 buckets at once?

Enable all four Block Public Access settings at the account level with aws s3control put-public-access-block. This overrides any bucket policy or ACL granting public access, and bucket-level settings can be added for defense in depth.

Does enabling BucketOwnerEnforced break existing S3 workflows?

Yes, it can. BucketOwnerEnforced disables all ACLs, which breaks ACL-dependent workflows like S3 server-access-log delivery, CloudFront OAI, and cross-account ACL grants. Verify downstream consumers with get-bucket-ownership-controls before enforcing it.

Why do uploads fail after enforcing a DenyUnencryptedUploads bucket policy?

The policy condition on s3:x-amz-server-side-encryption blocks uploads that rely on bucket default encryption because those requests do not send the SSE header. Clients must explicitly specify aws:kms or AES256 in put-object requests.

Can this approach be used for Azure Blob or GCP Cloud Storage?

No. The workflow is specific to Amazon S3 and uses AWS-native services like Config, SCPs, Macie, and Access Analyzer. Azure Blob Storage and GCP Cloud Storage require their own platform-specific remediation procedures.