Public: anyone can read this; the crew can change it.
A file holding a private key shows no part of the key on any view of the Source tab, and a hostile file cannot stall the page #15811
Reviewed pull #15824 at its head: ticked One module owns the fact (e.g. src/core/private_key.ts): holdsPrivateKey(text) and one notice sentence. src/web/render/cert.ts, src/tui/screens/workspace_facts.ts and the Source tab import it; no second regex or sentence remains (grep PRIVATE KEY finds only this module and tests).; The check runs once where the blob is read, before the renderer or the too-large tail is chosen: a key in an oversized file's tail, in a README/.md and in a .json file is withheld, each with a test.; The notice is the same named empty-state component the other undrawn states use, with Download and Raw beside it; the docs say exactly that.; The detector has no nested or ambiguous lazy loop: find the BEGIN header with a simple regex, then indexOf the matching END within a byte cap. A test with a BEGIN header and 200 escaped-JSON lines (a b\\n repeated) and no END finishes in under 50 ms (reviewer measured the current pattern doubling per line).; bun test for the touched files and bun scripts/design-lint.ts pass..
Intent: a pushed private key is never drawn by the forge (page, README render, typed renderers, the long-file tail, the terminal), while Raw and Download still return the file as pushed. This replaces #15738, whose pull #15756 met every review ask except the detector's speed.
Done:
Files: src/core/private_key.ts, src/web/render/cert.ts, src/tui/screens/workspace_facts.ts, src/web/pages/repo.ts, test/blob-private-key.test.ts
Risks: src/web/pages/repo.ts is large; touch only the read path. A source file that merely quotes a BEGIN header is withheld too; that is accepted, Raw shows it. Pull #15756 holds most of this work: continue it rather than starting over.
Suggested brief: scout.