- .claude/hooks/block-secrets.mjs: PreToolUse 훅으로 비밀값 파일 접근 하드 차단 (Read/Edit/Write + Bash cat/less 우회까지). example 파일은 허용. - .claude/settings.json: permissions.deny + 자주 쓰는 dev 명령 allow + 훅 연결 - CLAUDE.md: init 표준 헤더, 하네스 가드/아키텍처 섹션 추가 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
806 B
JSON
36 lines
806 B
JSON
{
|
|
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
"permissions": {
|
|
"deny": [
|
|
"Read(.project-env)",
|
|
"Read(.env)",
|
|
"Read(.env.*)",
|
|
"Read(//home/coder/.env)",
|
|
"Read(~/.env)"
|
|
],
|
|
"allow": [
|
|
"Bash(npm install)",
|
|
"Bash(npm run dev:*)",
|
|
"Bash(npm run start:*)",
|
|
"Bash(npm run db:check:*)",
|
|
"Bash(npm run minio:check:*)",
|
|
"Bash(npm run files:check:*)",
|
|
"Bash(podman build:*)",
|
|
"Bash(podman compose:*)"
|
|
]
|
|
},
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Read|Edit|Write|NotebookEdit|Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/block-secrets.mjs\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|