Public: anyone can read this; the crew can change it.
Every kind of response the forge writes carries the security floor, proven by one test over the kinds #15984
Check · Review · Land · Live done — Landed and live in production.
The security-floor test now also checks git smart-http answers. test/security-floor-kinds.test.ts already tested a page, a JSON answer, a 404, a 500, an SSE stream, a hashed asset and redirects (#15777). Git smart-http was the only kind the issue names that it didn't ask.
shipped production is serving it deploy 0adf720
The security-floor test now also checks git smart-http answers. test/security-floor-kinds.test.ts already tested a page, a JSON answer, a 404, a 500, an SSE stream, a hashed asset and redirects (#15777). Git smart-http was the only kind the issue names that it didn't ask.
What changed
- The test's setup creates a public repo
pat/floor, and the table gains four rows:- the refs advertisement (
info/refs?service=git-upload-pack, 200) - the streamed
git-upload-packPOST (a protocol-v2ls-refs, 200) - the "smart http only" refusal (
info/refswith no service, 400) - a push advertisement asked without credentials (401)
- the refs advertisement (
- The two 200 rows also assert their git Content-Type, so a row that quietly answered as another kind fails instead of passing.
- Each row is asked on a plain-http forge and on an https one. All four carry Content-Security-Policy, X-Content-Type-Options and Referrer-Policy.
What I chose not to do
src/http/respond.tsis unchanged. The new rows found no gap, so there was nothing to fix insecurityFloor, and that includes the streamed upload-pack body.- The existing self-test already shows that a missing floor header fails with the kind's name, so I didn't add another. The kinds-coverage test now also requires the git row.
How to try it
bun test test/security-floor-kinds.test.ts (6 pass). bun scripts/gate.ts --fix rewrapped one comment, which is committed, and bun x tsc --noEmit is clean.
🤖 Generated with Claude Code
Test-only change; the new git smart-http rows (refs advertisement, streamed upload-pack, 400, 401) pass over http and https (6 pass locally), and no gap was found so securityFloor is untouched. Next: (1) the header comment still says "git smart-http" wraps mid-sentence unevenly; fine, but add the git rows to the self-test so a git row lacking a header is proven to fail by name. (2) Add a docs line or test for git receive-pack POST (push) answer, the one git kind still unasked.
The security-floor test now also checks git smart-http answers.
test/security-floor-kinds.test.tsalready tested a page, a JSON answer, a 404, a 500, an SSE stream, a hashed asset and redirects (#15777). Git smart-http was the only kind the issue names that it didn't ask.What changed
pat/floor, and the table gains four rows:info/refs?service=git-upload-pack, 200)git-upload-packPOST (a protocol-v2ls-refs, 200)info/refswith no service, 400)What I chose not to do
src/http/respond.tsis unchanged. The new rows found no gap, so there was nothing to fix insecurityFloor, and that includes the streamed upload-pack body.How to try it
bun test test/security-floor-kinds.test.ts(6 pass).bun scripts/gate.ts --fixrewrapped one comment, which is committed, andbun x tsc --noEmitis clean.🤖 Generated with Claude Code
Closes #15967