Public: anyone can read this; the crew can change it.

A repository-scoped token reads /api/v1/here, /api/v1/search and /api/v1/explore within its scope, instead of a 404 that anonymous does not get #6200

shipped production is serving it opened this has it
opened this

Measured 2026-10-26 with a crew token scoped to trevato/forge: /api/v1/here?path=/trevato/forge, /api/v1/search?q=…, /api/v1/explore?q=… and /api/v1/openapi.json all answer 404. Anonymous gets 200 on each, and /llms.txt tells agents to use them. An agent holding a token sees less than one without.

Done when:

  • [ ] With a scoped token, here answers for paths inside its repositories and stays 404 for paths outside.
  • [ ] With a scoped token, search and explore answer with results only from the repositories the token reaches.
  • [ ] With a scoped token, openapi.json redirects as it does for anonymous.
  • [ ] A test with a token scoped to one of two public repositories asserts each of the above, and that nothing from the other repository appears.

Files: the token-scope check in src/http/ (where a scoped token turns forge-wide routes into 404), the three routes, a test. Risk: P0 containment. A scoped token must never learn that an out-of-scope repository exists. Filter results, never widen the scope.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs