isabellasahu/dsh-permission-rules ↗★ 0

dsh-permission-rules

提供声明式工具执行与路径匹配权限规则 适合需要对AI执行的工具和工作区路径进行精细安全管控的用户

套件
dsh-permission-rules
相容性
待驗證
版本
0.1.30
授權
NOASSERTION
最近更新
2026年10月14日

同名套件的其他儲存庫

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. On a 0.1.7-alpha host every field is declared .volatile(), so it is ALSO editable in place from the Plugins settings page: the edit is committed into the running references without remounting the plugin, the runtime reads the new value on its next use, and a change to network.proxyPort, proxyBind, injectEnv or noProxy rebinds the local proxy immediately. The numeric bounds live in the schema, and the config editor resolves the merged config against that schema before persisting, so an out-of-range value is refused at write time. On a host whose Schemastery predates volatile() these fields stay cordis.yml-only.

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