dsh-agy-link 0.4.85 → 0.4.87

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/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.87 (2026-10-29)
4
+
5
+ ### English
6
+
7
+ - **Security(doctor): tighten existing diagnostics dir/file to 0700/0600 on every write.**
8
+ - v0.4.86 set `mode` only at creation, so a pre-existing `diagnostics/` directory (0755 from an older version) stayed world-readable, and an overwritten report kept its old mode. `writeDoctorReport()` now `chmod`s the dir to `0700` and the file to `0600` after writing (best-effort). Adds a regression test.
9
+
10
+ ### 中文
11
+
12
+ - **安全(doctor):每次写入都把已存在的诊断目录/文件收紧到 0700/0600。**
13
+ - 0.4.86 只在创建时设 `mode`,因此已存在的 `diagnostics/`(旧版本创建的 0755)仍可被他人读取,覆盖写同名报告也保留旧权限。现 `writeDoctorReport()` 写完后显式 `chmod` 目录为 `0700`、文件为 `0600`(best-effort)。补充回归测试。
14
+
15
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.86...v0.4.87
16
+
17
+ ## 0.4.86 (2026-10-29)
18
+
19
+ ### English
20
+
21
+ - **Security(doctor): write the diagnostic report owner-only (dir 0700, file 0600).**
22
+ - `/agy doctor` wrote its (redacted) report with the default umask (typically 0644), so another local user could read config paths and any residual log text. The diagnostics dir is now `0700` and the report `0600`.
23
+ - **Docs(spec): add the spec index and the security-hardening invariants.**
24
+ - `.spec/README.md` indexes the project's truth sources; `.spec/security-hardening.md` records the MCP bridge / HTTP / doctor / media / parser security invariants and the exact test that guards each one, so future changes cannot silently relax them.
25
+
26
+ ### 中文
27
+
28
+ - **安全(doctor):诊断报告改为仅本人可读(目录 0700、文件 0600)。**
29
+ - `/agy doctor` 之前按默认 umask 写(通常 0644),同机其他用户可读到配置路径与残留日志。现目录 `0700`、报告 `0600`。
30
+ - **文档(spec):新增 spec 索引与安全不变式文档。**
31
+ - `.spec/README.md` 作为真相源索引;`.spec/security-hardening.md` 记录 MCP 桥接 / HTTP / doctor / media / parser 的安全不变式与对应测试,防止后续改动静默放宽。
32
+
33
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.85...v0.4.86
34
+
3
35
  ## 0.4.85 (2026-10-29)
4
36
 
5
37
  ### English
package/dist/index.js CHANGED
@@ -32448,9 +32448,21 @@ function writeDoctorReport(deps) {
32448
32448
  lines.push("```");
32449
32449
  lines.push("");
32450
32450
  const dir = join(stateDir(), "diagnostics");
32451
- mkdirSync(dir, { recursive: true });
32451
+ mkdirSync(dir, {
32452
+ recursive: true,
32453
+ mode: 448
32454
+ });
32455
+ try {
32456
+ chmodSync(dir, 448);
32457
+ } catch {}
32452
32458
  const file = join(dir, "doctor-" + (/* @__PURE__ */ new Date()).toISOString().replace(/[^0-9]/g, "").slice(0, 14) + ".md");
32453
- writeFileSync(file, lines.join("\n"), "utf8");
32459
+ writeFileSync(file, lines.join("\n"), {
32460
+ encoding: "utf8",
32461
+ mode: 384
32462
+ });
32463
+ try {
32464
+ chmodSync(file, 384);
32465
+ } catch {}
32454
32466
  return file;
32455
32467
  }
32456
32468
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.85",
3
+ "version": "0.4.87",
4
4
  "description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
5
5
  "type": "module",
6
6
  "license": "MIT",