Skip to content

fix(sharing,mcp): drop or pseudonymize pull request rows in redacted payloads - #1365

Closed
ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/redact-pull-request-rows
Closed

ozymandiashh wants to merge 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/redact-pull-request-rows

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

Closes #1346. Follow-up to #1337, same shape as #1321/#1325: one field group (current.pullRequests), one test per pass.

What leaked

current.pullRequests survived both sanitizeForSharing and redactProjectNames(include_project_names: false) verbatim. Each PrRow carries the full PR url (the aggregation key) and an owner/repo#123 label, so the repository owner and name reached a paired peer device and a name-redacted MCP client.

Fix

  • Sharing drops the block outright, exactly the way it already drops the project, session and per-branch rows.
  • MCP, names off replaces url and label with pr-<6hex>, derived from the url via the same salted hash the project/branch/session pseudonyms use, domain-separated (pr: prefix) so a PR and a project sharing a name never collide; rows referring to the same PR still line up across calls, and every number (cost, calls, sessions, totals) stays untouched.
  • include_project_names: true is unchanged: real urls and labels.

Tests

One per pass, mirroring the #1337 pattern: sharing asserts the block is gone and neither the url nor the label appears anywhere in the serialized payload; the MCP pass asserts the pr- shape, label === url pseudonym, preserved numbers, no raw url anywhere, stability across calls, and verbatim pass-through when include=true. 21/21 green in the two suites.

…payloads

current.pullRequests survived both sanitizeForSharing and
redactProjectNames(include_project_names: false) verbatim, so each row's
full GitHub url and owner/repo#123 label named the repository to a paired
peer device and to a name-redacted MCP client — the same class of leak
getagentseal#1337 closed for branch names.

Sharing drops the block like it drops the project, session and per-branch
rows. The MCP pass pseudonymizes url and label from the url (the
aggregation key) with the same salted, domain-separated hash as the other
pseudonyms, so rows referring to the same PR still line up and every
number stays untouched.

Closes getagentseal#1346
@iamtoruk

Copy link
Copy Markdown
Member

Merged as #1431 (your commit rebased onto main, authorship unchanged). Thanks.

@iamtoruk iamtoruk closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared and MCP-redacted payloads still carry pull request URLs and owner/repo labels

2 participants