làm tíai?GitHub ↗
CHƯƠNG 06 / 16

Permissions và sandboxing

Giới hạn quyền, bảo vệ secret và cô lập thao tác để Claude Code làm việc an toàn.

17 phút đọc

Claude Code cân bằng giữa sức mạnh và an toàn bằng hai lớp bổ sung cho nhau: permissions (kiểm soát Claude được dùng tool nào, đụng file/domain nào) và sandboxing (cưỡng chế ở tầng OS những gì Bash command chạm tới). Chương này là tài liệu tra cứu về rule syntax, permission modes, sandbox và security best practices.

6.1. Permission system tổng quan

Claude Code dùng permission system phân tầng:

Tool typeVí dụCần approval?"Yes, don't ask again"
Read-onlyFile reads, GrepKhông, trong working directory và additional directoriesN/A
Bash commandsShell executionCó, trừ tập built-in read-only commandsLưu vĩnh viễn per-repo và per-command
File modificationEdit/write filesĐến hết session

Khi chọn "Yes, don't ask again" cho một Bash command, rule được lưu vào .claude/settings.local.json ở gốc git repository (resolve qua worktrees về main checkout), áp dụng cho mọi session sau trong repo đó. File-modification approval KHÔNG được lưu vào file — chỉ kéo dài đến hết session.

Trên prompt Bash/PowerShell, nhấn Ctrl+E để xem giải thích command: nó làm gì, vì sao Claude chạy, rủi ro (Low/Med/High risk). Việc này chỉ gọi model khi bạn nhấn Ctrl+E, không chạy command. Tắt bằng permissionExplainerEnabled: false trong ~/.claude.json.

Quan trọng: Permission rules do Claude Code cưỡng chế, KHÔNG phải model. Instruction trong prompt hay CLAUDE.md định hình những gì Claude cố làm, nhưng không thay đổi những gì Claude Code cho phép.

6.2. Allow / Ask / Deny rules

Quản lý permission bằng /permissions (liệt kê mọi rule và file settings.json nguồn của nó).

  • Allow: dùng tool không cần approve thủ công.
  • Ask: luôn hỏi xác nhận khi dùng tool đó.
  • Deny: chặn hoàn toàn.

Thứ tự đánh giá (precedence)

Rule được đánh giá theo thứ tự: deny → ask → allow. Match đầu tiên theo thứ tự này quyết định kết quả; độ cụ thể của rule KHÔNG đổi thứ tự.

  • Một deny rule rộng như Bash(aws *) chặn mọi call khớp, kể cả call cũng khớp allow rule hẹp hơn như Bash(aws s3 ls). Deny rule không mang "exception".
  • Ask rule cũng thắng allow rule: Bash(git push *) (ask) vẫn hỏi dù có allow rule cụ thể hơn.

Deny rule hành xử khác nhau tùy dạng:

  • Tên tool trần như Bash (deny) → gỡ tool khỏi context của Claude, Claude không bao giờ thấy nó.
  • Rule có scope như Bash(rm *) → giữ tool khả dụng, chỉ chặn call khớp khi Claude cố dùng.

Settings precedence (theo scope)

  1. Managed settings — không thể override bởi bất kỳ level nào, kể cả CLI args
  2. Command line arguments — override tạm cho session
  3. Local project settings (.claude/settings.local.json)
  4. Shared project settings (.claude/settings.json)
  5. User settings (~/.claude/settings.json)

Nếu một tool bị deny ở BẤT KỲ level nào, không level nào allow lại được. Deny từ mọi scope luôn được đánh giá trước allow.

6.3. Permission rule syntax

Rule theo dạng Tool hoặc Tool(specifier).

RuleHiệu lực
BashMọi Bash command (Bash(*) tương đương)
Bash(npm run build)Đúng command npm run build
Read(./.env)Đọc file .env ở thư mục hiện tại
WebFetch(domain:example.com)Fetch tới example.com

Match theo input parameter

Deny và ask rule có thể match một top-level input parameter bất kỳ: Tool(param:value). Allow rule thì vẫn dùng specifier syntax riêng của mỗi tool (vì allow một giá trị param không chứng minh call an toàn tổng thể).

RuleMatch
Agent(model:opus)Agent call yêu cầu tier Opus
Agent(isolation:worktree)Agent call yêu cầu git worktree
Bash(run_in_background:true)Bash call chạy background

Lưu ý: mỗi rule một param; * là wildcard (Agent(isolation:*)); param bị model bỏ trống thì không match. Các field đã có canonicalizing riêng (command của Bash, file_path của Read/Edit/Write, url của WebFetch...) KHÔNG match được kiểu này — Bash(command:rm *) bị bỏ qua kèm warning; dùng Bash(rm *).

Wildcard trong Bash

* xuất hiện ở bất kỳ vị trí nào. Khoảng trắng trước * tạo ranh giới từ:

{
  "permissions": {
    "allow": [
      "Bash(npm run *)",
      "Bash(git commit *)",
      "Bash(git * main)",
      "Bash(* --version)"
    ],
    "deny": [
      "Bash(git push *)"
    ]
  }
}
  • Bash(ls *) khớp ls -la nhưng KHÔNG khớp lsof; Bash(ls*) khớp cả hai.
  • Hậu tố :* tương đương * ở cuối: Bash(ls:*) = Bash(ls *).

Tool name wildcards

Deny/ask rule chấp nhận glob ở vị trí tên tool (phải match full tên): "*" match mọi tool, "mcp__*" match mọi MCP tool.

{ "permissions": { "deny": ["mcp__*"] } }

Allow rule chỉ chấp nhận tool-name glob SAU tiền tố literal mcp__<server>__: mcp__puppeteer__* hợp lệ; "*" hay "mcp__*" bị bỏ qua kèm warning.

Compound commands & process wrappers

  • Claude Code hiểu shell operator: Bash(safe-cmd *) KHÔNG cho phép safe-cmd && other-cmd. Separator: &&, ||, ;, |, |&, &, và newline. Mỗi subcommand phải match độc lập.
  • Strip sẵn wrapper: timeout, time, nice, nohup, stdbuf, và xargs không có flag. Nên Bash(npm test *) khớp timeout 30 npm test.
  • Environment runner như devbox run, npx, docker exec KHÔNG bị strip: Bash(devbox run *) khớp cả devbox run rm -rf .. Viết rule cụ thể: Bash(devbox run npm test).

Read-only commands

Tập built-in đọc-only chạy không cần prompt ở MỌI mode: ls, cat, echo, pwd, head, tail, grep, find, wc, which, diff, stat, du, cd, và các dạng read-only của git. Tập này không cấu hình được; muốn buộc prompt cho một cái, thêm ask/deny rule.

Read và Edit (gitignore semantics)

Edit rule áp cho mọi tool sửa file. Read deny rule cũng chặn Edit tool trên cùng path. Read/Edit rule dùng 4 kiểu pattern anchor:

PatternÝ nghĩaVí dụ
//pathAbsolute từ filesystem rootRead(//Users/alice/secrets/**)
~/pathTừ home directoryRead(~/Documents/*.pdf)
/pathRelative tới settings sourceEdit(/src/**/*.ts)
path / ./pathRelative tới current directoryRead(*.env)

Bẫy: /Users/alice/file KHÔNG phải absolute — dấu / đầu anchor vào settings source, không phải filesystem root. Dùng //Users/alice/file cho absolute path.

Bare filename theo gitignore, match ở mọi độ sâu: Read(.env) = Read(**/.env). Với symlink, allow rule cần cả symlink lẫn target khớp; deny rule chặn nếu một trong hai khớp.

Read/Edit deny rule áp cho built-in file tools và các file command Claude Code nhận diện trong Bash (cat, head, sed...), nhưng KHÔNG áp cho subprocess đọc/ghi file gián tiếp (script Python/Node tự mở file). Muốn cưỡng chế ở tầng OS chặn mọi process, hãy bật sandbox.

WebFetch, MCP, Agent, Cd

  • WebFetch(domain:*.example.com) match subdomain mọi cấp nhưng không match example.com chính nó. WebFetch(domain:*) = bare WebFetch.
  • MCP: mcp__puppeteer (mọi tool của server), mcp__puppeteer__puppeteer_navigate (tool cụ thể).
  • Agent(Explore) — kiểm soát subagent. Deny để tắt: { "permissions": { "deny": ["Agent(Explore)"] } }.
  • Cd(...) — kiểm soát đích của lệnh /cd (không phải model-invocable). Thêm bất kỳ Cd allow rule nào sẽ bật allowlist mode cho /cd.

6.4. Permission modes

Set defaultMode trong settings file, hoặc --permission-mode khi khởi động, hoặc cycle bằng Shift+Tab (CLI): default → acceptEdits → plan.

ModeChạy không hỏiDùng cho
default (Manual)Chỉ readsBắt đầu, việc nhạy cảm
acceptEditsReads, file edits, và filesystem commands (mkdir,touch,mv,cp,rm,sed) trong scopeIterate trên code đang review
planChỉ readsKhám phá codebase trước khi sửa
autoMọi thứ, có background safety check (classifier)Task dài, giảm prompt fatigue
dontAskChỉ tool đã pre-approveCI/scripts bị khóa chặt
bypassPermissionsMọi thứChỉ container/VM cô lập

default được gán nhãn Manual trong CLI/VS Code/JetBrains/desktop (từ v2.1.200), với alias manual.

acceptEdits

Tự accept tạo/sửa file trong working directory hoặc additionalDirectories, cộng các filesystem Bash command mkdir, touch, rm, rmdir, mv, cp, sed. Path ngoài scope, ghi vào protected paths, và mọi Bash command khác (ngoài read-only set) vẫn prompt.

plan mode

Claude research và đề xuất thay đổi mà không thực hiện: đọc file, chạy read-only shell command, viết plan, nhưng không sửa source. Command ngoài read-only set (kể cả touch, rm) vẫn prompt. Vào bằng Shift+Tab hoặc prefix /plan. Khi plan xong Claude hỏi cách tiếp tục (auto mode / manually approve / keep planning...). Ctrl+G để mở plan trong editor.

auto mode

Thay prompt bằng một classifier model riêng review action trước khi chạy, chặn thứ vượt request, nhắm hạ tầng lạ, hoặc bị hostile content điều khiển. Explicit ask rule vẫn buộc prompt.

Yêu cầu: mọi plan; trên Team/Enterprise cần Owner bật; model đủ mới (Opus 4.6+/Sonnet 4.6+/Fable 5 trên Anthropic API; hoặc Sonnet 5, Opus 4.7/4.8, Fable 5 trên Bedrock/Foundry/Agent Platform). defaultMode: "auto" trong .claude/settings.json bị bỏ qua — phải đặt ở ~/.claude/settings.json.

Chặn mặc định gồm: curl | bash, gửi dữ liệu nhạy cảm ra ngoài, production deploy/migration, mass deletion, cấp IAM, force push, git reset --hard, terraform destroy, commit/push làm rò rỉ secret... Chạy claude auto-mode defaults để in full rule dạng JSON. Cho phép mặc định: file op trong working dir, cài dependency từ lockfile, đọc .env và gửi credential tới API tương ứng, read-only HTTP, push tới nhánh bất kỳ của repo đang làm.

Boundary trong hội thoại: nếu bạn nói "đừng push" hay "chờ tôi review", classifier chặn action khớp cho đến khi bạn gỡ ở message sau. Boundary không lưu thành rule (re-đọc từ transcript mỗi lần), có thể mất khi context compaction — muốn đảm bảo cứng, dùng deny rule.

Fallback: mỗi denied action hiện notification, xuất hiện ở tab Recently denied trong /permissions (nhấn r để retry với manual approval). Bị chặn 3 lần liên tiếp hoặc 20 lần tổng → auto mode tạm dừng, quay lại prompt.

Classifier chạy trên Sonnet 5 mặc định, thấy user message + tool call + CLAUDE.md, nhưng tool result bị strip (hostile content trong file/web không thao túng trực tiếp được).

dontAsk

Auto-deny mọi tool call vốn sẽ prompt. Claude chỉ chạy action khớp permissions.allow, read-only Bash command, và call được PreToolUse hook approve. Dùng cho CI/môi trường hạn chế; session không bao giờ chờ input. Deny cả AskUserQuestion dù allow rule khớp.

bypassPermissions

Tắt prompt và safety check, kể cả ghi protected paths. Chỉ dùng trong container/VM cô lập. Vẫn còn: explicit ask rule, connector tool org set ask, MCP tool requiresUserInteraction, và circuit breaker cho rm -rf / / rm -rf ~ (kể cả qua command substitution $(...)). Không vào được từ session chưa bật; khởi động bằng --permission-mode bypassPermissions hoặc --dangerously-skip-permissions. Refuse chạy dưới root/sudo trên Linux/macOS.

bypassPermissions KHÔNG bảo vệ khỏi prompt injection. Muốn ít prompt mà vẫn có safety check, dùng auto mode.

Admin chặn bằng permissions.disableBypassPermissionsMode: "disable" (hoặc disableAutoMode) — hữu ích nhất trong managed settings.

6.5. Protected paths

Ghi vào tập path sau KHÔNG bao giờ được auto-approve, ở mọi mode trừ bypassPermissions:

ModeGhi protected-path
default, acceptEdits, planPrompt
autoRoute tới classifier
dontAskDeny
bypassPermissionsAllow

permissions.allow rule KHÔNG pre-approve protected-path write (safety check chạy trước khi đánh giá allow rule). Directory được bảo vệ gồm .git, .config/git, .vscode, .idea, .husky, .cargo, .devcontainer, .yarn, .mvn, .claude (trừ .claude/worktrees). File gồm .gitconfig, các shell rc (.bashrc, .zshrc, .profile, .envrc...), .npmrc, .mcp.json, .claude.json, .devcontainer.json...

6.6. Sandboxing (sandboxed Bash tool)

Sandbox cho Claude chạy hầu hết shell command mà không cần hỏi từng cái: bạn định nghĩa file/domain nào command được chạm, và OS cưỡng chế ranh giới đó cho mọi Bash command và child process.

Chạy trên macOS (Seatbelt built-in), Linux và WSL2 (bubblewrap + socat). Native Windows không hỗ trợ — chạy trong WSL2. Bật bằng /sandbox (panel có tab Mode / Overrides / Config, thêm Dependencies trên Linux nếu thiếu package).

# Linux/WSL2
sudo apt-get install bubblewrap socat   # Ubuntu/Debian
sudo dnf install bubblewrap socat       # Fedora

Sandbox modes

  • Auto-allow mode: command chạy trong sandbox được auto-allow không cần prompt. Command không sandbox được (cần host chưa allow) rơi về regular permission flow.
  • Regular permissions mode: mọi Bash command qua regular permission flow dù đã sandbox.

Cả hai mode cưỡng chế cùng filesystem/network restriction — khác biệt chỉ là auto-approve hay không. Ngay cả auto-allow, vẫn áp dụng:

  • Explicit deny rule.
  • rm/rmdir nhắm /, home, path hệ thống → prompt.
  • Content-scoped ask rule như Bash(git push *) → prompt.
  • Bare Bash ask rule bị skip cho command chạy sandbox (từ v2.1.212, trong plan mode thì KHÔNG skip).

Chọn mode trong panel ghi vào .claude/settings.local.json. Bật cho mọi project: sandbox.enabled: true trong ~/.claude/settings.json.

Filesystem isolation

  • Write mặc định: working directory + subdirectory, cộng session temp dir ($TMPDIR).
  • Read mặc định: đọc được cả máy trừ path bị deny — vẫn đọc được ~/.aws/credentials, ~/.ssh/. Dùng sandbox.credentials hoặc denyRead để chặn.
  • Blocked: không sửa file ngoài working dir + temp dir (kể cả ~/.bashrc, /bin/).
{
  "sandbox": {
    "enabled": true,
    "filesystem": {
      "allowWrite": ["~/.kube", "/tmp/build"],
      "denyRead": ["~/"],
      "allowRead": ["."]
    }
  }
}

Prefix path của sandbox KHÁC với Read/Edit rule: /tmp/build là absolute, ~/.kube là home-relative, ./output (hoặc không prefix) relative tới project root (project settings) hoặc ~/.claude (user settings). Khi read rule chồng nhau, path cụ thể hơn thắng: allowRead: ["~/"] + denyRead: ["~/.env"]~/.env vẫn bị chặn.

Protect credentials

sandbox.credentials khai báo file/env var cần bảo vệ (từ v2.1.187). Không có deny list mặc định — chỉ thứ bạn liệt kê bị hạn chế.

{
  "sandbox": {
    "enabled": true,
    "credentials": {
      "files": [
        { "path": "~/.aws/credentials", "mode": "deny" },
        { "path": "~/.ssh", "mode": "deny" }
      ],
      "envVars": [
        { "name": "GITHUB_TOKEN", "mode": "deny" },
        { "name": "NPM_TOKEN", "mode": "deny" }
      ]
    }
  }
}

mode: "deny" — file bị chặn đọc, env var bị unset trước mỗi command. mode: "mask" (env var, v2.1.199+) — command thấy sentinel giả, sandbox proxy thay bằng giá trị thật khi request rời sandbox tới injectHosts; cần network.tlsTerminate và chỉ honor từ user/managed settings. Để strip credential Anthropic + cloud provider khỏi MỌI subprocess (kể cả không sandbox), set env var CLAUDE_CODE_SUBPROCESS_ENV_SCRUB.

Network isolation

Kiểm soát qua proxy chạy ngoài sandbox. Không domain nào được pre-allow mặc định — lần đầu command cần domain mới, Claude Code prompt (chọn Yes allow host đó cho hết session). Pre-allow bằng allowedDomains; WebFetch(domain:...) allow rule cũng pre-allow domain.

{
  "sandbox": {
    "network": {
      "allowedDomains": ["*.github.com", "registry.npmjs.org"],
      "deniedDomains": ["evil.example.com"]
    }
  }
}

Proxy quyết định dựa trên hostname client cung cấp và mặc định KHÔNG terminate/inspect TLS. Allow domain rộng như github.com có thể tạo đường exfiltration (domain fronting). Threat model cần đảm bảo mạnh hơn → dùng custom proxy terminate TLS (network.httpProxyPort/socksProxyPort) và cài CA cert trong sandbox.

Escape hatch & strict mode

Command không chạy được trong sandbox → Claude có thể retry với dangerouslyDisableSandbox (chạy ngoài sandbox → qua regular permission flow). Tắt bằng allowUnsandboxedCommands: false (Overrides tab hiện Strict sandbox mode) — khi đó command phải chạy sandbox hoặc nằm trong excludedCommands.

Enforce cho tổ chức

{
  "sandbox": {
    "enabled": true,
    "failIfUnavailable": true,
    "allowUnsandboxedCommands": false
  }
}

Deliver qua managed settings (MDM hoặc server-managed settings). Với boolean key (enabled, failIfUnavailable), managed value thắng. Với array key (excludedCommands, allowRead), các scope merge — set allowManagedReadPathsOnly: true để chỉ honor allowRead từ managed settings, allowManagedDomainsOnly cho network. excludedCommands không có lockdown tương đương → giữ list hẹp.

Troubleshooting nhanh

  • Host-not-allowed: grant khi được prompt để thêm host.
  • jest treo: watchman không tương thích → jest --no-watchman.
  • docker fail: incompatible → thêm docker * vào excludedCommands.
  • Go CLI (gh, gcloud, terraform) fail TLS trên macOS → excludedCommands.
  • Bubblewrap fail trong container không privileged → enableWeakerNestedSandbox: true (chỉ khi outer container đã cô lập).

6.7. Permissions × sandboxing: hai lớp bổ sung nhau

PermissionsSandboxing
Kiểm soátTool nào được dùng, file/domain nàoBash command chạm gì ở filesystem/network
Phạm viMọi tool (Bash, Read, Edit, WebFetch, MCP)Chỉ Bash command + child process
Cưỡng chế bởiClaude Code, trước khi tool chạyOS, trên process đang chạy

Dùng cả hai để defense-in-depth: deny rule chặn Claude cố truy cập; sandbox chặn Bash command chạm tới dù prompt injection đã lách qua quyết định của Claude. Filesystem restriction merge sandbox.filesystem với Read/Edit deny rule; network merge WebFetch rule với allowedDomains/deniedDomains.

Khi bật sandbox và giữ autoAllowBashIfSandboxed (mặc định true), sandboxed command chạy không prompt ngay cả khi có bare Bash ask rule — trừ trong plan mode (từ v2.1.212).

Sandbox chỉ cô lập Bash subprocess. Built-in file tool (Read/Edit/Write) dùng permission system trực tiếp; MCP server và hooks chạy không bị ràng buộc trên host. Muốn đặt cả process Claude Code sau một OS boundary, xem sandbox environments.

6.8. Sandbox environments

Chọn mức isolation theo threat model:

ApproachCô lập gìCần DockerSetup
Sandboxed Bash toolBash command + child processKhôngTối thiểu
Sandbox runtimeCả process Claude Code (file tool, MCP, hooks)KhôngThấp
Dev containerFull dev environmentTrung
Custom containerFull dev environmentTrung-cao
Virtual machineFull OSKhôngCao
Claude Code on the webFull OS, Anthropic-hostedKhôngKhông

Chọn nhanh:

  • Giảm prompt trong việc thường ngày trên máy mình → sandboxed Bash tool (/sandbox).
  • Chạy unattended với --dangerously-skip-permissionsdev container / container / VM / sandbox runtime (luôn cần isolation boundary, vì không còn prompt bắt lỗi).
  • Cô lập cả MCP + hooks không cần Docker → sandbox runtime (npx @anthropic-ai/sandbox-runtime claude; deny-all mặc định, phải config write/network trước).
  • Làm việc với repo không tin cậy → VM riêng hoặc Claude Code on the web.

--dangerously-skip-permissions cần isolation boundary; auto mode thì classifier là per-action control (không phải boundary), nên isolation là defense-in-depth chứ không bắt buộc như bypass.

6.9. Security best practices

Kiến trúc: Claude Code mặc định read-only, xin approval khi cần sửa file/chạy command. Claude chỉ có quyền bạn cấp — bạn chịu trách nhiệm review code và command trước khi approve.

Chống prompt injection (nhiều lớp): permission system, context-aware analysis, input sanitization, network command approval (curl/wget không auto-approve; block hẳn bằng permissions.deny), isolated context window cho web fetch, command injection detection (command khả nghi cần approve thủ công dù đã allowlist), fail-closed matching, secure credential storage (macOS Keychain / file permission).

Best practice với untrusted content:

  1. Review command trước khi approve.
  2. Tránh pipe untrusted content trực tiếp vào Claude.
  3. Verify thay đổi trên file quan trọng.
  4. Dùng VM để chạy script / gọi tool, nhất là khi tương tác web service ngoài.
  5. Report hành vi khả nghi bằng /feedback.

Windows WebDAV: không nên bật WebDAV hoặc cho Claude Code truy cập path \\* — có thể trigger network request bypass permission system.

Team security: dùng managed settings enforce chuẩn tổ chức; share permission config qua version control; audit /permissions định kỳ; monitor qua OpenTelemetry; audit/block thay đổi settings trong session bằng ConfigChange hooks.

MCP security: chỉ dùng MCP server tự viết hoặc từ provider tin cậy. Anthropic review connector theo listing criteria nhưng KHÔNG security-audit hay quản lý MCP server nào.

Security-guidance plugin

Plugin bổ sung (companion trong-session của Code Review) để Claude tự review code mình viết ở 3 tầng: (1) mỗi file edit — pattern match string, không gọi model, không phí; (2) cuối mỗi turn — background model review git diff; (3) mỗi commit/push Claude thực hiện — agentic review đọc code xung quanh.

/plugin install security-guidance@claude-plugins-official
/reload-plugins

Cho cloud session hoặc bật cho cả repo, khai báo trong checked-in settings:

{ "enabledPlugins": { "security-guidance@claude-plugins-official": true } }

Mở rộng bằng .claude/claude-security-guidance.md (guidance cho model review) và .claude/security-patterns.yaml (regex/substring cho per-edit check). Cả hai chỉ additive — không tắt được built-in check từ file này. Không lớp nào block write/commit; finding tới Claude dạng instruction để tự sửa. Tắt từng lớp bằng env var (ENABLE_PATTERN_RULES=0, ENABLE_STOP_REVIEW=0, ENABLE_COMMIT_REVIEW=0, SECURITY_GUIDANCE_DISABLE=1).

Đây là một lớp trong defense-in-depth, không thay thế: /security-review (on-demand), Code Review (on PR), và static analysis / dependency scanner trong CI.

Xem thêm

  • content/en/docs/claude-code/permissions.md — allow/ask/deny rule, managed policy, working directories
  • content/en/docs/claude-code/permission-modes.md — chi tiết từng mode, protected paths, auto mode classifier
  • content/en/docs/claude-code/sandboxing.md — cấu hình sandboxed Bash tool đầy đủ
  • content/en/docs/claude-code/sandbox-environments.md — so sánh isolation approaches
  • content/en/docs/claude-code/security.md — security model và best practices
  • content/en/docs/claude-code/security-guidance.md — security-guidance plugin
  • content/en/docs/claude-code/settings.md — reference đầy đủ các setting key (permission + sandbox)
  • content/en/docs/claude-code/hooks.md — PreToolUse/ConfigChange hook để mở rộng permission evaluation
Nguồn của chương

Tài liệu chính thức duy nhất từ Anthropic.

Claude Code docs
Trở về mục lục