dsh-code-security 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  A DeepSeek Harness plugin for AI code security review: deterministic rule engine, git-diff incremental review, fix-verify loop, and policy gate. Methodology borrows from Codex security skills (evidence-first findings, severity ordering, supply-chain layers). Zero runtime dependencies.
8
8
 
9
+ ## Compatibility
10
+
11
+ Verified with official `@deepseek-ai/dsh@0.1.5-rc.1` and Node `24.16.0` on 2026-09-11: all 18 components load alongside Modlens, with passing tool-schema, skill-registration and offline read-only invocation checks. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements match this Harness release: 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
12
+
13
+ 2026-09-13 fix: retain the service receiver when calling `subprocess.spawn`, preventing failures caused by passing the method as an unbound callback. Verified with official `0.1.5-rc.1` and `0.1.5-rc.2` on Node `24.16.0`. `secure_diff` reads a real isolated Git repository through the host subprocess service and reports the changed file and added line.
14
+
9
15
  ## Tools
10
16
 
11
17
  | Tool | Purpose | Write |
package/README.md CHANGED
@@ -33,7 +33,9 @@ DeepSeek Harness AI 代码安全审查插件:确定性规则引擎 + git diff
33
33
 
34
34
  ## 兼容性
35
35
 
36
- 在 `@deepseek-ai/dsh@0.1.2-alpha.4` 源码模式下验证(2026-09-02)。遵循 cordis 组合包补丁模型(`cordis.patch.yml` + `dsh.bundle.patch`),运行时不 import 任何 `@deepseek-ai/*` 内部模块。
36
+ 已在官方 `@deepseek-ai/dsh@0.1.5-rc.1`、Node `24.16.0` 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
37
+
38
+ 2026-09-13 修复:保留宿主 `subprocess.spawn` 的服务对象,避免方法独立传递后因 `this` 丢失而报错。已在官方 `0.1.5-rc.1` 和 `0.1.5-rc.2`、Node `24.16.0` 上验证。`secure_diff` 已通过真实宿主进程服务读取隔离 Git 仓库差异,正确识别变更文件和新增行。
37
39
 
38
40
  ## 安装
39
41
 
package/lib/index.js CHANGED
@@ -21,7 +21,7 @@ export function apply(ctx, config) {
21
21
  console.warn('[dsh-code-security] ' + (error instanceof Error ? error.message : String(error)));
22
22
  cfg = resolveConfig(null);
23
23
  }
24
- const runner = createSubprocessRunner(ctx.subprocess.spawn, 10000, 60000);
24
+ const runner = createSubprocessRunner((spec) => ctx.subprocess.spawn(spec), 10000, 60000);
25
25
  const tools = buildSecureTools(cfg, process.cwd(), runner);
26
26
  const disposers = [];
27
27
  for (const definition of tools) {
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "dsh-code-security",
3
- "version": "0.3.2",
4
- "description": "DSH AI 代码安全审查插件:secure_scan/secure_diff/secure_fix_verify/secure_report/secure_export/secure_baseline/secure_deps/secure_policy_show/secure_policy_set 九工具,40+ 确定性规则、密钥熵检测、git diff/staged 审查、SARIF 导出、基线接受与 SBOM-lite,零运行时依赖。",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./cordis.patch.yml": "./cordis.patch.yml",
14
- "./package.json": "./package.json"
15
- },
16
- "files": [
17
- "lib",
18
- "cordis.patch.yml",
19
- "README.md",
20
- "README.en.md"
21
- ],
22
- "scripts": {
23
- "build": "tsc -p tsconfig.json",
24
- "typecheck": "tsc -p tsconfig.json --noEmit",
25
- "test": "pnpm run build && node --test \"test/*.test.mjs\"",
26
- "prepublishOnly": "pnpm run build"
27
- },
28
- "dsh": {
29
- "bundle": {
30
- "patch": "./cordis.patch.yml"
31
- }
32
- },
33
- "keywords": [
34
- "dsh",
35
- "deepseek-harness",
36
- "plugin",
37
- "security",
38
- "code-review",
39
- "sast",
40
- "secrets",
41
- "owasp"
42
- ],
43
- "license": "MIT",
44
- "engines": {
45
- "node": ">=22"
46
- },
47
- "devDependencies": {
48
- "@types/node": "^24.0.0",
49
- "typescript": "^5.6.0"
50
- },
51
- "repository": {
52
- "type": "git",
53
- "url": "git+https://github.com/STARDUSTLC666/dsh-code-security.git"
54
- },
55
- "bugs": {
56
- "url": "https://github.com/STARDUSTLC666/dsh-code-security/issues"
57
- },
58
- "homepage": "https://github.com/STARDUSTLC666/dsh-code-security#readme",
59
- "author": "stardustlc",
60
- "packageManager": "pnpm@11.7.0"
61
- }
1
+ {
2
+ "name": "dsh-code-security",
3
+ "version": "0.3.3",
4
+ "description": "DSH AI 代码安全审查插件:secure_scan/secure_diff/secure_fix_verify/secure_report/secure_export/secure_baseline/secure_deps/secure_policy_show/secure_policy_set 九工具,40+ 确定性规则、密钥熵检测、git diff/staged 审查、SARIF 导出、基线接受与 SBOM-lite,零运行时依赖。",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./cordis.patch.yml": "./cordis.patch.yml",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib",
18
+ "cordis.patch.yml",
19
+ "README.md",
20
+ "README.en.md"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.json",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "test": "pnpm run build && node --test \"test/*.test.mjs\"",
26
+ "prepublishOnly": "pnpm run build"
27
+ },
28
+ "dsh": {
29
+ "bundle": {
30
+ "patch": "./cordis.patch.yml"
31
+ }
32
+ },
33
+ "keywords": [
34
+ "dsh",
35
+ "deepseek-harness",
36
+ "plugin",
37
+ "security",
38
+ "code-review",
39
+ "sast",
40
+ "secrets",
41
+ "owasp"
42
+ ],
43
+ "license": "MIT",
44
+ "engines": {
45
+ "node": "^22.19.0 || >=24.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^24.0.0",
49
+ "typescript": "^5.6.0"
50
+ },
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/STARDUSTLC666/dsh-code-security.git"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/STARDUSTLC666/dsh-code-security/issues"
57
+ },
58
+ "homepage": "https://github.com/STARDUSTLC666/dsh-code-security#readme",
59
+ "author": "stardustlc",
60
+ "packageManager": "pnpm@11.7.0"
61
+ }