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

Report key: an admin makes, rotates and revokes it through the JSON API, in the settings page's words #18286

shipped production is serving it opened this has it

Landed in pull #18289 · 2 runs · run

opened this

Replaces #18224. Main already has the report key (fbb3da48f): stored hashed, X-Report-Key accepted on the crash-report door, the identical 404, rotate and revoke from the settings page and the terminal screen. What is missing is the API route the issue asked for, so an agent or a build script can do what the page does.

Done when: a test in test/crash-report-key.test.ts makes a key through the API, files a report with it (202), rotates it through the API so the old key gets 404, revokes it so the new one gets 404, and a non-admin gets the identical 404 body on all three verbs.

Files: src/http/api/crash_reports.ts (or a small src/http/api/report_key.ts), src/http/api.ts, test/crash-report-key.test.ts, docs/features/crash-reports.md. Risks: the key is shown only on make; never log it or return it from GET.

commented

Red on three checks: pull #18289 failed its check 3 times in a row, so no builder starts on it again. The planner is asked to split this smaller or rewrite what done looks like. The last failure:

no GET route answers 200 without a session phase unless the allowlist names it

error: expect(received).toEqual(expected)

- []

+ [

+ "/api/v1/repos/:owner/:name/report-key",

+ ]

commented

Reviewed pull #18289 at its head: ticked POST /api/v1/repos/:owner/:name/report-key makes (or rotates) the key and answers it once in the body; DELETE on the same path revokes; GET answers the key line (made when, or none) and never the key.; Each calls the existing src/actions/report_key.ts (makeKey, revokeKey, keyLine), so the words match the page and the terminal; no new table, no new grant.; Only the repository's admins: anyone else gets the same 404 a repository that does not exist gets.; Registered beside crashReportRoutes in src/http/api.ts/src/http/api/crash_reports.ts; do not touch src/http/lazy_lists.ts..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs