# My static site was serving my internal engineering handoff doc to anyone

Original title: My static site was serving my internal docs

> Hacker News story 49994449 · language: en · submitted 2026-10-07
> Web version: https://zeli.app/story/49994449
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 9 · by [tminuslabs](<https://news.ycombinator.com/user?id=tminuslabs>) · 💬 8
[original](<https://tminuslabs.space/serving-secrets>) · [HN discussion](<https://news.ycombinator.com/item?id=49994449>)

## Summary

A static host published the repo root as the build output, so every committed file — including a 150 KB handoff doc with an admin bypass parameter and a schema hole — was a public URL. Two CDN purges silently failed because the stale copy lived in a different cache layer. The real fix was a server-side schema change, not rotating the exposed value, which had always been visible in view-source.

## Key quote

> The leaked document was never the exposure — view-source was, and it always would be, for whatever value I put there.

## HN discussion (8 comments)

### [gregglain](<https://news.ycombinator.com/item?id=50028514>)

> What about have the output directory outside the repo?

### [tminuslabs](<https://news.ycombinator.com/item?id=49994469>)

> Author here. Short version: my Cloudflare Pages build output directory was the repo root, so every committed file was a public URL, including a 150KB internal handoff doc and dot-directories like .claude/ and .github/. No credentials or customer data, but the doc described an admin query parameter that skipped checkout and an unfixed hole in my own schema.
>
> The parts I think are useful beyond my own mistake:
>
> \- Two "purge everything" runs did nothing. The headers showed cf-cache-status: DYNAMIC with an age that kept climbing, so the stale copy was in a layer the zone purge doesn't reach. The custom domain served the old file while the pages.dev domain served the clean one.
>
> \- A cache-busted request (?cb=random) tells you whether the origin is clean. It does not tell you whether a visitor can still fetch the file. I used it to "verify" the fix twice and was wrong both times.
>
> \- What actually closed it was a firewall rule on the path, which runs before cache.
>
> \- Rotating the leaked admin string bought almost nothing, because the check was client-side and the value was in the page source all along. The real fix was closing the server-side hole.
>
> Worth a minute: curl your own production domain for README.md, .git/config and your CI files with a plain request. Happy to answer questions.

---

## Cite

- Page: https://zeli.app/story/49994449
- Date: 2026-10-07
- Source: tminuslabs.space (https://tminuslabs.space/serving-secrets)
- Hacker News: https://news.ycombinator.com/item?id=49994449

## Other languages

- ja: https://zeli.app/ja/story/49994449 · markdown: https://zeli.app/ja/story/49994449.md
- ko: https://zeli.app/ko/story/49994449 · markdown: https://zeli.app/ko/story/49994449.md
- de: https://zeli.app/de/story/49994449 · markdown: https://zeli.app/de/story/49994449.md
- es: https://zeli.app/es/story/49994449 · markdown: https://zeli.app/es/story/49994449.md
- ru: https://zeli.app/ru/story/49994449 · markdown: https://zeli.app/ru/story/49994449.md
