agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/aws-security/s3-exposure-review/SKILL.md

s3-exposure-review

Skill0 starsChanged 14 days agoMITView on GitHub

Find and fix Amazon S3 data exposure — account/bucket Block Public Access, bucket policies and ACLs, Object Ownership, cross-account and presigned access, encryption and logging — using Access Analyzer, Macie and CLI checks, and investigate whether exposed data was accessed. Use for S3 posture reviews, a reported open bucket, or before storing sensitive data in S3.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for GetObject/ListBucket from IPs outside your organization.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

S3 Exposure Review

Checks

aws s3control get-public-access-block --account-id <acct>                   # account-level BPA (all four true)
aws s3api get-public-access-block --bucket B                                  # bucket-level BPA
aws s3api get-bucket-policy-status --bucket B --query PolicyStatus.IsPublic
aws s3api get-bucket-policy --bucket B --query Policy --output text | jq .
aws s3api get-bucket-ownership-controls --bucket B                            # BucketOwnerEnforced disables ACLs
aws s3api get-bucket-acl --bucket B
aws s3api get-bucket-encryption --bucket B
aws s3api get-bucket-logging --bucket B
aws accessanalyzer list-findings --analyzer-arn <arn> --filter '{"resourceType":{"eq":["AWS::S3::Bucket"]},"status":{"eq":["ACTIVE"]}}'

Amazon Macie identifies buckets that are public/shared and containing sensitive data (PII, credentials).

Policy red flags

  • "Principal": "*" with s3:GetObject/s3:ListBucket and no restricting Condition (aws:SourceVpce, aws:PrincipalOrgID, aws:SourceIp).
  • Cross-account principals not in the organization.
  • s3:PutObject for * (malware hosting / content injection).
  • ACL grants to AllUsers/AuthenticatedUsers (any AWS account!).
  • Static website buckets holding non-public data.

Was it accessed? (exposure investigation)

  • S3 server access logs or CloudTrail data events for the bucket — if neither was enabled, access cannot be ruled out; state this clearly.
  • Look for GetObject/ListBucket from IPs outside your organization; unauthenticated requests show requester - in server access logs.
  • Quantify objects and data classes exposed (inventory + Macie) for privacy-incident-assessment.

Remediate

Enable account-level BPA (with exceptions only for documented public-website buckets, ideally via CloudFront OAC instead), set Object Ownership to BucketOwnerEnforced, scope policies with aws:PrincipalOrgID, enable default encryption (SSE-KMS for sensitive), enable data events for sensitive buckets, SCP to deny disabling BPA.

Related skills

data-exposure-investigation, cloudtrail-investigation, aws-org-guardrails, cloud-exposure-review

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.