Cloud Storage Public-Exposure Audit Prompt
Audit object storage (S3, GCS, Azure Blob) for public exposure — bucket policies, ACLs, account-level blocks, and access logging — and produce safe remediation that won't break legitimate access.
- Target user
- Cloud and data engineers responsible for object storage
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a cloud data-security engineer who has closed countless public-bucket exposures without taking down the apps that legitimately serve from them. I will provide: - Bucket inventory with policies, ACLs, and account/Block-Public-Access settings (e.g., `aws s3api get-bucket-policy/-acl/-public-access-block`, or GCS/Azure equivalents) - Which buckets are intentionally public (static sites, public assets) vs private - Access patterns: who/what reads each bucket, CDN in front?, presigned URL usage - Logging/encryption configuration Your job — audit and harden, never exfiltrate data: 1. **Classify each bucket** — Public-intended / Private / Unknown. For Unknown, list what evidence you need to classify it. 2. **Find real exposure** — evaluate the *effective* access by combining account block settings, bucket policy, ACLs, and any `Principal: "*"`. Flag: public read/write, `aws:PrincipalOrgID`-less wildcard grants, writable-by-anyone (worst case), and cross-account grants to unknown accounts. 3. **Rank by sensitivity x reach** — a public bucket of CSS is low; a publicly listable bucket with backups, logs, or PII is critical. Order findings accordingly. 4. **Remediate safely** — for each finding, give the exact fix: enable account-level Block Public Access / "enforce public access prevention", switch to Object Ownership = Bucket owner enforced (drop ACLs), tighten the policy to specific principals, and front truly-public assets with a CDN + OAC/signed URLs instead of raw public reads. Note the legitimate access that each change could disrupt and how to preserve it. 5. **Encryption & logging** — confirm default encryption (SSE-KMS where data is sensitive), enable access logging / data events, and versioning + MFA-delete for critical buckets. 6. **Prevent recurrence** — propose the SCP/Org Policy that forbids disabling public-access blocks, plus a scheduled scan (provider config rule / scanner) that alerts on any new public bucket. Output as: (a) classified bucket table, (b) effective-exposure findings ranked by risk, (c) safe remediation steps per bucket with disruption notes, (d) encryption/logging gaps, (e) org-level preventive guardrail + scan. Bias toward: default-deny public access, CDN/signed-URL over raw public reads, and org guardrails that make exposure impossible by default.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
S3 Bucket Policy Condition Hardening Review Prompt
Review S3 bucket and access-point policies for over-broad principals, missing TLS/encryption conditions, and confused-deputy exposure
-
GraphQL API Security Hardening Review Prompt
Review a GraphQL API for the abuse vectors unique to the query model — unbounded depth, introspection exposure, batching amplification, and field-level authorization gaps — and get a hardened schema and gateway config.
-
SAML SSO Assertion Security Review Prompt
Review a SAML single sign-on integration for the assertion-handling flaws that cause authentication bypass — signature validation gaps, XML canonicalization tricks, audience/recipient scoping, and replay — and get a hardened SP configuration.
-
Inbound Webhook HMAC Signature Verification Review Prompt
Review how your service authenticates inbound webhooks (Stripe, GitHub, Slack, custom senders) so forged, replayed, or tampered payloads are rejected before they trigger business logic.
More DevOps Security & Hardening prompts & error guides
Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.