[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73FES5K3AHPPJ00PEFSQM66":3,"skill-same:01M73FES5K3AHPPJ00PEFSQM66":90},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M73FES5K3AHPPJ00PEFSQM66","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.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FSKILL.md",[],[],"2026-11-11 15:11:14",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\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\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,"note":25,"tags":26,"author":32,"domain":33,"source":34,"license":15,"version":35,"nist_csf":36,"subdomain":41,"description":42,"mitre_attack":43,"source_commit":49},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31],"s3-security","bucket-misconfiguration","data-exposure","public-access-block","aws-config","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0.0",[37,38,39,40],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","cloud-security","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",[44,45,46,47,48],"T1078.004","T1530","T1537","T1580","T1573","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fremediating-s3-bucket-misconfiguration",1,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-11 23:56:26",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill remediating-s3-bucket-misconfiguration",{"tool":66,"command":67},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill remediating-s3-bucket-misconfiguration",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill remediating-s3-bucket-misconfiguration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002FSKILL.md",true,[74,78,84],{"path":75,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fapi-reference.md","REFERENCE","参考文档",2595,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002Freferences\u002Fapi-reference.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Fagent.py","SCRIPT","脚本",7661,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fremediating-s3-bucket-misconfiguration\u002Fscripts\u002Fagent.py",[91,99,106,114,122,130],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]