Almost no data leak is a break-in. The overwhelming majority are a door somebody left open, on purpose, for a reason that made sense at the time. A table was made readable so the prototype would work. A storage bucket was made public so the images would load. An API key was moved into the front end so the deploy would stop failing. Then the prototype became the product, and nobody went back.
This playbook is the going-back. It is a fixed, repeatable audit of what an anonymous stranger can obtain from your own systems, it takes about 45 minutes the first time, and it ends with a written record you can hand to anyone who asks.
One rule before anything else: run this only against systems you own or have written authorisation to test. Everything below is scoped to your own property. Pointing any of it at someone else’s infrastructure is a different activity with a different legal status.
Why this is worth 45 minutes now
The population of people shipping production software has grown far faster than the population of people who have ever configured a database. An assistant will produce a schema, an API and a deploy pipeline without once surfacing the setting that decides whether the internet can read your users table — because you did not ask, and it answers questions rather than raising them.
That is not an argument against the tools. It is an argument for a checklist, which is how every other field handled the same problem. Pilots did not get worse; the aircraft got more complex, so the checklist got formal.
The audit: six checks
Check 1 — Write down what is public (10 minutes)
You cannot audit an inventory you do not have. On one page, list every internet-reachable thing you own:
- Domains and subdomains, including the forgotten ones: staging, demo, old, v1, admin.
- Every API base URL, including ones only your mobile app calls.
- Every managed backend project — database, auth, storage — and which app uses it.
- Every object-storage bucket and CDN origin.
- Every third-party dashboard that holds your customer data.
The items that leak are almost never the ones on the architecture diagram. They are the ones that were never on it.
Check 2 — The anonymous request test (10 minutes)
Open a private browser window. Log out of everything. Now try to use your own product as a complete stranger.
Load your app, open the browser’s network tab, and watch what requests it makes before you sign in. Take each of those request URLs and replay it with no session — paste it into the logged-out window, or run it through a command-line HTTP client. For each one, write down exactly what came back.
You are looking for three answers. Denied is what you want. Empty list is usually fine but worth confirming it is empty because access is refused, not because the table happens to have no rows. Rows is a finding, full stop — even one row, even test data, even "only IDs". Enumerable IDs are a map.
Check 3 — The four questions per table (10 minutes)
For every table that holds anything about a person, answer these in writing:
- Who can read a row that is not theirs? If the answer is "the policy handles it", name the policy.
- Who can write to it? Read exposure is embarrassing; write exposure is existential.
- What is in it that you would not put in an email to a stranger? Phone numbers, addresses, tokens, anything resembling a credential.
- When was that policy last actually tested, as opposed to last written?
Managed backends usually default to row-level access rules that are off, permissive, or on-but-empty. An empty policy set often means "deny everything" — and sometimes means the opposite, depending on the platform and the year your project was created. Do not reason about it. Test it.
Check 4 — Secrets in the client (5 minutes)
Anything shipped to a browser or a mobile binary is public, permanently, to everyone. View source on your built bundle and search it for the obvious shapes: secret, service_role, private, sk_, Bearer, and your cloud provider’s key prefix.
Publishable keys belong there by design. Service keys, admin keys and anything that bypasses row-level rules do not. If you find one, treat it as already leaked: rotate first, investigate after.
Check 5 — Buckets and uploads (5 minutes)
Take the URL of a file one of your users uploaded. Strip the query string. Open it logged out. If it loads, every uploaded file is public. Then try changing the filename or the ID in the path — if a different user’s file loads, you have an enumeration problem on top of an access problem.
Check 6 — The forgotten estate (5 minutes)
Go back to the inventory from Check 1 and pick the three entries nobody has touched in six months. Run Checks 2 through 5 against those specifically. This is where findings live. Active projects get attention; the hackathon demo that still has a production database connection does not.
The findings log
Record every finding in one place, one line each, in this shape:
[Date] · [System] · [What an anonymous request can reach] · [Data types involved] · [Severity] · [Owner] · [Fixed date]
Severity uses three levels and no more:
- Red — personal data, credentials or tokens readable, or anything writable, without authentication. Fix today.
- Amber — non-personal data readable, or personal data readable only with a valid account that should not have it. Fix this week.
- Green — behaves as designed. Log it anyway; next quarter’s auditor is you, and you will not remember.
The log is the deliverable. An audit with no written output is a feeling.
What to do in the first hour after a Red
- Close the door before you measure the room. Revoke the access, tighten the rule, make the bucket private. Do not wait for a root-cause analysis to stop the bleeding.
- Rotate anything that could have been taken. Keys, tokens, service credentials. Assume exposure, not compromise — then act as if compromised.
- Pull the access logs before they roll off. Most platforms keep them for days, not months. Grab the window covering the whole exposure period now, even if you cannot analyse it today.
- Write the timeline while it is fresh. When the door opened, when it closed, what was reachable in between, and how you know.
- Decide on notification with the facts in hand. The disclosure clock and the first-72-hours sequence are their own discipline — but the decision is much easier when step 4 is already written.
The internal note (copy this)
“Running our exposure audit today I found that [system] was returning [data type] to unauthenticated requests. I have [closed it / rotated keys] as of [time]. Exposure window appears to be [dates], based on [evidence]. I am pulling access logs to establish whether anyone outside the team retrieved data. No customer notification decision yet — I will have the facts to make one by [time]. Findings log is at [link].”
Short, factual, no adjectives, no self-flagellation, a next checkpoint with a time on it. That note is also the thing that protects you: it establishes that the problem was found internally and acted on immediately.
Seven ways teams talk themselves out of this
- “It’s obscure, nobody would find it.” Researchers scan hundreds of thousands of domains at a time and guess the most obvious table name. Obscurity is not a control.
- “It’s only test data.” Test data is real data often enough that this is a coin flip, and the coin is not yours.
- “The platform is secure by default.” Defaults apply to projects created after the default changed. Yours may predate it.
- “We’ll fix it in the rewrite.” The rewrite is not scheduled. The exposure is live.
- “Nobody has complained.” Nobody complains about data they took quietly.
- “The assistant set it up, so it must be right.” It did what it was asked. Access control is the thing nobody asks for. Deciding what a tool is allowed to touch is a decision you have to make yourself.
- “Our auth handles it.” Authentication proves who someone is. Authorisation decides what they may read. Confusing the two is the single most common cause of the finding you are about to have.
The cadence
Full audit quarterly, and additionally within a week of any of the following: a new public endpoint, a new managed backend project, a new storage bucket, a departure from the team, or any migration described as "quick". Put the next date in the calendar before you close the findings log. An audit you do once is a story you tell at a conference; an audit you do on a schedule is a control.
The 10-minute version
If 45 minutes is not available today, do this and nothing else: open a private window, log out, and try to read your own users table and one other user’s uploaded file. Those two requests catch the large majority of what ends up in somebody’s research paper. Everything else in this playbook is thoroughness. Those two are the fire alarm.
