dsh-agy-link 0.4.86 → 0.4.88

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,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.88 (2026-10-29)
4
+
5
+ ### English
6
+
7
+ - **Security(media): add `X-Content-Type-Options: nosniff` and a CSP sandbox to served media/assets.**
8
+ - The media and asset routes serve local image/SVG files from the DSH origin. They now send `X-Content-Type-Options: nosniff` (no MIME sniffing) and `Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox`, so an operator-supplied SVG cannot execute scripts if opened/navigated directly. Adds header assertions to the media test.
9
+
10
+ ### 中文
11
+
12
+ - **安全(media):媒体/静态资源响应增加 `X-Content-Type-Options: nosniff` 与 CSP sandbox。**
13
+ - 媒体与静态资源路由从 DSH 同源提供本地图片/SVG。现附加 `X-Content-Type-Options: nosniff`(禁止 MIME 嗅探)与 `Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox`,使运维提供的 SVG 即使被直接打开/导航也无法执行脚本。为媒体测试补充响应头断言。
14
+
15
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.87...v0.4.88
16
+
17
+ ## 0.4.87 (2026-10-29)
18
+
19
+ ### English
20
+
21
+ - **Security(doctor): tighten existing diagnostics dir/file to 0700/0600 on every write.**
22
+ - 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.
23
+
24
+ ### 中文
25
+
26
+ - **安全(doctor):每次写入都把已存在的诊断目录/文件收紧到 0700/0600。**
27
+ - 0.4.86 只在创建时设 `mode`,因此已存在的 `diagnostics/`(旧版本创建的 0755)仍可被他人读取,覆盖写同名报告也保留旧权限。现 `writeDoctorReport()` 写完后显式 `chmod` 目录为 `0700`、文件为 `0600`(best-effort)。补充回归测试。
28
+
29
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.86...v0.4.87
30
+
3
31
  ## 0.4.86 (2026-10-29)
4
32
 
5
33
  ### English
package/dist/index.js CHANGED
@@ -32452,11 +32452,17 @@ function writeDoctorReport(deps) {
32452
32452
  recursive: true,
32453
32453
  mode: 448
32454
32454
  });
32455
+ try {
32456
+ chmodSync(dir, 448);
32457
+ } catch {}
32455
32458
  const file = join(dir, "doctor-" + (/* @__PURE__ */ new Date()).toISOString().replace(/[^0-9]/g, "").slice(0, 14) + ".md");
32456
32459
  writeFileSync(file, lines.join("\n"), {
32457
32460
  encoding: "utf8",
32458
32461
  mode: 384
32459
32462
  });
32463
+ try {
32464
+ chmodSync(file, 384);
32465
+ } catch {}
32460
32466
  return file;
32461
32467
  }
32462
32468
  //#endregion
@@ -35120,7 +35126,9 @@ function handleMediaRequest(req, res, opts = {}) {
35120
35126
  "Content-Length": st.size,
35121
35127
  "Cache-Control": "public, max-age=3600",
35122
35128
  "Access-Control-Allow-Origin": "*",
35123
- "Content-Disposition": "inline"
35129
+ "Content-Disposition": "inline",
35130
+ "X-Content-Type-Options": "nosniff",
35131
+ "Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox"
35124
35132
  });
35125
35133
  const stream = createReadStream(filePath);
35126
35134
  stream.on("error", () => {
@@ -35167,7 +35175,9 @@ function handleAssetRequest(req, res, assetDir) {
35167
35175
  "Content-Type": contentType,
35168
35176
  "Content-Length": st.size,
35169
35177
  "Cache-Control": "public, max-age=86400",
35170
- "Access-Control-Allow-Origin": "*"
35178
+ "Access-Control-Allow-Origin": "*",
35179
+ "X-Content-Type-Options": "nosniff",
35180
+ "Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox"
35171
35181
  });
35172
35182
  const stream = createReadStream(filePath);
35173
35183
  stream.on("error", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.86",
3
+ "version": "0.4.88",
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",