[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EW944RZXC9Y6Y4T6TPHFSC":3,"skill-same:01M6EW944RZXC9Y6Y4T6TPHFSC":109},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":14,"repositoryHtmlUrl":73,"repositoryHomepageUrl":74,"ownerHtmlUrl":75,"ownerBlogUrl":6,"ownerDescription":76,"updatedAt":77,"install":78,"resources":91},"01M6EW944RZXC9Y6Y4T6TPHFSC","remediating-s3-bucket-misconfiguration",null,"This skill provides step-by-step procedures for identifying and remediating Amazon S3 bucket misconfigurations that expose sensitive data to unauthorized access. It covers enabling S3 Block Public Access at account and bucket levels, auditing bucket policies and ACLs, enforcing encryption, configuring access logging, and deploying automated remediation using AWS Config and Lambda.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"s3","remediating s3 bucket misconfiguration","misconfiguration","t1078","de","cm","access","aws-config","public-access-block","bucket-misconfiguration","s3-security","security","lambda","remediation","encryption","data","cloud-security","logging","config","cybersecurity","2026-11-10 10:12:30",false,"---\nname: remediating-s3-bucket-misconfiguration\ndescription: 'This skill provides step-by-step procedures for identifying and remediating\n  Amazon S3 bucket misconfigurations that expose sensitive data to unauthorized access.\n  It covers enabling S3 Block Public Access at account and bucket levels, auditing\n  bucket policies and ACLs, enforcing encryption, configuring access logging, and\n  deploying automated remediation using AWS Config and Lambda.\n\n  '\ndomain: cybersecurity\nsubdomain: cloud-security\ntags:\n- s3-security\n- bucket-misconfiguration\n- data-exposure\n- public-access-block\n- aws-config\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- ID.AM-08\n- GV.SC-06\n- DE.CM-01\nmitre_attack:\n- T1078.004\n- T1530\n- T1537\n- T1580\n- T1573\n---\n\n# Remediating S3 Bucket Misconfiguration\n\n## When to Use\n\n- When AWS Config or Security Hub reports S3 buckets with public access or missing encryption\n- When a security scan reveals S3 bucket policies granting access to Principal \"*\" (everyone)\n- When preparing for a data protection audit requiring evidence of storage security controls\n- When responding to a data exposure incident involving publicly accessible S3 objects\n- When establishing preventive controls for new S3 bucket creation across an AWS Organization\n\n**Do not use** for Azure Blob Storage or GCP Cloud Storage misconfigurations, for S3 data classification (see implementing-cloud-dlp-policy), or for S3 access pattern analysis unrelated to security.\n\n## Prerequisites\n\n- AWS account with S3 administrative permissions (s3:*, s3-outposts:*)\n- AWS Config enabled to evaluate S3 resource compliance\n- AWS CloudTrail logging S3 data events for access auditing\n- Macie enabled for sensitive data discovery in S3 buckets\n\n## Workflow\n\n### Step 1: Identify All Public and Misconfigured Buckets\n\nUse multiple detection methods to identify S3 buckets with public access. Rely on AWS Config rules, S3 Access Analyzer, and Macie rather than manual inspection.\n\n```bash\n# Enable S3 Access Analyzer for external access detection\naws accessanalyzer create-analyzer \\\n  --analyzer-name s3-analyzer \\\n  --type ACCOUNT\n\n# List all S3 buckets with public access indicators\naws s3api list-buckets --query 'Buckets[*].Name' --output text | while read bucket; do\n  public_status=$(aws s3api get-public-access-block --bucket \"$bucket\" 2>\u002Fdev\u002Fnull)\n  if [ $? -ne 0 ]; then\n    echo \"NO PUBLIC ACCESS BLOCK: $bucket\"\n  fi\ndone\n\n# Check bucket policies for public access grants\naws s3api list-buckets --query 'Buckets[*].Name' --output text | while read bucket; do\n  policy=$(aws s3api get-bucket-policy --bucket \"$bucket\" 2>\u002Fdev\u002Fnull)\n  if echo \"$policy\" | grep -q '\"Principal\":\"*\"' 2>\u002Fdev\u002Fnull; then\n    echo \"PUBLIC POLICY DETECTED: $bucket\"\n  fi\ndone\n\n# Use AWS Config to find non-compliant buckets\naws configservice get-compliance-details-by-config-rule \\\n  --config-rule-name s3-bucket-public-read-prohibited \\\n  --compliance-types NON_COMPLIANT \\\n  --query 'EvaluationResults[*].EvaluationResultIdentifier.EvaluationResultQualifier.ResourceId'\n```\n\n### Step 2: Enable S3 Block Public Access at Account Level\n\nApply the four Block Public Access settings at the AWS account level as a safety net. This prevents any bucket in the account from being made public, regardless of individual bucket policies or ACLs.\n\n```bash\n# Enable account-level Block Public Access (all four settings)\naws s3control put-public-access-block \\\n  --account-id 123456789012 \\\n  --public-access-block-configuration '{\n    \"BlockPublicAcls\": true,\n    \"IgnorePublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"RestrictPublicBuckets\": true\n  }'\n\n# Verify account-level settings\naws s3control get-public-access-block --account-id 123456789012\n\n# Enable at bucket level for defense in depth\naws s3api put-public-access-block \\\n  --bucket production-data-bucket \\\n  --public-access-block-configuration '{\n    \"BlockPublicAcls\": true,\n    \"IgnorePublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"RestrictPublicBuckets\": true\n  }'\n```\n\n### Step 3: Audit and Remediate Bucket Policies and ACLs\n\nReview all bucket policies for overly permissive Principal statements and remove legacy ACLs. Enforce bucket ownership controls to disable ACLs entirely.\n\n```bash\n# Remove a public bucket policy\naws s3api delete-bucket-policy --bucket exposed-bucket\n\n# Replace with a restrictive policy\naws s3api put-bucket-policy --bucket exposed-bucket --policy '{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"DenyUnencryptedTransport\",\n      \"Effect\": \"Deny\",\n      \"Principal\": \"*\",\n      \"Action\": \"s3:*\",\n      \"Resource\": [\n        \"arn:aws:s3:::exposed-bucket\",\n        \"arn:aws:s3:::exposed-bucket\u002F*\"\n      ],\n      \"Condition\": {\n        \"Bool\": {\"aws:SecureTransport\": \"false\"}\n      }\n    },\n    {\n      \"Sid\": \"AllowOnlyVPCEndpoint\",\n      \"Effect\": \"Deny\",\n      \"Principal\": \"*\",\n      \"Action\": \"s3:*\",\n      \"Resource\": [\n        \"arn:aws:s3:::exposed-bucket\",\n        \"arn:aws:s3:::exposed-bucket\u002F*\"\n      ],\n      \"Condition\": {\n        \"StringNotEquals\": {\"aws:SourceVpce\": \"vpce-0abc123def456\"}\n      }\n    }\n  ]\n}'\n\n# Enforce bucket owner for all objects (disable ACLs)\naws s3api put-bucket-ownership-controls --bucket exposed-bucket \\\n  --ownership-controls '{\"Rules\": [{\"ObjectOwnership\": \"BucketOwnerEnforced\"}]}'\n```\n\n### Step 4: Enforce Default Encryption\n\nEnable default server-side encryption with AWS KMS or AES-256 for all buckets. Add a bucket policy denying unencrypted object uploads.\n\n```bash\n# Enable default KMS encryption\naws s3api put-bucket-encryption --bucket production-data-bucket \\\n  --server-side-encryption-configuration '{\n    \"Rules\": [{\n      \"ApplyServerSideEncryptionByDefault\": {\n        \"SSEAlgorithm\": \"aws:kms\",\n        \"KMSMasterKeyID\": \"arn:aws:kms:us-east-1:123456789012:key\u002Fkey-id\"\n      },\n      \"BucketKeyEnabled\": true\n    }]\n  }'\n\n# Deny unencrypted uploads via bucket policy\naws s3api put-bucket-policy --bucket production-data-bucket --policy '{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Sid\": \"DenyUnencryptedUploads\",\n    \"Effect\": \"Deny\",\n    \"Principal\": \"*\",\n    \"Action\": \"s3:PutObject\",\n    \"Resource\": \"arn:aws:s3:::production-data-bucket\u002F*\",\n    \"Condition\": {\n      \"StringNotEquals\": {\"s3:x-amz-server-side-encryption\": [\"aws:kms\", \"AES256\"]}\n    }\n  }]\n}'\n```\n\n### Step 5: Enable Access Logging and Monitoring\n\nConfigure S3 server access logging and CloudTrail data events to track all object-level operations. Set up EventBridge rules to alert on suspicious access patterns.\n\n```bash\n# Enable server access logging\naws s3api put-bucket-logging --bucket production-data-bucket \\\n  --bucket-logging-status '{\n    \"LoggingEnabled\": {\n      \"TargetBucket\": \"s3-access-logs-bucket\",\n      \"TargetPrefix\": \"production-data-bucket\u002F\"\n    }\n  }'\n\n# Enable CloudTrail S3 data events\naws cloudtrail put-event-selectors --trail-name management-trail \\\n  --event-selectors '[{\n    \"ReadWriteType\": \"All\",\n    \"DataResources\": [{\n      \"Type\": \"AWS::S3::Object\",\n      \"Values\": [\"arn:aws:s3:::production-data-bucket\u002F\"]\n    }]\n  }]'\n```\n\n### Step 6: Deploy Preventive Controls with SCP and Config\n\nUse Service Control Policies to prevent disabling Block Public Access across the organization. Deploy AWS Config rules with auto-remediation.\n\n```bash\n# SCP preventing Block Public Access removal\naws organizations create-policy \\\n  --name PreventS3PublicAccess \\\n  --type SERVICE_CONTROL_POLICY \\\n  --content '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Sid\": \"DenyRemovePublicAccessBlock\",\n      \"Effect\": \"Deny\",\n      \"Action\": [\n        \"s3:PutBucketPublicAccessBlock\",\n        \"s3:PutAccountPublicAccessBlock\"\n      ],\n      \"Resource\": \"*\",\n      \"Condition\": {\n        \"StringNotLike\": {\"aws:PrincipalArn\": \"arn:aws:iam::*:role\u002FSecurityAdmin\"}\n      }\n    }]\n  }'\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| S3 Block Public Access | Four account-level and bucket-level settings that override any policy or ACL granting public access to S3 resources |\n| Bucket Policy | JSON-based resource policy attached to an S3 bucket defining who can access what objects under which conditions |\n| ACL (Access Control List) | Legacy S3 access mechanism that grants permissions at the bucket or object level; should be disabled via BucketOwnerEnforced |\n| BucketOwnerEnforced | Ownership control setting that disables all ACLs on a bucket, making the bucket owner the sole authority for access control |\n| Server-Side Encryption | Automatic encryption of objects at rest using AES-256 (SSE-S3), AWS KMS (SSE-KMS), or customer-provided keys (SSE-C) |\n| VPC Endpoint | Private connection between a VPC and S3 that restricts bucket access to traffic originating from within the VPC |\n| S3 Access Analyzer | IAM Access Analyzer capability that identifies S3 buckets shared with external entities outside the account or organization |\n\n## Tools & Systems\n\n- **AWS Config**: Evaluates S3 bucket compliance against managed rules and triggers auto-remediation for non-compliant resources\n- **Amazon Macie**: Discovers and classifies sensitive data in S3 buckets to identify which misconfigurations pose the highest data exposure risk\n- **IAM Access Analyzer**: Identifies S3 buckets with policies or ACLs that grant access to external principals\n- **S3 Storage Lens**: Provides organization-wide visibility into S3 usage patterns, access metrics, and security anomalies\n- **Prowler**: Open-source tool that checks S3 security configurations against CIS benchmarks and best practices\n\n## Common Scenarios\n\n### Scenario: Data Breach from Publicly Readable S3 Bucket Containing PII\n\n**Context**: A security researcher reports that an S3 bucket containing 273,000 bank transfer PDFs is publicly readable. The bucket was created by a developer who needed to share files with an external partner and set the ACL to public-read.\n\n**Approach**:\n1. Immediately enable Block Public Access on the specific bucket to stop the exposure\n2. Revoke all public ACLs by setting BucketOwnerEnforced ownership controls\n3. Audit CloudTrail and S3 access logs to determine which IP addresses accessed the exposed objects\n4. Run Macie on the bucket to classify the types of PII exposed and assess regulatory notification requirements\n5. Enable account-level Block Public Access to prevent recurrence across all buckets\n6. Deploy an SCP preventing any principal except SecurityAdmin from modifying Block Public Access settings\n7. Create a pre-signed URL mechanism or S3 Access Point for the legitimate partner sharing use case\n\n**Pitfalls**: Enabling Block Public Access without notifying the team that set up the public access breaks their workflow. Not running access log analysis before remediation loses evidence of who accessed the exposed data.\n\n## Output Format\n\n```\nS3 Bucket Security Remediation Report\n=======================================\nAccount: 123456789012\nAssessment Date: 2025-02-23\nBuckets Scanned: 156\n\nACCOUNT-LEVEL CONTROLS:\n  Block Public Access: ENABLED (all four settings)\n  SCP Preventing Removal: DEPLOYED\n\nCRITICAL FINDINGS (Remediated):\n  [S3-001] production-uploads - Public READ via ACL\n    Status: REMEDIATED - BucketOwnerEnforced applied\n    Objects Exposed: 273,412\n    Duration of Exposure: 47 days\n    Unique External IPs Accessed: 1,247\n\n  [S3-002] analytics-export - Public bucket policy (Principal: *)\n    Status: REMEDIATED - Policy replaced with VPC endpoint restriction\n    Sensitive Data (Macie): 12,400 objects with PII detected\n\nHIGH FINDINGS:\n  [S3-003] 14 buckets missing default encryption\n    Status: REMEDIATED - KMS encryption enabled\n  [S3-004] 8 buckets without server access logging\n    Status: REMEDIATED - Logging enabled to centralized log bucket\n\nSUMMARY:\n  Buckets Remediated: 24\u002F156\n  Encryption Coverage: 100%\n  Access Logging Coverage: 100%\n  Block Public Access: 156\u002F156 buckets\n```\n","# Remediating S3 Bucket Misconfiguration\n\n## When to Use\n\n- When AWS Config or Security Hub reports S3 buckets with public access or missing encryption\n- When a security scan reveals S3 bucket policies granting access to Principal \"*\" (everyone)\n- When preparing for a data protection audit requiring evidence of storage security controls\n- When responding to a data exposure incident involving publicly accessible S3 objects\n- When establishing preventive controls for new S3 bucket creation across an AWS Organization\n\n**Do not use** for Azure Blob Storage or GCP Cloud Storage misconfigurations, for S3 data classification (see implementing-cloud-dlp-policy), or for S3 access pattern analysis unrelated to security.\n\n## Prerequisites\n\n- AWS account with S3 administrative permissions (s3:*, s3-outposts:*)\n- AWS Config enabled to evaluate S3 resource compliance\n- AWS CloudTrail logging S3 data events for access auditing\n- Macie enabled for sensitive data discovery in S3 buckets\n\n## Workflow\n\n### Step 1: Identify All Public and Misconfigured Buckets\n\nUse multiple detection methods to identify S3 buckets with public access. Rely on AWS Config rules, S3 Access Analyzer, and Macie rather than manual inspection.\n\n```bash\n# Enable S3 Access Analyzer for external access detection\naws accessanalyzer create-analyzer \\\n  --analyzer-name s3-analyzer \\\n  --type ACCOUNT\n\n# List all S3 buckets with public access indicators\naws s3api list-buckets --query 'Buckets[*].Name' --output text | while read bucket; do\n  public_status=$(aws s3api get-public-access-block --bucket \"$bucket\" 2>\u002Fdev\u002Fnull)\n  if [ $? -ne 0 ]; then\n    echo \"NO PUBLIC ACCESS BLOCK: $bucket\"\n  fi\ndone\n\n# Check bucket policies for public access grants\naws s3api list-buckets --query 'Buckets[*].Name' --output text | while read bucket; do\n  policy=$(aws s3api get-bucket-policy --bucket \"$bucket\" 2>\u002Fdev\u002Fnull)\n  if echo \"$policy\" | grep -q '\"Principal\":\"*\"' 2>\u002Fdev\u002Fnull; then\n    echo \"PUBLIC POLICY DETECTED: $bucket\"\n  fi\ndone\n\n# Use AWS Config to find non-compliant buckets\naws configservice get-compliance-details-by-config-rule \\\n  --config-rule-name s3-bucket-public-read-prohibited \\\n  --compliance-types NON_COMPLIANT \\\n  --query 'EvaluationResults[*].EvaluationResultIdentifier.EvaluationResultQualifier.ResourceId'\n```\n\n### Step 2: Enable S3 Block Public Access at Account Level\n\nApply the four Block Public Access settings at the AWS account level as a safety net. This prevents any bucket in the account from being made public, regardless of individual bucket policies or ACLs.\n\n```bash\n# Enable account-level Block Public Access (all four settings)\naws s3control put-public-access-block \\\n  --account-id 123456789012 \\\n  --public-access-block-configuration '{\n    \"BlockPublicAcls\": true,\n    \"IgnorePublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"RestrictPublicBuckets\": true\n  }'\n\n# Verify account-level settings\naws s3control get-public-access-block --account-id 123456789012\n\n# Enable at bucket level for defense in depth\naws s3api put-public-access-block \\\n  --bucket production-data-bucket \\\n  --public-access-block-configuration '{\n    \"BlockPublicAcls\": true,\n    \"IgnorePublicAcls\": true,\n    \"BlockPublicPolicy\": true,\n    \"RestrictPublicBuckets\": true\n  }'\n```\n\n### Step 3: Audit and Remediate Bucket Policies and ACLs\n\nReview all bucket policies for overly permissive Principal statements and remove legacy ACLs. Enforce bucket ownership controls to disable ACLs entirely.\n\n```bash\n# Remove a public bucket policy\naws s3api delete-bucket-policy --bucket exposed-bucket\n\n# Replace with a restrictive policy\naws s3api put-bucket-policy --bucket exposed-bucket --policy '{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"DenyUnencryptedTransport\",\n      \"Effect\": \"Deny\",\n      \"Principal\": \"*\",\n      \"Action\": \"s3:*\",\n      \"Resource\": [\n        \"arn:aws:s3:::exposed-bucket\",\n        \"arn:aws:s3:::exposed-bucket\u002F*\"\n      ],\n      \"Condition\": {\n        \"Bool\": {\"aws:SecureTransport\": \"false\"}\n      }\n    },\n    {\n      \"Sid\": \"AllowOnlyVPCEndpoint\",\n      \"Effect\": \"Deny\",\n      \"Principal\": \"*\",\n      \"Action\": \"s3:*\",\n      \"Resource\": [\n        \"arn:aws:s3:::exposed-bucket\",\n        \"arn:aws:s3:::exposed-bucket\u002F*\"\n      ],\n      \"Condition\": {\n        \"StringNotEquals\": {\"aws:SourceVpce\": \"vpce-0abc123def456\"}\n      }\n    }\n  ]\n}'\n\n# Enforce bucket owner for all objects (disable ACLs)\naws s3api put-bucket-ownership-controls --bucket exposed-bucket \\\n  --ownership-controls '{\"Rules\": [{\"ObjectOwnership\": \"BucketOwnerEnforced\"}]}'\n```\n\n### Step 4: Enforce Default Encryption\n\nEnable default server-side encryption with AWS KMS or AES-256 for all buckets. Add a bucket policy denying unencrypted object uploads.\n\n```bash\n# Enable default KMS encryption\naws s3api put-bucket-encryption --bucket production-data-bucket \\\n  --server-side-encryption-configuration '{\n    \"Rules\": [{\n      \"ApplyServerSideEncryptionByDefault\": {\n        \"SSEAlgorithm\": \"aws:kms\",\n        \"KMSMasterKeyID\": \"arn:aws:kms:us-east-1:123456789012:key\u002Fkey-id\"\n      },\n      \"BucketKeyEnabled\": true\n    }]\n  }'\n\n# Deny unencrypted uploads via bucket policy\naws s3api put-bucket-policy --bucket production-data-bucket --policy '{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Sid\": \"DenyUnencryptedUploads\",\n    \"Effect\": \"Deny\",\n    \"Principal\": \"*\",\n    \"Action\": \"s3:PutObject\",\n    \"Resource\": \"arn:aws:s3:::production-data-bucket\u002F*\",\n    \"Condition\": {\n      \"StringNotEquals\": {\"s3:x-amz-server-side-encryption\": [\"aws:kms\", \"AES256\"]}\n    }\n  }]\n}'\n```\n\n### Step 5: Enable Access Logging and Monitoring\n\nConfigure S3 server access logging and CloudTrail data events to track all object-level operations. Set up EventBridge rules to alert on suspicious access patterns.\n\n```bash\n# Enable server access logging\naws s3api put-bucket-logging --bucket production-data-bucket \\\n  --bucket-logging-status '{\n    \"LoggingEnabled\": {\n      \"TargetBucket\": \"s3-access-logs-bucket\",\n      \"TargetPrefix\": \"production-data-bucket\u002F\"\n    }\n  }'\n\n# Enable CloudTrail S3 data events\naws cloudtrail put-event-selectors --trail-name management-trail \\\n  --event-selectors '[{\n    \"ReadWriteType\": \"All\",\n    \"DataResources\": [{\n      \"Type\": \"AWS::S3::Object\",\n      \"Values\": [\"arn:aws:s3:::production-data-bucket\u002F\"]\n    }]\n  }]'\n```\n\n### Step 6: Deploy Preventive Controls with SCP and Config\n\nUse Service Control Policies to prevent disabling Block Public Access across the organization. Deploy AWS Config rules with auto-remediation.\n\n```bash\n# SCP preventing Block Public Access removal\naws organizations create-policy \\\n  --name PreventS3PublicAccess \\\n  --type SERVICE_CONTROL_POLICY \\\n  --content '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Sid\": \"DenyRemovePublicAccessBlock\",\n      \"Effect\": \"Deny\",\n      \"Action\": [\n        \"s3:PutBucketPublicAccessBlock\",\n        \"s3:PutAccountPublicAccessBlock\"\n      ],\n      \"Resource\": \"*\",\n      \"Condition\": {\n        \"StringNotLike\": {\"aws:PrincipalArn\": \"arn:aws:iam::*:role\u002FSecurityAdmin\"}\n      }\n    }]\n  }'\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| S3 Block Public Access | Four account-level and bucket-level settings that override any policy or ACL granting public access to S3 resources |\n| Bucket Policy | JSON-based resource policy attached to an S3 bucket defining who can access what objects under which conditions |\n| ACL (Access Control List) | Legacy S3 access mechanism that grants permissions at the bucket or object level; should be disabled via BucketOwnerEnforced |\n| BucketOwnerEnforced | Ownership control setting that disables all ACLs on a bucket, making the bucket owner the sole authority for access control |\n| Server-Side Encryption | Automatic encryption of objects at rest using AES-256 (SSE-S3), AWS KMS (SSE-KMS), or customer-provided keys (SSE-C) |\n| VPC Endpoint | Private connection between a VPC and S3 that restricts bucket access to traffic originating from within the VPC |\n| S3 Access Analyzer | IAM Access Analyzer capability that identifies S3 buckets shared with external entities outside the account or organization |\n\n## Tools & Systems\n\n- **AWS Config**: Evaluates S3 bucket compliance against managed rules and triggers auto-remediation for non-compliant resources\n- **Amazon Macie**: Discovers and classifies sensitive data in S3 buckets to identify which misconfigurations pose the highest data exposure risk\n- **IAM Access Analyzer**: Identifies S3 buckets with policies or ACLs that grant access to external principals\n- **S3 Storage Lens**: Provides organization-wide visibility into S3 usage patterns, access metrics, and security anomalies\n- **Prowler**: Open-source tool that checks S3 security configurations against CIS benchmarks and best practices\n\n## Common Scenarios\n\n### Scenario: Data Breach from Publicly Readable S3 Bucket Containing PII\n\n**Context**: A security researcher reports that an S3 bucket containing 273,000 bank transfer PDFs is publicly readable. The bucket was created by a developer who needed to share files with an external partner and set the ACL to public-read.\n\n**Approach**:\n1. Immediately enable Block Public Access on the specific bucket to stop the exposure\n2. Revoke all public ACLs by setting BucketOwnerEnforced ownership controls\n3. Audit CloudTrail and S3 access logs to determine which IP addresses accessed the exposed objects\n4. Run Macie on the bucket to classify the types of PII exposed and assess regulatory notification requirements\n5. Enable account-level Block Public Access to prevent recurrence across all buckets\n6. Deploy an SCP preventing any principal except SecurityAdmin from modifying Block Public Access settings\n7. Create a pre-signed URL mechanism or S3 Access Point for the legitimate partner sharing use case\n\n**Pitfalls**: Enabling Block Public Access without notifying the team that set up the public access breaks their workflow. Not running access log analysis before remediation loses evidence of who accessed the exposed data.\n\n## Output Format\n\n```\nS3 Bucket Security Remediation Report\n=======================================\nAccount: 123456789012\nAssessment Date: 2025-02-23\nBuckets Scanned: 156\n\nACCOUNT-LEVEL CONTROLS:\n  Block Public Access: ENABLED (all four settings)\n  SCP Preventing Removal: DEPLOYED\n\nCRITICAL FINDINGS (Remediated):\n  [S3-001] production-uploads - Public READ via ACL\n    Status: REMEDIATED - BucketOwnerEnforced applied\n    Objects Exposed: 273,412\n    Duration of Exposure: 47 days\n    Unique External IPs Accessed: 1,247\n\n  [S3-002] analytics-export - Public bucket policy (Principal: *)\n    Status: REMEDIATED - Policy replaced with VPC endpoint restriction\n    Sensitive Data (Macie): 12,400 objects with PII detected\n\nHIGH FINDINGS:\n  [S3-003] 14 buckets missing default encryption\n    Status: REMEDIATED - KMS encryption enabled\n  [S3-004] 8 buckets without server access logging\n    Status: REMEDIATED - Logging enabled to centralized log bucket\n\nSUMMARY:\n  Buckets Remediated: 24\u002F156\n  Encryption Coverage: 100%\n  Access Logging Coverage: 100%\n  Block Public Access: 156\u002F156 buckets\n```\n",{"name":5,"tags":54,"author":56,"domain":48,"license":15,"version":57,"nist_csf":58,"subdomain":45,"description":63,"mitre_attack":64},[39,38,55,37,36],"data-exposure","mahipal","1.0.0",[59,60,61,62],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","This skill provides step-by-step procedures for identifying and remediating Amazon S3 bucket misconfigurations that expose sensitive data to unauthorized access. It covers enabling S3 Block Public Access at account and bucket levels, auditing bucket policies and ACLs, enforcing encryption, configuring access logging, and deploying automated remediation using AWS Config and Lambda.\n",[65,66,67,68,69],"T1078.004","T1530","T1537","T1580","T1573","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":79,"prompt":89,"zipAvailable":90},[80,83,86],{"tool":81,"command":82},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill remediating-s3-bucket-misconfiguration",{"tool":84,"command":85},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill remediating-s3-bucket-misconfiguration",{"tool":87,"command":88},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill remediating-s3-bucket-misconfiguration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FSKILL.md",true,[92,97,103],{"path":93,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FLICENSE",{"path":98,"resourceType":99,"resourceTypeDesc":100,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fapi-reference.md","REFERENCE","参考文档",2595,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002Freferences\u002Fapi-reference.md",{"path":104,"resourceType":105,"resourceTypeDesc":106,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fagent.py","SCRIPT","脚本",7661,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002Fscripts\u002Fagent.py",[110,149,158,167,188,214],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":129,"publishedAt":49},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[117,120,123,126],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":127,"categoryName":128,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000034","行政与办公人员",[112,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube","with",{"skillNo":150,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":157,"publishedAt":49},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[153,154,155,156],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":127,"categoryName":128,"taxonomyType":26,"taxonomyTypeDesc":27},[112,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],{"skillNo":159,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":166,"publishedAt":49},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[162,163,164,165],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":127,"categoryName":128,"taxonomyType":26,"taxonomyTypeDesc":27},[112,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148],{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":49},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[174,175,176,177,29,178,179,180,181,182,183,184,185,186,187],"python","zarr python","storage","integration","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":195,"publishedAt":49},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[194],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[196,197,198,199,200,201,202,203,204,205,206,141,142,207,208,209,210,211,212,213],"oracle","what if oracle","go","run","ux","futures","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":215,"name":216,"nameZh":6,"description":217,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":218,"categories":219,"keywords":230,"publishedAt":49},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[220,223,226,227],{"categoryNo":221,"categoryName":222,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":224,"categoryName":225,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":228,"categoryName":229,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[231,232,233,234,235,236,237,238,138,35,141,142,143,239,240,241,242,243,187,244],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","proposals","Academic","requirements","formatting","journal","chi"]