Repository navigation
Send the PR title with the verify request - #70
Conversation
The approval page shows a request's title from the request row when PP cannot read the pull request itself (no GitHub App access to the repository in that workspace). The verify route has accepted an optional prTitle for a while; this action never sent one, so those pages fell back to "Authorize production deploy" with no description, even for a PR with a full title. The title reaches the script through env, never interpolated into it, since a PR title is attacker-controlled text, and reaches jq through --arg. PP accepts at most 300 characters and rejects null, so the value is trimmed to 300 and the key is left out when the title is empty. Checked locally with jq: a title with quotes and a newline round-trips as a JSON string; an empty title omits the key; a 400-character title is sent as 300. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🔒 Permission Protocol
Approval briefAffected flow: Permission Protocol approval page display for pull requests. Why this change: The approval page shows a generic title when Permission Protocol lacks GitHub App access to read the pull request directly. What changes for users/operators: The PR title is now sent during verification, allowing the approval page to display the actual PR title instead of a generic fallback. Blast radius:
|
|
✅ Permission Protocol: Approved |
PP rejects a prTitle longer than 300 UTF-16 units. The first version cut at 300 code points, and an emoji counts as two units, so a long emoji-heavy title could exceed the limit and fail the gate closed with a validation error. The title is now cut to 300 code points when every code point is a single unit, else to 150 (at most two units each). test/run-tests.sh (from #69) now covers the title: quotes, a newline and a $(...) round-trip as a JSON string without being run; an empty title omits the key; a long ASCII title is cut to 300; a 200-emoji title is cut to 150 code points, 300 UTF-16 units; a push-mode deploy sends no title. Reverting to the code-point cap fails the emoji case. 77 passed locally (bash 3.2, jq 1.7.1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
The PP approval page shows a request's title from the request row when PP cannot read the pull request itself (no GitHub App access to the repository in that workspace).
POST /api/v1/receipts/verifyhas accepted an optionalprTitlefor a while (normalizePrTitle, schemaz.string().max(300).optional()); this action never sent one, so those pages fell back to "Authorize production deploy" with no description, even for a PR with a full title and body (seen on this repo's #69).One env entry and one jq argument:
PP_PR_TITLE: ${{ github.event.pull_request.title }}in the step'senv, never interpolated into therun:script, since a PR title is attacker-controlled text.--arg prTitle "${PP_PR_TITLE:-}", and the body gainsprTitle, or no key at all when the title is empty (the schema rejectsnull). PP accepts at most 300 UTF-16 units, so the title is cut to 300 code points when each is a single unit, else 150 (an emoji is two units). An over-long title must not fail the gate closed.No behaviour change for the gate decision; the verify route ignores the field for anything but the request row.
Checked
test/run-tests.sh(the harness that landed with #69, merged into this branch) runs the action's real script with stubbedghandcurland inspects the exact body sent to PP. New cases:$(...)round-trips as a JSON string and is never executed;77 passed locally (bash 3.2, jq 1.7.1). Reverting to a plain 300-code-point cut fails the emoji case. The repo's own gate on this PR fails closed until the request is signed, as intended.
🤖 Generated with Claude Code