security.txt: what AI-built apps miss

security.txt: what AI-built apps miss

Most AI-built apps have no way to report a security hole, and the people shipping them have never noticed. No security email anywhere. The generator will scaffold a checkout, a cookie banner, and a legal page in one pass. A contact for “someone found something broken” never makes the prompt.

security.txt is the standard for exactly this: one plain-text file, defined in RFC 9116, that points a researcher at a mailbox someone actually watches. It takes minutes to add, and it breaks in one specific way on almost every generated frontend. A researcher who finds the hole looks for you first. What they find instead decides whether you hear about it at all.

The report has nowhere to go

With no channel, the researcher picks one of three doors. A public GitHub issue is full disclosure with no warning, and you learn about the hole when customers start forwarding it. A quiet sale to a broker is legal in many jurisdictions and ends with your bug priced by volume. The third door is silence. The hole stays open until someone with worse intentions finds it the same way, and you hear about it from neither.

ProofForge, a company that scans AI-built apps, put the researcher’s side on dev.to this week, and their opening scene is this dead end. An open bucket, an open route, and no address anywhere.

Unreported bugs live longer than you would guess. CVE-2026-137898 stayed invisible to SSH banners, so the scanners most people lean on reported nothing while it sat in plain sight. A reporting channel does not find bugs. It decides who finds out first, and how politely.

What security.txt fixes

The standard is a single file at a fixed path: https://yourdomain.com/.well-known/security.txt, served over HTTPS as plain text. The /.well-known/ prefix comes from RFC 8615, the same registry that gives you WebFinger and the ACME challenge paths. Two fields are mandatory. Contact carries a mailto: address or a form link you actually read. Expires is a future timestamp, and the convention is to keep it under a year out, since a stale file tells the researcher you are not reading the inbox either. Canonical, Preferred-Languages, and a link to your disclosure policy are optional, and the first earns its place when the site answers on more than one domain. Skip the Hiring field; a job ad at the top of a disclosure file reads as tone-deaf.

Contact: mailto:security@example.com
Expires: 2027-12-31T23:59:59.000Z
Preferred-Languages: en
Canonical: https://example.com/.well-known/security.txt

That is the whole file.

Encryption can point at a PGP key. Researchers carrying something valuable will use it; their first mail to a stranger is itself a disclosure. Tools that read the file will follow redirects, but they expect text and they expect the path to be exact, which brings up the mistake almost every generated app makes.

Why the scaffold never adds one

Privacy policies exist in every template because app stores and payment processors demand them. Nothing demands a security contact. So no template ships one, and a generated app is only as complete as its template, which is why every builder produces the same gap by default. Lovable, Bolt, Replit, and v0 all produce different stacks, and none of the scaffolds I have looked at asks for a security contact during setup. The person writing the prompt is thinking about the demo path. Playing attacker is a different job, and nothing in the loop assigns it.

This is not a toy-project problem, either. Claude Code secrets leaking through an allowlist was shipped, working tooling with a real exposure nobody had picked up as their job. The stack is the same shape: generation gets you to working fast, and the adversarial half of the checklist never runs. The channel is the cheapest line item on that half.

There is a plumbing reason the file goes missing, too. Build artifacts regenerate on each deploy, and whatever somebody uploaded to the hosting root gets wiped the first time the pipeline runs clean. It belongs in the repo next to the index.html it has to survive, versioned like any other config.

The single-page app rewrite trap

Almost every generated frontend is a single-page app, and SPA hosts push unknown paths to index.html. Request /.well-known/security.txt and you get a 200 with your HTML shell. The file exists, technically. No tool accepts it, because the standard means text and the host answered with a page. The fix is a hosting-level exception: in nginx, an exact-match location block that wins over try_files; on Netlify, an explicit entry above the catch-all in _redirects; Vercel wants the same exception in its rewrites. Redirects are allowed, but follow the chain once; a redirect landing on the login page helps nobody. Check the response headers, not the browser. The tell is a Content-Type of text/html where three lines of text were expected. text/plain or nothing.

The inbox is the control

A file nobody reads is worse than no file; it advertises a promise. Before the first report lands, decide who answers, how fast, and what the opening reply says. An acknowledgement inside a day helps. A plain “we have it, we will come back to you” helps more. That is the entire process at most small teams, and pretending to run a process you do not have shows up in the first exchange anyway.

LINKMASK39

The file is discoverability. The inbox is the control. Ship the file without the habit and you have printed a promise nobody is keeping.

LINKMASK40

When something lands badly, the write-up matters as much as the patch. The 1Password breach disclosure sorted what leaked from what didn’t, line by line. That is the register to aim for. You get there by treating the inbox as real months before anything arrives, not by improvising the reply the morning a report shows up.

The boring failure is expiry. Put the renewal in a calendar with the same seriousness as a certificate deadline; both are promises with dates. An alias that forwards to three people with no owner is how reports die politely. A noreply address on a Contact line is worse than a 404; at least the 404 does not pretend.

Where reports can go instead

security.txt plus a watched mailbox is not the only shape a working disclosure channel takes. For a small team, the honest comparison:

ChannelWhat a researcher can do with itWhat it costs you
security.txt and a watched mailboxFind it in seconds, send a private report with reproduction stepsA mailbox and an hour spent writing a policy
A web form with ticket numbersUse it reluctantly; many assume reports vanish into itLittle money, real triage discipline to be worth anything
A bug bounty platformUse it, if your scope is listedFees and scope decisions; sensible once volume justifies it
NothingPost publicly, sell quietly, or walk awayYou choose last, and you choose in public

Bounty platforms earn their cut when you expect volume and want triage handled; for a two-person app they are overkill. A form with a ticket number sits in the middle: better than nothing, weaker than email, since researchers assume forms evaporate. What never works is the channel that exists on paper only.

Check your deploys in thirty seconds

Open https://yourdomain.com/.well-known/security.txt on every app you own, or run curl -I against it and read the content type. A 404 means nobody can reach you. A 200 with text/html means the SPA fallback ate the path. A 200 with text/plain and an unexpired date means a researcher can at least start a conversation, which is more than most of the AI-built web can say. Include the app you generated in an afternoon; those are the ones most likely wide open. The first two failures are a file and a hosting rule, not a project.

Press ⌘K to search & switch themes