🔥 この記事の詳細
2026-11-07 更新
B
今週中

AnthropicのAIコーディングアシスタント「Claude Code」において、ユーザーがコマンド実行時に「Yes, and don't ask…

脆弱性🌐 英語ソース📰 3記事🌐 3 countries
🇩🇪 Germany · 🇮🇳 India · 🇺🇸 US
🖥️ 製品GitHub
📅 2026-11-07📰 hackernews
📌 一言でいうと
AnthropicのAIコーディングアシスタント「Claude Code」において、ユーザーがコマンド実行時に「Yes, and don't ask again」を選択すると、パスワードやAPIキーを含むコマンドが設定ファイル(.claude/settings.local.json)に保存される問題が判明しました。Apiiro社の調査により、GitHub上の公開リポジトリで1,122件の同様のファイルが検出されており、機密情報が漏洩している可能性があります。一度Git履歴に保存されるとファイルの削除だけでは不十分なため、影響を受けたユーザーは速やかなシークレットのローテーションが推奨されています。
🔍該当判定
  • 開発者が AI ツール「Claude Code」を導入して利用している
  • Claude Code の実行時に「Yes, and don't ask again」を選択してコマンドを承認したことがある
  • プロジェクト内の「.claude/settings.local.json」ファイルを GitHub などの公開リポジトリにアップロード(push)した
上記いずれにも該当しない → 静観でOK
✅該当時の対応
1. .claude/settings.local.json ファイルに機密情報が含まれていないか確認する。 2. 漏洩の可能性があるすべてのパスワード、トークン、APIキーを直ちに更新(ローテーション)する。 3. .claude/settings.local.json を .gitignore に追加し、リポジトリにコミットされないように設定する。
📧 メール案を見る (管理者向け)
⚠️ これは AI が生成した参考例です。配信前に必ず内容をご確認のうえ、貴社の状況に合わせて編集してご利用ください。実際の被害状況や自社の利用環境を踏まえた判断は、貴社のセキュリティ責任者にご確認ください。
件名: 【共有】Claude Code による機密情報漏洩リスクへの対応について

お疲れさまです。Claude Codeに関する情報共有です。

■ 概要
AnthropicのAIツール「Claude Code」において、コマンド実行時の承認設定(Don't ask again)を有効にすると、コマンドに含まれるAPIキーやパスワードが設定ファイル(.claude/settings.local.json)に平文で保存される挙動が確認されました。これらのファイルがGitHubの公開リポジトリにプッシュされ、多くの機密情報が露出している事例が報告されています。

■ 影響範囲
- Claude Code を利用している開発環境
- .claude/settings.local.json をリポジトリに含めて公開したプロジェクト

■ 対応手順
1. 開発チームに対し、.claude/settings.local.json が公開リポジトリに含まれていないか確認を指示してください。
2. 該当ファイルに機密情報が含まれていた場合、直ちに当該キーやパスワードを無効化し、再発行(ローテーション)させてください。
3. Git履歴に記録が残っているため、ファイルの削除だけでなく、シークレット自体の変更が必須となります。
4. 今後の再発防止のため、.gitignore への追加を徹底させてください。

■ 参考情報
- Apiiro Security Research

対応優先度: 高
対応期限: 直ちに
Subject: [Security Alert] Secret Exposure via Claude Code Settings File

Hi team,

We are sharing critical information regarding a secret exposure risk associated with Anthropic's Claude Code.

■ Overview
It has been discovered that when users select "Yes, and don't ask again" for shell commands in Claude Code, the tool saves the exact command—including any embedded passwords or API keys—into the `.claude/settings.local.json` file. Many of these files have been leaked to public GitHub repositories.

■ Scope
- Development environments using Claude Code.
- Projects where `.claude/settings.local.json` was committed to public version control.

■ Action Plan
1. Audit public repositories for the presence of `.claude/settings.local.json`.
2. If secrets are found, immediately rotate all affected API keys, tokens, and passwords. Note that deleting the file is insufficient as secrets remain in Git history.
3. Ensure `.claude/settings.local.json` is added to `.gitignore` across all projects to prevent future leaks.

■ Reference
- Apiiro Security Research

Priority: High
Deadline: Immediate