Repository navigation
chore: Claude Code に機密ディレクトリの Read deny を追加 - #17
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Claude Code のツール権限設定(.claude/settings.json)に、機密情報が含まれやすいディレクトリ/コマンドへのアクセスを明示的に permissions.deny でブロックする設定を追加し、多層防御を強化する PR です。
Changes:
Read(~/.ssh/**),Read(~/.aws/**),Read(~/.config/gh/**)をpermissions.denyに追加- GitHub CLI トークン取得のための
gh auth token実行をpermissions.denyに追加(完全一致/ワイルドカードの両方)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
agent-skills プラグインの推奨設定に従い、Claude Code が機密情報(SSH 鍵・クラウド認証情報・GitHub CLI 認証情報・.env・GitHub トークン)へアクセスできないようにする deny 設定を追加します。
プラグインの block-exfiltration フックは Bash/Read の「形」で検知する ask/deny ですが、permissions の deny はツール層で確実にブロックできるため、多層防御として推奨されています(agent-skills の README 参照)。
変更内容
.claude/settings.jsonのpermissions.denyに以下を追加Read(~/.ssh/**)Read(~/.aws/**)Read(~/.config/gh/**)Bash(gh auth token)Bash(gh auth token *)Bash(gh auth status --show-token)Bash(gh auth status --show-token *)Bash(gh auth status *--show-token*)Bash(gh auth status -t)Bash(gh auth status -t *)Bash(gh auth status *-t*)Read(.env)は既に設定済みのため追加していない