{"schemaVersion":2,"dataVersion":"20260822T105549Z-0a0b366f","generatedAt":"2026-08-22T10:55:49.138Z","source":{"id":"mrweicodes-dsh-permgate","slug":"mrweicodes-dsh-permgate","rank":640,"url":"https://github.com/MrWeiCodes/dsh-permgate","name":"MrWeiCodes/dsh-permgate","category":"security","description":{"zh":"细粒度权限网关：按分类（工作区外目录/命令/读写文件/子代理/重复操作）逐项审查工具调用，全局/项目双级白黑名单、快捷工具默认值、自定义规则，中英文审批弹窗（内联 diff 详情、自定义拒绝意见）与底层沙箱升级流程。","en":"Fine-grained permission gateway: per-category tool-call review (outside-workspace directories, commands, file read/write, subagents, repeated actions) with global & per-project allow/deny exceptions, quick-tool defaults, custom rules, a bilingual approval modal with inline diff details, custom rejection reasons and a sandbox-upgrade flow."},"stars":4,"starsCheckedAt":"2026-08-21","repository":{"owner":"MrWeiCodes","repo":"dsh-permgate","requestedRef":null,"subpath":""},"npm":null,"downloads":null,"installMode":"github-source","upstreamInstall":"dsh plugin --profile web add github:MrWeiCodes/dsh-permgate","tarball":null,"added":"2026-08-16","page":"https://awesome-dsh-plugin.com/p/MrWeiCodes/dsh-permgate/","screenshots":[],"discovery":{"provider":"awesome-dsh-plugin","channel":"plugins.json","indexUrl":"https://github.com/awesome-dsh-plugin/awesome-dsh-plugin","selection":"all curated entries"}},"report":{"sourceId":"mrweicodes-dsh-permgate","slug":"mrweicodes-dsh-permgate","policyVersion":"HT-DSH-0.2.2","scannedAt":"2026-08-22T08:27:01.733Z","scanStatus":"static-complete","verdict":"review","score":74,"commit":"275e3a96d944a940b56b0dbe577188cb26365872","commitDate":"2026-08-22T14:29:34+08:00","artifactDigest":"sha256:a61a6d094fa3080de961621c354b0756426c25940291ae5cb8570940e74efd84","downloadUrl":"https://github.com/MrWeiCodes/dsh-permgate/archive/275e3a96d944a940b56b0dbe577188cb26365872.tar.gz","installMode":"github-source","installCommand":"dsh plugin --profile web add github:MrWeiCodes/dsh-permgate","manifest":{"found":true,"path":"package.json","parseError":null,"packageName":"dsh-permgate","packageVersion":"1.2.5","bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime"],"platform":"web"},"lifecycleScripts":{},"peerDependencies":[]},"identity":{"status":"not-published","installMode":"github-source","upstreamNpm":null,"manifestName":"dsh-permgate","nameMatch":null,"npm":null,"repositoryMatch":"not-checked","provenance":"not-checked","tarballHost":null},"permissions":{"bundlePatch":"cordis.patch.yml","inserts":[{"id":"permgate","name":"dsh-permgate","path":"cordis.patch.yml","disabled":false}],"overrides":[{"id":"permission","tier":"critical","mode":"override","disabled":false,"replacesImplementation":false,"name":null,"keys":["presets"],"path":"cordis.patch.yml"}],"jsExpressions":0,"clientPlatform":"web","parseErrors":[]},"capabilities":["browser-ui","filesystem","host-bundle","mcp","network","session","subprocess"],"outboundHosts":[],"findings":[{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"high","confidence":"medium","layer":"static","path":"client.js","pathClass":"source","line":44,"evidence":"new Function(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","hash":"452a18b5b3056de57893becc","review":{"verdict":"unclear","reason":"提供的代码片段被截断，仅展示CSS样式字符串，未包含client.js:44处new Function(的实际调用及参数来源，无法判断其输入是否可控。","model":"sonnet","reviewedAt":"2026-08-21T10:57:38.666Z"}},{"id":"HT-CLIENT-001","title":"浏览器端使用危险 HTML 注入点","severity":"medium","confidence":"medium","layer":"static","path":"client.js","pathClass":"source","line":21,"evidence":".innerHTML=","remediation":"使用安全 DOM API，并在不可避免时对不可信内容进行严格清洗。","hash":"678128ac080a48595eb339f3"},{"id":"HT-CLIENT-001","title":"浏览器端使用危险 HTML 注入点","severity":"medium","confidence":"medium","layer":"static","path":"client.js","pathClass":"source","line":21,"evidence":".innerHTML=","remediation":"使用安全 DOM API，并在不可避免时对不可信内容进行严格清洗。","hash":"678128ac080a48595eb339f3"},{"id":"HT-PERMISSION-001","title":"覆盖安全关键宿主能力","severity":"medium","confidence":"high","path":"cordis.patch.yml","line":19,"evidence":"override: id=permission config[presets]","remediation":"安全关键 seam 的替换必须逐项解释、最小化，并接受人工复核；用户安装前应知晓该能力被谁接管。","note":"改写配置 权限预设（permission）","layer":"dsh-semantics","pathClass":"cordis","hash":"3f8552c40e7de21122e3f5b0","review":{"verdict":"functional","reason":"该覆盖为插件核心功能：在permission.config.presets中新增auto档(sandbox: workspace-write, approval: ask)，并配合分类器prompt对危险/不确定操作强制ask，与其自述功能一致，未见默认放开danger-full-access等异常改写。","model":"sonnet@p2","reviewedAt":"2026-08-21T13:16:43.218Z"}}],"counts":{"critical":0,"high":1,"medium":3,"low":0},"rawCounts":{"critical":0,"high":1,"medium":3,"low":0},"vulnerabilities":[],"coverage":{"source":"complete","manifest":"complete","bundleConfig":"complete","dependencies":"lockfile-missing","vulnerabilities":"lockfile-missing","identity":"complete","artifact":"not-compared","llmReview":"complete","dynamicRuntime":"not-run","humanReview":"not-run"},"inventory":{"filesScanned":6,"bytesScanned":320807,"truncated":false,"lockfiles":[],"pathClasses":{"markdown":2,"source":2,"cordis":1,"manifest":1}},"limitations":["此结果为源码静态检测，不等同于无漏洞证明。","尚未比对 npm 发布包与源码的一致性，也未执行隔离运行和人工复核。","危险能力可能是插件功能所需，需结合用途与证据人工判断。"],"limitationKeys":["static-analysis-only","no-artifact-runtime-human-review","capability-needs-context"],"review":{"model":"sonnet","reviewedAt":"2026-08-22T08:27:01.733Z","summary":null,"intentMatch":null,"findingsReviewed":2,"findingsCandidates":2,"fromCache":2,"usage":null}},"timeline":[{"scannedAt":"2026-08-22T08:27:01.733Z","commit":"275e3a96d944a940b56b0dbe577188cb26365872","policyVersion":"HT-DSH-0.2.2","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T13:17:05.623Z","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.2","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T11:28:39.356Z","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.1","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T10:57:38.666Z","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.0","verdict":"review","status":"static-complete"}],"events":[{"kind":"commit-change","from":"d45d62c16e4c2426ead08e3f828626e7c74ab404","to":"275e3a96d944a940b56b0dbe577188cb26365872","commit":"275e3a96d944a940b56b0dbe577188cb26365872","policyVersion":"HT-DSH-0.2.2","at":"2026-08-22T08:27:01.733Z"},{"kind":"policy-change","from":"HT-DSH-0.2.1","to":"HT-DSH-0.2.2","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.2","at":"2026-08-21T13:17:05.623Z"},{"kind":"policy-change","from":"HT-DSH-0.2.0","to":"HT-DSH-0.2.1","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.1","at":"2026-08-21T11:28:39.356Z"},{"kind":"first-scan","from":null,"to":"review","commit":"d45d62c16e4c2426ead08e3f828626e7c74ab404","policyVersion":"HT-DSH-0.2.0","at":"2026-08-21T10:57:38.666Z"}]}