Bcy2020/dsh-cc-ecosystem--packages-cc-permissions ↗★ 1
dsh-cc-permissions
Enforce Claude Code permission rules (.claude/settings.json allow/deny/ask, deny>ask>allow) in DSH via a tools/pre-execute gate. Reads CC settings as a read-only source; DSH-side approvals never write back to .claude.
AI 分析
核心用途是为 DSH 的工具调用引入细粒度的安全沙箱与权限控制,严格遵循 Claude Code 的安全规则。适合对本地执行安全要求极高的用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Bcy2020/dsh-cc-ecosystem#486441ba06baddbc29b7f82431a795541d2c0369&path:packages/cc-permissionsドキュメント
README 全文を読む ↗dsh-cc-permissions
Enforce Claude Code permission rules in DSH.
Reads .claude/settings.json (user ~/.claude, project, and settings.local.json)
through the shared dsh-cc-loader parse layer and folds the rules
deny → ask → allow on every tool call, exactly like Claude Code:
Toolbare deny removes the tool from the model's context (per-agent hide)Tool(spec)scoped rules match commands, paths, domains, params, MCP tools- Bash compound commands are split; wrappers (
timeout,nice,nohup…) and leading env assignments are stripped before matching - Read deny rules also gate Edit/Write tools and Bash file commands
(
cat,head,tail,sed…) askrules route through DSH's approval service
Read-only bridge
CC settings.json is a read-only source. DSH-side approvals ("don't ask
again") are stored in DSH's own config and are never written back to
.claude/settings.local.json — CC, Codex and DSH have different permission
semantics, so cross-tool permission sync is intentionally out of scope
(community agents / cc-suite do not sync permissions either).
Install
dsh plugin --profile add dsh-cc-permissions
Config
| Key | Default | Meaning |
|---|---|---|
enabled | true | Master switch |
hideDeniedTools | true | Bare-name deny → per-agent ctx.tools.restrict |
enableDefaultMode | true | defaultMode=dontAsk → approval policy never |
homeDir | `` | Home dir for ~/.claude/settings.json |
projectRootMarkers | ['.git'] | Project root discovery |
License
MIT.