{"schemaVersion":2,"dataVersion":"20260822T105549Z-0a0b366f","generatedAt":"2026-08-22T10:55:49.138Z","source":{"id":"omdsh-dev-dsh-custom-tool","slug":"omdsh-dev-dsh-custom-tool","rank":163,"url":"https://github.com/omdsh-dev/dsh-custom-tool","name":"omdsh-dev/dsh-custom-tool","category":"tools","description":{"zh":"用 Monaco 编辑器创建和管理沙箱化的自定义 JavaScript 工具。","en":"Create and manage sandboxed JavaScript tools with a Monaco editor and model-driven tool lifecycle."},"stars":24,"starsCheckedAt":"2026-08-21","repository":{"owner":"omdsh-dev","repo":"dsh-custom-tool","requestedRef":null,"subpath":""},"npm":null,"downloads":null,"installMode":"github-source","upstreamInstall":"dsh plugin --profile web add github:omdsh-dev/dsh-custom-tool","tarball":null,"added":"2026-08-13","page":"https://awesome-dsh-plugin.com/p/omdsh-dev/dsh-custom-tool/","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":"omdsh-dev-dsh-custom-tool","slug":"omdsh-dev-dsh-custom-tool","policyVersion":"HT-DSH-0.2.2","scannedAt":"2026-08-22T08:21:42.624Z","scanStatus":"static-complete","verdict":"caution","score":94,"commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","commitDate":"2026-08-16T13:24:32+08:00","artifactDigest":"sha256:0872c54da966d4c2abc9cee931f500f169316e75522077d5258bd7179dd18ae9","downloadUrl":"https://github.com/omdsh-dev/dsh-custom-tool/archive/7cb95649dca9b380c9a30af96bdbef87a76a2259.tar.gz","installMode":"github-source","installCommand":"dsh plugin --profile web add github:omdsh-dev/dsh-custom-tool","manifest":{"found":true,"path":"package.json","parseError":null,"packageName":"dsh-custom-tool","packageVersion":"0.1.2","bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots"]},"lifecycleScripts":{},"peerDependencies":["@deepseek-ai/cordis","@deepseek-ai/dsh-settings","@deepseek-ai/dsh-tools","@deepseek-ai/dsh-system-prompt","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale"]},"identity":{"status":"not-published","installMode":"github-source","upstreamNpm":null,"manifestName":"dsh-custom-tool","nameMatch":null,"npm":null,"repositoryMatch":"not-checked","provenance":"not-checked","tarballHost":null},"permissions":{"bundlePatch":"cordis.patch.yml","inserts":[{"id":"dsh-custom-tool","name":"dsh-custom-tool","path":"cordis.patch.yml","disabled":false}],"overrides":[],"jsExpressions":0,"clientPlatform":"web","parseErrors":[]},"capabilities":["agent-control","browser-ui","environment","filesystem","host-bundle","network","subprocess","telemetry"],"outboundHosts":[],"findings":[{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"medium","confidence":"medium","layer":"static","path":"lib/executor-worker.js","pathClass":"source","line":130,"evidence":"vm.runInContext(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","hash":"39085b5ab0e09c83e2616a43","review":{"verdict":"functional","reason":"vm.runInContext在独立worker线程中执行用户在Monaco编辑器里编写的自定义工具代码，sandbox仅暴露console/受控fetch/timers等有限全局量，无require/process访问，正是“沙箱化自定义JS工具”功能本身。","model":"sonnet@p2","reviewedAt":"2026-08-21T11:20:57.918Z"}},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"medium","confidence":"medium","layer":"static","path":"lib/index.js","pathClass":"source","line":587,"evidence":"new Function(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","hash":"3e8500af280669a276314770","review":{"verdict":"functional","reason":"该 new Function 位于打包进来的第三方 schemastery 库（vendor/schemastery）中，用于反序列化 schema.callback 字符串为函数，是校验库固有机制，非插件为 @file 功能自写逻辑，且有 typeof 检查与 try/catch 包裹。","model":"sonnet@p2","reviewedAt":"2026-08-21T11:17:59.472Z"}},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"scripts/build.mjs","pathClass":"source","line":12,"evidence":"execSync","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"4c715fd3b0d9ae81fc707505"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"scripts/build.mjs","pathClass":"source","line":12,"evidence":"node:child_process","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"6c875ad888fc77c8e5682af2"},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"high","confidence":"low","layer":"static","path":"src/client/validate.ts","pathClass":"source","line":35,"evidence":"new Function(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","hash":"b3fbab2be273475de49fc3c2","review":{"verdict":"sanitized","reason":"new Function仅用于捕获语法错误提前提示用户，构造后从未调用执行，注释明确说明真实执行在host沙箱中完成，无风险。","model":"sonnet","reviewedAt":"2026-08-21T10:49:07.496Z"}},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"medium","confidence":"medium","layer":"static","path":"src/executor-worker.ts","pathClass":"source","line":160,"evidence":"vm.runInContext(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","hash":"00507820dc47f3a9c1111444","review":{"verdict":"functional","reason":"与编译产物同源的TS实现，vm.runInContext执行用户自定义工具代码，worker线程隔离+受限sandbox+超时限制+hardenWorkerProcess，属于插件声明功能的必要实现。","model":"sonnet@p2","reviewedAt":"2026-08-21T11:20:57.918Z"}}],"counts":{"critical":0,"high":0,"medium":3,"low":2},"rawCounts":{"critical":0,"high":1,"medium":3,"low":2},"vulnerabilities":[],"coverage":{"source":"complete","manifest":"complete","bundleConfig":"complete","dependencies":"lockfile-present","vulnerabilities":"complete","identity":"complete","artifact":"not-compared","llmReview":"complete","dynamicRuntime":"not-run","humanReview":"not-run"},"inventory":{"filesScanned":103,"bytesScanned":953086,"truncated":false,"lockfiles":["pnpm-lock.yaml"],"pathClasses":{"markdown":3,"cordis":1,"data":3,"source":80,"manifest":1,"yaml":2,"test-example-docs":13}},"limitations":["此结果为源码静态检测，不等同于无漏洞证明。","尚未比对 npm 发布包与源码的一致性，也未执行隔离运行和人工复核。","危险能力可能是插件功能所需，需结合用途与证据人工判断。"],"limitationKeys":["static-analysis-only","no-artifact-runtime-human-review","capability-needs-context"],"review":{"model":"sonnet","reviewedAt":"2026-08-22T08:21:42.624Z","summary":null,"intentMatch":null,"findingsReviewed":4,"findingsCandidates":4,"fromCache":4,"usage":null}},"timeline":[{"scannedAt":"2026-08-22T08:21:42.624Z","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.2","verdict":"caution","status":"static-complete"},{"scannedAt":"2026-08-21T11:20:57.918Z","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.1","verdict":"caution","status":"static-complete"},{"scannedAt":"2026-08-21T10:49:07.496Z","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.0","verdict":"caution","status":"static-complete"}],"events":[{"kind":"policy-change","from":"HT-DSH-0.2.1","to":"HT-DSH-0.2.2","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.2","at":"2026-08-22T08:21:42.624Z"},{"kind":"policy-change","from":"HT-DSH-0.2.0","to":"HT-DSH-0.2.1","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.1","at":"2026-08-21T11:20:57.918Z"},{"kind":"first-scan","from":null,"to":"caution","commit":"7cb95649dca9b380c9a30af96bdbef87a76a2259","policyVersion":"HT-DSH-0.2.0","at":"2026-08-21T10:49:07.496Z"}]}