PerryLink/dsh-permission-rules114

dsh-permission-rules

提供声明式权限规则与进程级网络策略

AI 分析

适合需要对工具调用、参数及网络访问进行细粒度安全管控的系统管理员。

套件
dsh-permission-rules
版本
0.7.2
授權
Apache-2.0
最近更新
2026年9月12日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-permission-rules

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need.

KeyDefaultMeaning
rulesFile.dsh/rules.yamlRule file location; relative = resolved against the calling session's cwd, absolute = global and validated at mount
fallbackPath(none)Rule file used when per-cwd discovery finds nothing; validated at mount
badFilePolicyfailBad rule file: fail errors the pending tool call loudly; ignore-with-warning warns and continues empty
maxRules256Hard cap on rule count across the effective source chain
maxCachedWorkspaces512Hard cap on cached per-workspace rule loads (LRU eviction)
patternModeglobparams/paths/when.env pattern flavor: glob or regex (tool names are always globs)
watchtrueChokidar watch + reload on change
watchStabilityThresholdMs200Reload debounce window (ms)
languageen/rules output language: en, zh, es, pt, hi
caseInsensitivePaths(win32)paths patterns and workspace-root comparison ignore ASCII case; true on Windows
auditallAudit granularity: all logs every hit AND passthrough; hits skips passthrough events
searchUpfalseWalk parent directories from the session cwd and merge every found rule file, nearest first
maxGlobStars2Hard cap on unbounded */** quantifiers per glob pattern
enforcetruefalse = dry-run mode: deny/ask hits are audit-logged with a dryRun marker and every call passes through
allowUnmarkedAuditfalsePre-marker hosts drop the ignorable marker; the plugin disables session-log audit with a warning. Set true to opt back in
network.enabledtrueMaster switch for the proxy, env injection, and web-tool mode defaults
network.modeautoPolicy mode: auto follows the sandbox preset, or deny-all / whitelist / allow-all
network.autoFallbackallow-allMode used when auto has no sandbox-policy service
network.unlistedaskWhitelist-mode handling of targets no rule matched: ask or deny
network.proxyBind127.0.0.1Local proxy bind address (loopback only)
network.proxyPort0Local proxy port; 0 picks a free ephemeral port
network.proxyMaxRecent100Cap on recent-block records kept for the settings page
network.loopbackallowLoopback targets: allow (Codex parity) or policy
network.injectEnvtrueWhether proxy environment variables are injected for subprocesses
network.noProxyclearSubprocess NO_PROXY handling: clear enforces the policy or preserve
network.upstreamProxyoffUpstream proxy for connections this plugin ALLOWS: off dials directly, inherit reuses the launch environment's proxy names, or an explicit http(s):// proxy URL
network.allowHostActiontrueSettings-page per-block "allow this host" action: false hides the Allow button and makes the permissionRules/allowHost RPC refuse (the rule editor is not affected)
builtin.enabledtrueBuilt-in high-risk baseline: false disables the shipped deny/ask ruleset entirely
builtin.path(shipped)Replacement baseline file (absolute, or relative to process.cwd()); validated at mount