From ae7536481cbd4d8f90fb5a04d9a4d54f59a94bb7 Mon Sep 17 00:00:00 2001 From: Yusuke Hirao Date: Fri, 31 Jul 2026 16:08:33 +0900 Subject: [PATCH] fix(repo): forbid client info from leaking into PR body The PR skill's full-diff re-check only replayed the sample-value convention check, skipping the confidential/client-info check defined in the git skill. PR body generation also had no rule against summarizing session context, so client names could leak in even when the diff itself was clean. --- .claude/skills/pr/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude/skills/pr/SKILL.md b/.claude/skills/pr/SKILL.md index 4fe4b265..afcebd42 100644 --- a/.claude/skills/pr/SKILL.md +++ b/.claude/skills/pr/SKILL.md @@ -12,8 +12,8 @@ disable-model-invocation: true - 全てがパスしなければならない。失敗があれば続行前に修正する。 - **`yarn lint` が prettier で意図しない再整形を出した場合は要注意**: コミット済みの整形と食い違う差分は prettier のバージョン差異による drift の可能性がある。自分の変更と無関係な再整形は取り込まず、ユーザーに報告する。 4. 適切な `git` コマンドを使って現在のトピックブランチの変更をレビューする。 - - **サンプル慣例のダブルチェック**: base branch との全 diff(`git diff origin/dev...HEAD`)に対して、`.claude/skills/git/SKILL.md` の「サンプル値の慣例チェック」を再実行する。コミット単位のチェックをすり抜けた実在ドメイン・未取得ドメイン・案件識別子・実データ断片がないかを PR 全体で確認する。検出したら汎用値へ書き換えて追加コミットする。 -5. **PR body を一時ファイルに保存する**: scratchpad ディレクトリに PR body(markdown)を書き出す。タイトルは英語、本文は日本語で書く。 + - **機密・案件情報とサンプル慣例のダブルチェック**: base branch との全 diff(`git diff origin/dev...HEAD`)に対して、`.claude/skills/git/SKILL.md` の「機密・案件情報の検出」と「サンプル値の慣例チェック」を再実行する。コミット単位のチェックをすり抜けた企業名・顧客情報・実在ドメイン・未取得ドメイン・案件識別子・実データ断片がないかを PR 全体で確認する。検出したら汎用値へ書き換えて追加コミットする。 +5. **PR body を一時ファイルに保存する**: scratchpad ディレクトリに PR body(markdown)を書き出す。タイトルは英語、本文は日本語で書く。**PR body は diff の要約であり会話の要約ではない** — セッション中に出てきた顧客名・案件名・社外秘情報は、diff 自体に含まれていない限り書き込まない。 6. **push と PR 作成はユーザーが実行する**: エージェントは `git push` / `gh pr create` を実行せず(`.claude/settings.json` で deny されている)、ユーザーがそのまま実行できる `!` 付きコマンドを提示する。ファイルパス引数は必ずダブルクオーテーションで囲む。 ```