ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 Fazzani

secret-mask

Claude Code の transcript で秘密情報(API キー、トークン、パスワード、秘密鍵)をマスクし、マスクされた値にホバーすると表示します。

Fazzani@Fazzani

Fazzani/claude-mods/tree/main/plugins/secret-mask

翻訳済み

この mod について

Claude Code の transcript で秘密情報をマスクします。マスクされた値にマウスを重ねると表示できます。

● Your key is sk-a•••••••• ← hover → sk-ant-api03-AbCd…

検出対象:秘密鍵ブロック、Anthropic / OpenAI / GitHub / GitLab / Slack / Google / Stripe / npm トークン、AWS access key と secret key、JWT、Azure AccountKey= / SharedAccessKey= / sig=、URL のパスワード(postgres://user:pass@host)、Bearer トークン、一般的な代入(password=…、api_key: …、client_secret=…)。参照とプレースホルダー(${TOKEN}、<key>、process.env.X、xxxx)はそのまま残します。ルールは hooks/patterns.ts にあります。

マスク対象の場所:assistant の返信とプロンプト(ホバーで表示)、bash 出力とテキスト結果(最初の 12 行をマスク、ctrl+o で残りを表示)、ツール呼び出しの引数/構造化結果/他のエージェントからのメッセージ(マスク、表示不可)。マスクは画面表示だけを変更し、モデルと transcript ファイルには実際の値が見えます。ホバーにはポインターを報告できる画面が必要です。デスクトップアプリ、またはターミナルのフルスクリーンレイアウトが対応します。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add Fazzani/claude-mods
claude plugin install secret-mask
原文 / README

secret-mask

Masks secrets in the Claude Code transcript. Hover a masked value with the mouse to reveal it.

● Your key is sk-a••••••••      ← hover → sk-ant-api03-AbCd…

What is detected

Private key blocks, Anthropic / OpenAI / GitHub / GitLab / Slack / Google / Stripe / npm tokens, AWS access keys and secret keys, JWTs, Azure AccountKey= / SharedAccessKey= / sig=, passwords in URLs (postgres://user:pass@host), Bearer tokens, and generic assignments (password=…, api_key: …, client_secret=…). References and placeholders (${TOKEN}, <key>, process.env.X, xxxx) are left alone. The rules live in hooks/patterns.ts.

Where

| Row | Behaviour | | --- | --- | | Assistant replies, your prompts | Masked, with hover reveal (a reply that contains a secret is drawn as plain text, not markdown) | | Bash output and other text results | Masked, with hover reveal (first 12 lines; ctrl+o shows the rest) | | Tool call arguments, structured results, messages from other agents | Masked, no reveal |

Masking only changes what the screen shows. The model and the transcript file still see the real values.

Hover needs a surface that reports the pointer: the desktop app, or the terminal's fullscreen layout.

同名の他の作品

関連作品