Skip to content

ci: fail pull requests whose text carries personal or support details - #8891

Merged
jbecke merged 3 commits into
mainfrom
claude/confident-babbage-zbll9y
Oct 27, 2026
Merged

jbecke merged 3 commits into
mainfrom
claude/confident-babbage-zbll9y

Conversation

@jbecke

@jbecke jbecke commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Why

PR titles, bodies, and commit messages are public, and recent ones carried
personal contact details and links into support conversations. Agents also
followed the PR template's prompt to describe "the user request", which pulls
requesters and channels into the description. Pull request text should
describe the code change only, with any reason stated in general terms.

How it works

PR opened / edited / pushed
  -> PR Privacy Check (skips Dependabot)
       scan title, body, every commit message
         emails, phone numbers, @mentions, chat-channel names,
         support-tool links, Macro workspace item links (tasks allowed)
       any hit -> job fails, listing each match

Mentions and channel names are only matched outside code spans and fences,
where decorators, CSS colors, and shell comments look alike. Emails, phone
numbers, and links are matched everywhere. Names of people and customers
can't be matched by a pattern; the docs and reviewers cover those.

What

  • tooling/xtask/crates/xtask_workflows: new pr_privacy_check workflow
    module and its script, generated to .github/workflows/pr-privacy-check.yml.
    Title and body reach the script through env vars; commits come from the PR
    API, so there is no checkout. It runs on edited, so fixing the description
    clears it.
  • just pr-privacy [body-file] runs the same script on the branch's commits
    and, with PR_TITLE set, a draft title and body.
  • .agents/skills/git/SKILL.md: a Privacy section covering what never goes
    into PR text, commits, comments, docs, or fixtures, with how to phrase the
    reason instead. The PR template's Why no longer asks for the user request.
  • CLAUDE.md: a one-line guardrail pointing at the Privacy section.
  • .agents/skills/audit/SKILL.md: the audit runs just pr-privacy and
    rereads PR text against the Privacy section.
  • CONTRIBUTING.md: the same rule for human contributors.

Follow-ups

  • Mark PR Privacy Check as a required status check in branch protection;
    until then it reports but does not block merging.

Generated by Claude Code

Why: PR titles, bodies, and commit messages are public, and recent ones
included contact details and links to support conversations. A check
catches what a pattern can see before review.

What: a PR Privacy Check workflow, generated from xtask_workflows, scans
the PR title, body, and commit messages for emails, phone numbers,
@mentions, chat-channel names, and support-tool or workspace item links.
It re-runs on edits and skips Dependabot. `just pr-privacy` runs the
same script locally.
Why: agents wrote people, customers, and support channels into PR
descriptions as evidence. Pull request text should describe only the
code, with any reason stated in general terms.

What: a Privacy section in the git skill, a guardrail in CLAUDE.md, an
audit check that runs `just pr-privacy`, and the same note for human
contributors in CONTRIBUTING.md.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jbecke
jbecke enabled auto-merge (squash) October 27, 2026 15:01
@jbecke
jbecke merged commit 020947b into main Oct 27, 2026
29 of 30 checks passed
@jbecke
jbecke deleted the claude/confident-babbage-zbll9y branch October 27, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants