dsh-workplan 1.8.0 → 1.8.2
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 +61 -0
- package/README.en.md +33 -33
- package/README.md +32 -31
- package/SECURITY.md +12 -1
- package/docs/SBOM.md +1 -1
- package/docs/cc/CC-2026-ASSESSMENT.md +23 -11
- package/docs/cc/SECURITY-TARGET.md +12 -7
- package/docs/release-notes-1.8.0.md +80 -0
- package/docs/release-notes-1.8.1.md +69 -0
- package/docs/release-notes-1.8.2.md +35 -0
- package/lib/host.js +18 -2
- package/package.json +1 -1
- package/src/host.ts +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## 1.8.2 — 2026-10-30
|
|
2
|
+
|
|
3
|
+
**文档版:把两个卖点提到首页第一句,并删掉首屏的铺陈。不改运行时代码。**
|
|
4
|
+
|
|
5
|
+
> 反馈很直接:仓库首页看完还不知道卖点是什么,而且话太多。这一版只动文档:
|
|
6
|
+
> 第一句同时点明两个卖点,首屏压到「一句标语 + 一句定位 + 三条要点」,
|
|
7
|
+
> 长篇解释全部下移或折叠。技术结论、合规立场、测试数量都没有变。
|
|
8
|
+
|
|
9
|
+
### 变更(文档)
|
|
10
|
+
|
|
11
|
+
- `README.md` / `README.en.md`:**第一句**即两个卖点 —— ①安全证据按 ISO/IEC 15408:2026(CC)
|
|
12
|
+
公开、可自己核对(明说没有证书、不宣称"通过");②安装只要一条命令、零第三方运行时依赖。
|
|
13
|
+
- 首屏从"徽章 + 两段引用 + 长段标准科普"压到 5 行内;CC 三方分工的解释由 4 条长要点改为 1 段。
|
|
14
|
+
- `1.5.0 改了什么` / `1.4.3 修了什么` 两节折叠进 `<details>`,默认收起,内容一字未删。
|
|
15
|
+
- 计算出的就绪度表述统一为"EAL1 的 14 项组件:10 就绪 / 3 部分 / 1 外部实验室"。
|
|
16
|
+
|
|
17
|
+
### 测试
|
|
18
|
+
|
|
19
|
+
- `npm run verify`:188 tests / 188 pass / 0 fail(无代码变更,仅版本号与文档)。
|
|
20
|
+
|
|
21
|
+
### 升级
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
dsh plugin --profile web add dsh-workplan@1.8.2
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1.8.1 — 2026-10-30
|
|
30
|
+
|
|
31
|
+
**补丁版:把 v1.8.0 里三处"文档说得比代码多"的地方改成一致,并补上一处真实的方法限制。**
|
|
32
|
+
|
|
33
|
+
> v1.8.0 发布后我们做了独立复核,发现文档有三处与实现不符。讲安全的文档说错话,比不写文档更糟,
|
|
34
|
+
> 所以单独发补丁版更正,并把更正过程本身也写进 `docs/cc/CC-2026-ASSESSMENT.md` 的修复记录(D-05/D-06/D-07)。
|
|
35
|
+
> 本版**没有**新增安全功能上的主张,也没有改变对 CC 的立场:仍然没有证书,仍然不宣称"通过"。
|
|
36
|
+
|
|
37
|
+
### 更正(文档与实现对齐)
|
|
38
|
+
|
|
39
|
+
- `SECURITY.md`、`docs/cc/SECURITY-TARGET.md`:此前称图表库路由"同上鉴权",实际该路由从未调用
|
|
40
|
+
`connection.requestRejection`。现改为明确声明:`/dsh-workplan/vendor/chart.umd.js` 是**公开静态资源**
|
|
41
|
+
(随包固定的 Chart.js 4.6.1,MIT,不含会话数据),只答 GET/HEAD,不鉴权;带数据的
|
|
42
|
+
`/dsh-workplan/plans` 才做鉴权。两者差异在文档里写清楚,不再含糊。
|
|
43
|
+
- `docs/cc/SECURITY-TARGET.md`:此前称自测覆盖"鉴权分支、方法限制、响应截断",实际 `route()` 的
|
|
44
|
+
401/403、405、2.5 MB 截断分支**没有**逐分支用例。现改为如实列出已覆盖项,并把该缺口登记为
|
|
45
|
+
ST §9 的已声明缺口(补测需要构造 DSH `connection` 桩件)。
|
|
46
|
+
- `docs/cc/CC-2026-ASSESSMENT.md`:EAL1 矩阵里 `ASE_CCL.1` 由 ✅ 改为 🟡(ST 自己写着
|
|
47
|
+
"Conformance claim: NONE",与"符合性主张已就绪"自相矛盾),就绪度合计由 11 项改为 **10 项**。
|
|
48
|
+
- `README.md` / `README.en.md` / `docs/SBOM.md`:测试数由 187 更新为 188,就绪数改为 10/3/1。
|
|
49
|
+
- `docs/cc/CC-2026-ASSESSMENT.md`:新增"版本时差提醒"与差距 N-07 —— ISO/IEC 15408:2026 是现行国际标准,
|
|
50
|
+
但截至 2026 年 JISEC / NASK / 欧盟 CC 认证仍受理 **CC:2022 Release 1**,真实评估会先按 2022 版受理。
|
|
51
|
+
|
|
52
|
+
### 变更(实现)
|
|
53
|
+
|
|
54
|
+
- `src/host.ts`:图表库路由补上方法限制——非 GET/HEAD 返回 `405` 并带 `allow: GET, HEAD`;HEAD 返回头而无响应体。
|
|
55
|
+
路径仍为常量(不由请求 URL 拼接),不引入任何写盘、子进程或出站请求。
|
|
56
|
+
|
|
57
|
+
### 测试
|
|
58
|
+
|
|
59
|
+
- 新增 1 项:`tests/security-headers.test.ts` 断言图表路由的 405 与方法限制存在,防止文档与实现再次漂移。
|
|
60
|
+
- `npm run verify` → **188 tests / 188 pass / 0 fail**。
|
|
61
|
+
|
|
1
62
|
## 1.8.0 — 2026-10-30
|
|
2
63
|
|
|
3
64
|
**本次发布只做一件事:把"安全"从形容词变成可核对的证据链 —— 按 ISO/IEC 15408:2026(CC)的结构公开自评估材料,并补上两处实现缺口。**
|
package/README.en.md
CHANGED
|
@@ -1,53 +1,47 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-workplan
|
|
2
|
+
|
|
3
|
+
> **Two selling points, one line: an ISO/IEC 15408:2026 (CC) evidence pack you can verify yourself, and a one-command install with zero runtime dependencies.**
|
|
2
4
|
|
|
3
5
|
[](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Adds "plan first → dispatch real department subagents → watch progress in the sidebar" to **DeepSeek Harness (DSH)**. No app, no DSH source patch, no page replacement.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
- A task-decomposition block appears in the conversation first: stages, work items, departments, acceptance criteria
|
|
10
|
+
- Up to 5 real subagents run in parallel and write results back into the session
|
|
11
|
+
- The **Task progress** panel shows who is working, how far, and what is stuck
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## 🌍 International security standard: the full evidence chain, and the honest boundary
|
|
13
|
+
**中文(简体)说明:** [README.md](README.md)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
---
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Why ISO/IEC 15408 is a selling point here — honestly
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- CC splits the work three ways: **the developer supplies evidence → an accredited lab evaluates it → a national scheme issues the certificate**. The certificate comes from a third party; **software cannot certify itself**.
|
|
21
|
-
- So any claim of "fully satisfies ISO/IEC 15408" without a **certificate number** is a false statement. This plugin has no certificate, and we **will not** write that.
|
|
19
|
+
**CC (Common Criteria, ISO/IEC 15408) works in three separated roles: the developer supplies evidence → an accredited lab evaluates it → a national scheme issues the certificate. Software cannot certify itself.** So "this plugin is CC certified", with no certificate number, is a false statement — we do not write it.
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
We do the half that can be done by us: **build the materials the 2026 edition (not 2022) asks for, in its own structure, and publish them so anyone can check.**
|
|
24
22
|
|
|
25
|
-
| What is published |
|
|
23
|
+
| What is published | In the standard | Where |
|
|
26
24
|
|---|---|---|
|
|
27
|
-
| What
|
|
25
|
+
| What it protects, from whom, where the boundary is | Security Target (ST) | [docs/cc/SECURITY-TARGET.md](docs/cc/SECURITY-TARGET.md) |
|
|
28
26
|
| Attack surface, 7 threats, countermeasures, residual risk | Vulnerability assessment (AVA) | [docs/cc/AVA-VULNERABILITY-ANALYSIS.md](docs/cc/AVA-VULNERABILITY-ANALYSIS.md) |
|
|
29
|
-
| Class-by-class mapping, EAL1 readiness, what is
|
|
30
|
-
|
|
|
31
|
-
| How to report a vulnerability, response times
|
|
32
|
-
|
|
|
27
|
+
| Class-by-class mapping, EAL1 readiness, what is missing | Self-assessment | [docs/cc/CC-2026-ASSESSMENT.md](docs/cc/CC-2026-ASSESSMENT.md) |
|
|
28
|
+
| Third-party components, licences, hashes | Life cycle (ALC) | [docs/SBOM.md](docs/SBOM.md) |
|
|
29
|
+
| How to report a vulnerability, response times | Security policy | [SECURITY.md](SECURITY.md) |
|
|
30
|
+
| 188 automated tests, one command to re-run | Testing (ATE) | `npm run verify` |
|
|
33
31
|
|
|
34
|
-
**
|
|
35
|
-
1. On engineering evidence, the material is close to **EAL1** — the lowest CC level (11 of 14 components ready, 2 partial, 1 that **only** an external lab can provide);
|
|
36
|
-
2. Certification itself costs lab time and money and **cannot be achieved by editing code**, so we do not pretend otherwise;
|
|
37
|
-
3. What we do claim is **checkable by anyone with 5 commands** — worth far more than the phrase "certified".
|
|
32
|
+
Status: of the 14 EAL1 components — CC's lowest level — **10 are ready, 3 partially ready, 1 can only come from an external lab**. What is missing is lab money and scheduling, not code, so we sell evidence and do not pretend to hold a certificate.
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
Check it yourself — 3 lines, copy-paste:
|
|
40
35
|
|
|
41
36
|
```bash
|
|
42
37
|
git clone https://github.com/abbaababa/dsh-workplan.git && cd dsh-workplan
|
|
43
|
-
npm ci && npm run verify # expect: tests
|
|
38
|
+
npm ci && npm run verify # expect: tests 188 / pass 188 / fail 0
|
|
44
39
|
grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 hits (expected)"
|
|
45
40
|
```
|
|
46
41
|
|
|
47
|
-
> Remember one line: **a certificate is given by a third party; evidence is earned by the project
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
---
|
|
42
|
+
> Remember one line: **a certificate is given by a third party; evidence is earned by the project.**
|
|
43
|
+
>
|
|
44
|
+
> **Self-correction record**: v1.8.1 publicly fixed three places in v1.8.0 where the documentation claimed more than the code did (the chart route is not auth-checked, the suite does not cover the auth/truncation branches, and the EAL1 matrix marked a self-contradicting component as ready). Details in the [CHANGELOG](CHANGELOG.md) and [assessment §6.1](docs/cc/CC-2026-ASSESSMENT.md).
|
|
51
45
|
|
|
52
46
|
## What it actually does
|
|
53
47
|
|
|
@@ -83,7 +77,7 @@ The full contract — roles, data shapes, state machine, recovery, and the three
|
|
|
83
77
|
## Install
|
|
84
78
|
|
|
85
79
|
```bash
|
|
86
|
-
dsh plugin --profile web add dsh-workplan@1.8.
|
|
80
|
+
dsh plugin --profile web add dsh-workplan@1.8.2
|
|
87
81
|
```
|
|
88
82
|
|
|
89
83
|
Restart the DSH Web process (or reload the page) so the bundle is picked up.
|
|
@@ -155,7 +149,8 @@ grep -RInE "writeFileSync|child_process|eval\(" src
|
|
|
155
149
|
npm audit --omit=dev
|
|
156
150
|
```
|
|
157
151
|
|
|
158
|
-
|
|
152
|
+
<details>
|
|
153
|
+
<summary><b>What 1.5.0 changes (progress you can see)</b> (click to expand)</summary>
|
|
159
154
|
|
|
160
155
|
1.5.0 is presentation-only: the collapsed plan card swaps its single grey line ("本计划 0/8 做好了" plus a 54×5px bar) for an actual chart.
|
|
161
156
|
|
|
@@ -172,7 +167,10 @@ None of the counts disappeared — the legend always carries all four buckets wi
|
|
|
172
167
|
|
|
173
168
|
No new dependencies, `plan.ts` / `runtime.ts` untouched; rollback is documented in [CHANGELOG.md](CHANGELOG.md).
|
|
174
169
|
|
|
175
|
-
|
|
170
|
+
</details>
|
|
171
|
+
|
|
172
|
+
<details>
|
|
173
|
+
<summary><b>What 1.4.3 fixes</b> (click to expand)</summary>
|
|
176
174
|
|
|
177
175
|
1.4.3 is a counting-consistency release. The plugin used to keep two sources of truth — live subtask state and a cached stats snapshot — so the panel could disagree with reality.
|
|
178
176
|
|
|
@@ -185,6 +183,8 @@ No new dependencies, `plan.ts` / `runtime.ts` untouched; rollback is documented
|
|
|
185
183
|
|
|
186
184
|
The fix removes the cached snapshot: every number is derived at serialisation time by one function, guarded by 7 invariants and mutation tests. Full report: [docs/fix-report-derived-counts-1.4.3.md](docs/fix-report-derived-counts-1.4.3.md).
|
|
187
185
|
|
|
186
|
+
</details>
|
|
187
|
+
|
|
188
188
|
## FAQ
|
|
189
189
|
|
|
190
190
|
**Nothing happens after installing.** Restart DSH Web; confirm `dsh-workplan` is in `~/.dsh/profiles/web/package.json`.
|
package/README.md
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-workplan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **两个卖点,一句话:安全证据按 ISO/IEC 15408:2026(CC)公开、自己就能验;安装只要一条命令、零第三方运行时依赖。**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/abbaababa/dsh-workplan/actions/workflows/verify.yml)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
> **不用装 App,不改 DSH 源码,不替换页面。** 装上以后多三样东西:对话里的计划、真的部门子 Agent、左侧栏一个「任务进度」面板。
|
|
7
|
+
给 **DeepSeek Harness(DSH)** 加一段「先拆计划 → 真派部门子 Agent 去做 → 左侧栏实时看进度」的能力。不装 App、不改 DSH 源码、不换页面。
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
- 对话里先出【任务分解】:阶段、子任务、部门、验收标准,一样不缺
|
|
10
|
+
- 最多 5 个真实子 Agent 并行执行,结果写回会话
|
|
11
|
+
- 左侧栏「任务进度」:谁在做、做到哪、哪件卡住了
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**English (US) — plain-language guide:** [README.en.md](README.en.md)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
---
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 为什么敢拿 ISO/IEC 15408 当卖点,又不算吹牛
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- CC 的规矩是三方分工:**写代码的人交材料 → 独立实验室去测 → 国家认证机构发证书**。证书由第三方签发,**软件自己不能给自己发**。
|
|
21
|
-
- 所以任何"我这个插件完全满足 ISO/IEC 15408"的说法,只要没给出**证书编号**,就是不实陈述。本插件没有证书,我们**不会**这么写。
|
|
19
|
+
**CC(Common Criteria,ISO/IEC 15408)的规矩是三方分工:开发者交材料 → 独立实验室评测 → 国家机构发证。软件不能给自己发证。** 所以「本插件已通过 CC 认证」这句话,没有证书编号就是假的——这种话我们不说。
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
我们做的是能自己做的那一半:**按 2026 版(不是 2022 版)标准的结构,把材料真做出来、公开出来,任何人都能自己核对。**
|
|
24
22
|
|
|
25
|
-
| 我们公开的 |
|
|
23
|
+
| 我们公开的 | 对应标准 | 在哪儿 |
|
|
26
24
|
|---|---|---|
|
|
27
|
-
|
|
|
25
|
+
| 保护什么、防谁、边界在哪 | 安全目标(ST) | [docs/cc/SECURITY-TARGET.md](docs/cc/SECURITY-TARGET.md) |
|
|
28
26
|
| 攻击面、7 条威胁、对策、残留风险 | 脆弱性评定(AVA) | [docs/cc/AVA-VULNERABILITY-ANALYSIS.md](docs/cc/AVA-VULNERABILITY-ANALYSIS.md) |
|
|
29
|
-
| 逐类对照 + EAL1 就绪度 + 还缺什么 |
|
|
30
|
-
|
|
|
27
|
+
| 逐类对照 + EAL1 就绪度 + 还缺什么 | 自评估 | [docs/cc/CC-2026-ASSESSMENT.md](docs/cc/CC-2026-ASSESSMENT.md) |
|
|
28
|
+
| 第三方组件、许可证、哈希 | 生命周期(ALC) | [docs/SBOM.md](docs/SBOM.md) |
|
|
31
29
|
| 漏洞怎么报、多久回、部署怎么配 | 安全策略 | [SECURITY.md](SECURITY.md) |
|
|
32
|
-
|
|
|
30
|
+
| 188 项自动化测试,一条命令复跑 | 测试(ATE) | `npm run verify` |
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
1. 工程实践上,材料已接近 CC 最低等级 **EAL1** 的要求(14 项组件里 11 项已就绪、2 项部分具备、1 项**完全**必须靠外部实验室);
|
|
36
|
-
2. 认证本身要花外部实验室的钱和时间,**不是改代码能解决的**,所以我们不吹;
|
|
37
|
-
3. 我们吹的是**能被任何人 5 条命令验证的事实**——这比一句"已通过认证"值钱得多。
|
|
32
|
+
现状:CC 最低等级 **EAL1** 的 14 项组件里,**10 项就绪、3 项部分具备、1 项只能靠外部实验室**。差的不是代码,是认证要花的实验室费用与排期——所以我们只卖证据,不冒充分证。
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
自己验,3 行,复制即用:
|
|
40
35
|
|
|
41
36
|
```bash
|
|
42
37
|
git clone https://github.com/abbaababa/dsh-workplan.git && cd dsh-workplan
|
|
43
|
-
npm ci && npm run verify # 期望:tests
|
|
38
|
+
npm ci && npm run verify # 期望:tests 188 / pass 188 / fail 0
|
|
44
39
|
grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中(预期)"
|
|
45
40
|
```
|
|
46
41
|
|
|
47
|
-
>
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
> 一句话记住:**有证书是第三方给的,有证据是自己挣的。**
|
|
43
|
+
>
|
|
44
|
+
> **自我更正记录**:v1.8.1 公开更正了 v1.8.0 里三处「文档写得比代码多」的地方(图表路由其实不鉴权、自测并未覆盖鉴权与截断分支、EAL1 矩阵把一个自相矛盾的组件判成就绪),详情见 [CHANGELOG](CHANGELOG.md) 与 [自评估 §6.1](docs/cc/CC-2026-ASSESSMENT.md)。
|
|
50
45
|
|
|
51
46
|
## 它到底做了什么(用大白话讲)
|
|
52
47
|
|
|
@@ -71,7 +66,7 @@ grep -RInE "child_process|execSync|eval\(|writeFileSync" src || echo "0 命中
|
|
|
71
66
|
## 一键安装
|
|
72
67
|
|
|
73
68
|
```bash
|
|
74
|
-
dsh plugin --profile web add dsh-workplan@1.8.
|
|
69
|
+
dsh plugin --profile web add dsh-workplan@1.8.2
|
|
75
70
|
```
|
|
76
71
|
|
|
77
72
|
装完**重启一次 DSH Web**(或重新载入当前页面)让插件生效。
|
|
@@ -159,7 +154,8 @@ grep -RInE "writeFileSync|child_process|eval\(" src # 应无命中
|
|
|
159
154
|
npm audit --omit=dev
|
|
160
155
|
```
|
|
161
156
|
|
|
162
|
-
|
|
157
|
+
<details>
|
|
158
|
+
<summary><b>1.5.0 改了什么(进度一眼可见)</b>(点开看)</summary>
|
|
163
159
|
|
|
164
160
|
1.5.0 只改展示层:把计划卡折叠态那行「本计划 0/8 做好了 + 一根 54×5px 的小条」换成图表组合。
|
|
165
161
|
|
|
@@ -176,7 +172,10 @@ npm audit --omit=dev
|
|
|
176
172
|
|
|
177
173
|
没有新增依赖,`plan.ts` / `runtime.ts` 无改动;回滚方式见 [CHANGELOG.md](CHANGELOG.md)。
|
|
178
174
|
|
|
179
|
-
|
|
175
|
+
</details>
|
|
176
|
+
|
|
177
|
+
<details>
|
|
178
|
+
<summary><b>1.4.3 修了什么(为什么值得升级)</b>(点开看)</summary>
|
|
180
179
|
|
|
181
180
|
1.4.3 是一次**计数一致性**修复:插件曾同时维护「实时任务状态」和「缓存的统计快照」两份真相,导致面板数字和实际状态对不上(截图里「0 个正在做」但下面有任务正在做,就是它)。
|
|
182
181
|
|
|
@@ -189,6 +188,8 @@ npm audit --omit=dev
|
|
|
189
188
|
|
|
190
189
|
修法是**删掉缓存快照,只保留一份状态源**:所有数字在序列化时由同一函数现场派生,并配了 7 条不变量 + 变异测试防止回退。完整报告:[docs/fix-report-derived-counts-1.4.3.md](docs/fix-report-derived-counts-1.4.3.md)。
|
|
191
190
|
|
|
191
|
+
</details>
|
|
192
|
+
|
|
192
193
|
## 常见问题
|
|
193
194
|
|
|
194
195
|
**装完没反应?**
|
package/SECURITY.md
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
| 入口 | 方法 | 谁能到 | 鉴权 |
|
|
54
54
|
|---|---|---|---|
|
|
55
55
|
| `/dsh-workplan/plans` | GET / HEAD | 浏览器 | 走 DSH 的 `connection.requestRejection`,未通过返回 401/403 |
|
|
56
|
-
| `/dsh-workplan/vendor/chart.umd.js` | GET / HEAD | 浏览器 |
|
|
56
|
+
| `/dsh-workplan/vendor/chart.umd.js` | GET / HEAD | 浏览器 | **不鉴权**:随包固定的公开静态资源(MIT 图表库),不含任何用户数据;非 GET/HEAD 返回 405 |
|
|
57
57
|
| `dsh_workplan_dispatch` 等 4 个工具 | 模型调用 | 仅主 Agent | plan 模式下 `dispatch` 被 guard 拒绝;写入带 `expectedRevision` 乐观锁 |
|
|
58
58
|
|
|
59
59
|
**没有的东西(可自行 grep 复核)**:
|
|
@@ -67,6 +67,17 @@ grep -RInE "child_process|execSync|eval\(|new Function|writeFileSync|appendFileS
|
|
|
67
67
|
- 不外发数据:唯一的 `fetch` 是浏览器请求**同源**的 `/dsh-workplan/plans`。
|
|
68
68
|
- 图表库 Chart.js 4.6.1(MIT)随包分发,不加载 CDN。
|
|
69
69
|
|
|
70
|
+
> **两条路由的鉴权是不一样的,这里明说**:`/dsh-workplan/plans`(带数据的那个)在每个请求上先问 DSH 的 `connection.requestRejection`,未通过就 401/403;`/dsh-workplan/vendor/chart.umd.js`(一个固定文件)**没有**这一步,它公开可读、内容固定、路径写死、只答 GET/HEAD。这是设计选择,不是漏配:图表库挂了面板只是少一张图,而数据接口必须挡。
|
|
71
|
+
>
|
|
72
|
+
> 复核命令(两条都会给出可观察输出):
|
|
73
|
+
>
|
|
74
|
+
> ```bash
|
|
75
|
+
> # 1) 数据接口:方法限制 + 鉴权调用都在
|
|
76
|
+
> grep -n "requestRejection\|allow: 'GET, HEAD'" src/runtime.ts
|
|
77
|
+
> # 2) 静态资源:只有方法限制,没有 requestRejection
|
|
78
|
+
> awk '/vendor\/chart.umd.js/,/^ },/' src/host.ts | grep -n "405\|requestRejection"
|
|
79
|
+
> ```
|
|
80
|
+
|
|
70
81
|
---
|
|
71
82
|
|
|
72
83
|
## 5. 威胁模型(简版)/ Threat model
|
package/docs/SBOM.md
CHANGED
|
@@ -76,7 +76,7 @@ shasum -a 256 vendor/chart.umd.js
|
|
|
76
76
|
| `src/watchdog.ts` | 207 | 子代理超时与预算监控 |
|
|
77
77
|
| `src/globals.d.ts` | 14 | 宿主 API 类型声明 |
|
|
78
78
|
| **合计** | **8044** | |
|
|
79
|
-
| `tests/*.test.ts` | **
|
|
79
|
+
| `tests/*.test.ts` | **31 个文件 / 188 项测试** | 自动化验证 |
|
|
80
80
|
|
|
81
81
|
(行数取自 `wc -l src/*.ts`,v1.8.0 实测。)
|
|
82
82
|
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
| 项目 | 内容 |
|
|
6
6
|
|---|---|
|
|
7
|
-
| 评估对象(TOE) | dsh-workplan 插件 v1.8.
|
|
7
|
+
| 评估对象(TOE) | dsh-workplan 插件 v1.8.1 |
|
|
8
8
|
| 评估性质 | **公开自评估(self-assessment),不是 CC 认证** |
|
|
9
9
|
| 依据标准 | ISO/IEC 15408-1/-2/-3/-4/-5:2026;ISO/IEC 18045:2026(CEM) |
|
|
10
10
|
| 报告日期 | 2026-10-30 |
|
|
11
11
|
| 报告者 | 项目维护者(abbaababa) |
|
|
12
|
-
| 结论摘要 | **不宣称通过 CC;按 15408-3 结构完成逐类自评,识别 8
|
|
12
|
+
| 结论摘要 | **不宣称通过 CC;按 15408-3 结构完成逐类自评,识别 8 项差距,1.8.x 修复 7 项,剩余项已列明原因** |
|
|
13
|
+
| 版本时差提醒 | ISO/IEC 15408:2026 已是现行国际标准,但各认证体系(JISEC / NASK / 欧盟 CC)截至 2026 年仍在受理 **CC:2022 Release 1**。本文参照 2026 版结构,真实评估须按受理方要求的版本进行 |
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
@@ -31,7 +32,7 @@ CC 的规矩是三方分工:写代码的人交材料(Security Target,安
|
|
|
31
32
|
| 列出所有第三方组件及许可证 | 生命周期 ALC | [../SBOM.md](../SBOM.md) |
|
|
32
33
|
| 补上缺失的安全响应头 | 实现修复 | `src/runtime.ts` |
|
|
33
34
|
| 公开漏洞报告渠道与时限 | 生命周期 / 响应 | [../../SECURITY.md](../../SECURITY.md) |
|
|
34
|
-
|
|
|
35
|
+
| 188 项自动化测试,可一键复跑 | 测试 ATE | `npm run verify` |
|
|
35
36
|
|
|
36
37
|
**结论(三句话)**:
|
|
37
38
|
1. 插件的**工程实践**已经接近 CC 最低等级 EAL1 的材料要求;
|
|
@@ -121,7 +122,7 @@ CC 符合性有三个**缺一不可**的硬前提:
|
|
|
121
122
|
| **ADV** 开发 | 设计是否被完整、正确地描述到实现 | 全部源码公开(5 个 TS 模块 + 1 个类型声明,共 8044 行);TSF 接口仅 2 路由 + 4 工具,可枚举 | 🟡 | 缺口:无独立的"功能规范(ADV_FSP)"文档与"实现表示(ADV_TDS)"文档;本报告第 2、5 节为最小替代 |
|
|
122
123
|
| **AGD** 指导性文档 | 用户/管理员能否正确安全地部署使用 | README(中英)、SECURITY.md 部署建议、FAQ | ✅ | `README.md`、`README.en.md`、`SECURITY.md`;含"我们不做/不宣称"清单 |
|
|
123
124
|
| **ALC** 生命周期支持 | 开发与交付过程是否受控、可追溯 | git 全历史(13 次提交)、CI(`npm ci` → `npm run verify` → 构建产物一致性检查)、版本五处同步测试 | 🟡 | 缺口:无正式《配置管理计划》文档、无可重现构建(reproducible build)证明 |
|
|
124
|
-
| **ATE** 测试 | 功能是否被独立验证过 |
|
|
125
|
+
| **ATE** 测试 | 功能是否被独立验证过 | 31 个测试文件 / **188 项测试**全部通过,`npm run verify` 一键复跑,CI 每次提交执行 | 🟡 | 已有自动化测试与失败路径覆盖;缺口:无实验室独立测试(ATE_IND.1),无正式测试覆盖矩阵 |
|
|
125
126
|
| **AVA** 脆弱性评定 | 是否存在可被利用的脆弱性 | 威胁模型 7 条、攻击面枚举、源码特征扫描(危险 API 0 命中)、零运行时依赖 | 🟡 | `docs/cc/AVA-VULNERABILITY-ANALYSIS.md`;缺口:无第三方渗透测试 |
|
|
126
127
|
| **ACO** 组合 | 组合产品间的依赖与信任传递 | 插件不是组合产品(无底层 TOE 依赖) | ➖ | 不适用 |
|
|
127
128
|
| **AMA** 保证维护 | 发布后如何维持保证 | 有 CHANGELOG、语义化版本、npm `latest`、漏洞响应时限 | 🟡 | 缺口:无正式 AMA 计划文档(CC 的 AMA 类通常仅在保证维护场景要求) |
|
|
@@ -139,7 +140,7 @@ EAL1 = "功能测试"级,是 CC 中最低、也是唯一对小工具现实可
|
|
|
139
140
|
| 组件 | 含义(大白话) | 状态 | 证据 | 还缺什么 |
|
|
140
141
|
|---|---|---|---|---|
|
|
141
142
|
| ASE_INT.1 | 说清这产品是什么 | ✅ | 本报告第 2 节、ST 草案 §1 | — |
|
|
142
|
-
| ASE_CCL.1 | 说清"符合什么标准" |
|
|
143
|
+
| ASE_CCL.1 | 说清"符合什么标准" | 🟡 | ST 草案 §2 显式写 "no conformance claim"——**诚实,但不是评估者要的符合性主张** | 真做评估时必须选一个 PP 或写明不针对任何 PP,并由评估者认可 |
|
|
143
144
|
| ASE_SPD.1 | 说清防谁、防什么 | ✅ | ST 草案 §3(7 威胁 / 3 假设 / 3 组织策略) | — |
|
|
144
145
|
| ASE_OBJ.1 | 说清安全目标 | ✅ | ST 草案 §4 | — |
|
|
145
146
|
| ASE_ECD.1 | 若有自定义要求,定义之 | ✅ | ST 草案 §5(声明不使用扩展组件) | — |
|
|
@@ -150,25 +151,35 @@ EAL1 = "功能测试"级,是 CC 中最低、也是唯一对小工具现实可
|
|
|
150
151
|
| AGD_PRE.1 | 有安装/准备指南 | ✅ | README 安装章节、SECURITY.md 部署建议 | — |
|
|
151
152
|
| ALC_CMC.1 | 有版本标识与唯一标识 | ✅ | `package.json` 版本五处同步测试、npm 发布记录、git tag | — |
|
|
152
153
|
| ALC_CMS.1 | 有配置项清单 | ✅ | `docs/SBOM.md` + `package-lock.json` + 文件清单 | 正式评估建议补 CM 计划 |
|
|
153
|
-
| ATE_IND.1 | 独立测试 | ❌ | 本仓有
|
|
154
|
+
| ATE_IND.1 | 独立测试 | ❌ | 本仓有 188 项自动化测试,但**不是独立实验室测试** | 必须外部实验室 |
|
|
154
155
|
| AVA_VAN.1 | 基础脆弱性分析 | 🟡 | AVA 文档 + 威胁模型 | 建议第三方渗透测试 |
|
|
155
156
|
|
|
156
|
-
**就绪度合计**:✅
|
|
157
|
+
**就绪度合计**:✅ 10 项 | 🟡 3 项(ASE_CCL.1 无符合性主张、ADV_FSP.1 缺独立接口规范、AVA_VAN.1 缺第三方评定)| ❌ 1 项(ATE_IND.1 独立测试)。
|
|
157
158
|
|
|
158
159
|
> 注意:**"就绪"≠"通过"**。上表说明的是"材料齐不齐",不是"实验室测没测"。
|
|
159
160
|
|
|
160
161
|
---
|
|
161
162
|
|
|
162
|
-
## 6. 本轮(v1.8.0)修复的差距
|
|
163
|
+
## 6. 本轮(v1.8.0 / v1.8.1)修复的差距
|
|
163
164
|
|
|
164
165
|
| 编号 | 差距 | 严重度 | 修复 | 验证 |
|
|
165
166
|
|---|---|---|---|---|
|
|
166
|
-
| D-01 | 响应缺少 `x-content-type-options: nosniff` 与 `referrer-policy: no-referrer`,存在浏览器把响应当别的类型解析的理论风险 | 中 | `src/runtime.ts` 新增冻结常量 `HARDENING_HEADERS` 与 `applyHardeningHeaders()`;`route()` 与 chart 路由均调用 | `tests/security-headers.test.ts`(
|
|
167
|
+
| D-01 | 响应缺少 `x-content-type-options: nosniff` 与 `referrer-policy: no-referrer`,存在浏览器把响应当别的类型解析的理论风险 | 中 | `src/runtime.ts` 新增冻结常量 `HARDENING_HEADERS` 与 `applyHardeningHeaders()`;`route()` 与 chart 路由均调用 | `tests/security-headers.test.ts`(5 项)+ 全量 188 项通过 |
|
|
167
168
|
| D-02 | 没有公开、可核验的漏洞报告渠道与响应时限 | 中 | 新增根目录 `SECURITY.md`:私密报告入口、时限承诺、攻击面、7 条威胁模型、部署建议、"不做/不宣称"清单 | 文件存在 + README 链接 |
|
|
168
169
|
| D-03 | 没有符合 ASE 结构的安全目标,无法回答"你到底保护什么" | 高 | 新增 `docs/cc/SECURITY-TARGET.md`(按 2026 版 7 个 ASE 族组织) | 与本报告 §4/§5 交叉引用一致 |
|
|
169
170
|
| D-04 | 没有依赖与供应链清单 | 中 | 新增 `docs/SBOM.md`(运行时 0 依赖 + 3 个开发依赖 + 1 个 vendored 文件,含 sha256) | 与 `package.json`、`package-lock.json` 一致 |
|
|
170
171
|
|
|
171
|
-
修复后回归:`npm run verify` → **
|
|
172
|
+
修复后回归:`npm run verify` → **188 tests / 188 pass / 0 fail**(2026-10-30,Node 见 CI 配置)。
|
|
173
|
+
|
|
174
|
+
### 6.1 v1.8.1:把"文档说得好听"改成"文档与实现一致"
|
|
175
|
+
|
|
176
|
+
v1.8.0 发布后,独立复核发现三处文档与实现不一致。它们不影响功能,但**一份讲安全的文档说错话,比没有文档更糟**,因此单独发补丁版更正,并留下记录:
|
|
177
|
+
|
|
178
|
+
| 编号 | 差距 | 更正 |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| D-05 | `SECURITY.md` / `SECURITY-TARGET.md` 称图表库路由"同上鉴权",实际不调用 `requestRejection` | 文档改为明说"不鉴权:公开静态资源、无用户数据、只答 GET/HEAD";同时给该路由补上 GET/HEAD 方法限制(非 GET/HEAD → 405)与 HEAD 无响应体处理,并加测试固定该行为 |
|
|
181
|
+
| D-06 | `SECURITY-TARGET.md` 称自测覆盖"鉴权分支、方法限制、响应截断" | 改为如实列出已覆盖项,并写明缺口:`route()` 的 401/403、405、2.5 MB 截断目前只有源码级断言,没有逐分支用例 |
|
|
182
|
+
| D-07 | EAL1 矩阵把 `ASE_CCL.1` 判为 ✅(与 ST 开头 "Conformance claim: NONE" 自相矛盾) | 改为 🟡;就绪度合计由 11 项改为 **10 项** |
|
|
172
183
|
|
|
173
184
|
---
|
|
174
185
|
|
|
@@ -177,6 +188,7 @@ EAL1 = "功能测试"级,是 CC 中最低、也是唯一对小工具现实可
|
|
|
177
188
|
| 编号 | 差距 | 为什么不修 | 影响 |
|
|
178
189
|
|---|---|---|---|
|
|
179
190
|
| N-01 | 无 CC 证书 | 需认可实验室评测 + 认证机构发证 + 费用与周期,非代码可解 | 不能对外宣称"通过/完全满足" |
|
|
191
|
+
| N-07 | 认证体系当前仍在用 2022 版 | 截至 2026 年,JISEC、NASK 与欧盟 CC 证书仍要求 **CC/CEM:2022 Release 1**(含勘误 v1.2);ISO 已发布的 2026 版尚未被各认证体系普遍采用 | 本文参照 ISO 2026 版结构,但**任何真实评估都会先按 2022 版受理**;这是标准版本与认证实践的时差,不是本插件的缺陷 |
|
|
180
192
|
| N-02 | 无独立实验室测试(ATE_IND.1) | 同上 | 测试结论仅为自测 |
|
|
181
193
|
| N-03 | 无第三方渗透测试(AVA_VAN.1 深度部分) | 需外部安全团队,本项目无预算 | 脆弱性分析为自评 |
|
|
182
194
|
| N-04 | 无形式化/半形式化功能规范(ADV_FSP 完整版) | 对 8 千行插件属过度投入;已用接口枚举 + 源码公开替代 | 材料强度低于正式 EAL1 要求 |
|
|
@@ -230,7 +242,7 @@ npm ci
|
|
|
230
242
|
|
|
231
243
|
# 3) 一键复跑:类型检查 + 构建 + 全部测试
|
|
232
244
|
npm run verify
|
|
233
|
-
# 期望最后看到:tests
|
|
245
|
+
# 期望最后看到:tests 188 / pass 188 / fail 0
|
|
234
246
|
|
|
235
247
|
# 4) 复核"无危险 API"这一条
|
|
236
248
|
grep -RInE "child_process|execSync|eval\(|new Function|writeFileSync|appendFileSync|mkdirSync|https?\.request" src || echo "0 命中(预期)"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
| 接口 | 类型 | 方向 | 说明 |
|
|
55
55
|
|---|---|---|---|
|
|
56
56
|
| `/dsh-workplan/plans` | HTTP GET/HEAD | 入 | 返回当前会话计划 JSON;非 GET/HEAD 返回 405 |
|
|
57
|
-
| `/dsh-workplan/vendor/chart.umd.js` | HTTP GET/HEAD | 入 |
|
|
57
|
+
| `/dsh-workplan/vendor/chart.umd.js` | HTTP GET/HEAD | 入 | 返回随包固定的图表库静态文件;路径为常量,非 GET/HEAD 返回 405;**不经 `connection.requestRejection`**(公开静态资源,无用户数据,风险已声明于本文件 §9) |
|
|
58
58
|
| `dsh_workplan_dispatch` | 模型工具 | 双向 | 派发计划;plan 模式下被 guard 拒绝 |
|
|
59
59
|
| `dsh_workplan_status` | 模型工具 | 双向 | 只读查询进度 |
|
|
60
60
|
| `dsh_workplan_update` | 模型工具 | 双向 | 更新子任务状态,需 `expectedRevision` |
|
|
@@ -158,6 +158,7 @@ TOE 应强制执行以下信息流控制策略:*受保护的计划数据只能
|
|
|
158
158
|
|
|
159
159
|
**FDP_IFF.1 简单安全属性**
|
|
160
160
|
TOE 应基于以下属性允许信息流:请求同源、方法 ∈ {GET, HEAD}、环境鉴权通过。
|
|
161
|
+
- 适用范围:携带受保护计划数据的 `/dsh-workplan/plans`。`/dsh-workplan/vendor/chart.umd.js` 返回的是不含任何会话数据的固定第三方库文件,其信息流属性为「同源 + 方法 ∈ {GET, HEAD}」,不含鉴权属性(见 §9 残余风险)。
|
|
161
162
|
- 理由:把"谁能看"变成可判定的布尔条件,而非策略口号。
|
|
162
163
|
|
|
163
164
|
### 6.2 识别(FIA_UID)
|
|
@@ -187,8 +188,10 @@ TOE 应在以下事件发生时生成可追溯记录:计划创建、派发开
|
|
|
187
188
|
### 6.5 TSF 自测试(FPT_TST)
|
|
188
189
|
|
|
189
190
|
**FPT_TST.1 TSF 自测试**
|
|
190
|
-
TOE
|
|
191
|
-
|
|
191
|
+
TOE 应提供可重复执行的自测试,覆盖:计划模型校验、派发与取消语义、看门狗超时、预算与恢复、版本一致性、安全响应头、路由方法约束的源码级断言。
|
|
192
|
+
|
|
193
|
+
- 赋值:测试套件 = `npm run verify`(31 个文件 / 188 项测试,CI 每次提交执行)。
|
|
194
|
+
- **已知缺口(如实记录,不掩饰)**:`route()` 内部的鉴权分支(401/403)、405 分支与 2.5 MB 截断分支目前**没有**逐分支自动化用例,只有源码级断言(`tests/security-headers.test.ts` 断言加固头被注册、图表路由的 405 与方法限制存在)。补这些用例需要构造 DSH `connection` 桩件,属于待办而非已完成项,故本节不把「鉴权分支、方法限制、响应截断」列为已覆盖。
|
|
192
195
|
- 理由:O-05、O-07 的可复现证据来源;对应 ATE 类的自测部分。
|
|
193
196
|
|
|
194
197
|
---
|
|
@@ -197,13 +200,13 @@ TOE 应提供可重复执行的自测试,覆盖:计划模型校验、鉴权
|
|
|
197
200
|
|
|
198
201
|
| 要求 | 实现位置 | 具体做法 | 复核命令 |
|
|
199
202
|
|---|---|---|---|
|
|
200
|
-
| FDP_IFC.1 / FDP_IFF.1 | `src/runtime.ts` `route()` | 仅注册 2 条 `exact`
|
|
203
|
+
| FDP_IFC.1 / FDP_IFF.1 | `src/runtime.ts` `route()`、`src/host.ts` | 仅注册 2 条 `exact` 路由;两条都只答 GET/HEAD(其余 → 405);`/plans` 响应带 `cache-control: no-store` | `grep -n "no-store" src/runtime.ts; grep -n "405" src/host.ts` |
|
|
201
204
|
| FDP_IFC.1(无出站) | 全仓 | 除浏览器同源 `fetch('/dsh-workplan/plans')` 外无任何网络调用 | 见 §8 扫描命令 |
|
|
202
|
-
| FIA_UID.1 | `src/runtime.ts` `route()`
|
|
205
|
+
| FIA_UID.1 | `src/runtime.ts` `route()` 开头(仅 `/plans`) | 先 `await connectionCtx.connection.requestRejection(req)`,拒绝则直接返回;图表路由不调用(公开静态资源) | `grep -n requestRejection src/runtime.ts src/host.ts` |
|
|
203
206
|
| FMT_MOF.1 / FMT_SMF.1 | `src/host.ts` 工具注册 | 4 个工具;`update` 强制 `expectedRevision`,不匹配返回 `STALE_WRITE`;plan 模式下 `dispatch` 被 guard 拒绝 | `grep -n "expectedRevision" src/*.ts` |
|
|
204
207
|
| FMT_SMR.1 | 同上 + 路由 | 浏览器角色只能 GET/HEAD;写操作只能经模型工具 | 同 FMT_MOF.1 |
|
|
205
208
|
| FAU_GEN.1 | 会话事件 + 工具返回值 | 每次派发/完成/取消/拒绝均落会话事件,含证据字段 | 阅读 `dsh_workplan_status` 返回结构 |
|
|
206
|
-
| FPT_TST.1 | `tests/` + `npm run verify` |
|
|
209
|
+
| FPT_TST.1 | `tests/` + `npm run verify` | 31 文件 188 项;CI 每次提交执行 | `npm run verify` |
|
|
207
210
|
| O-05 资源有界 | `src/runtime.ts`、`src/watchdog.ts` | 响应 > 2.5 MB 截断;子代理与总预算双超时且被夹紧 | `grep -n "2_500_000" src/runtime.ts` |
|
|
208
211
|
| O-02/O-03 硬化头 | `src/runtime.ts` `HARDENING_HEADERS` | `x-content-type-options: nosniff`、`referrer-policy: no-referrer` | `grep -n HARDENING_HEADERS src/runtime.ts` |
|
|
209
212
|
| P-02 零运行时依赖 | `package.json` | `dependencies` 为空对象 | `npm ls --omit=dev` |
|
|
@@ -217,7 +220,7 @@ TOE 应提供可重复执行的自测试,覆盖:计划模型校验、鉴权
|
|
|
217
220
|
```bash
|
|
218
221
|
git clone https://github.com/abbaababa/dsh-workplan.git && cd dsh-workplan
|
|
219
222
|
npm ci
|
|
220
|
-
npm run verify # 期望:tests
|
|
223
|
+
npm run verify # 期望:tests 188 / pass 188 / fail 0
|
|
221
224
|
|
|
222
225
|
# 无危险 API
|
|
223
226
|
grep -RInE "child_process|execSync|eval\(|new Function|writeFileSync|appendFileSync|mkdirSync|https?\.request" src || echo "0 命中(预期)"
|
|
@@ -237,3 +240,5 @@ grep -n "requestRejection\|HARDENING_HEADERS\|2_500_000\|expectedRevision" src/r
|
|
|
237
240
|
2. §6 的 SFR 为**自选**,用于把实现约束写成可检查的条款;不是对任何 PP 的符合性声明。
|
|
238
241
|
3. §7 的"实现如何做到"仅覆盖本文列出的要求,不覆盖 DSH 本体、Node.js、OS 的安全属性。
|
|
239
242
|
4. 发现本文件与实现不一致时,**以实现与测试为准**,并按 `SECURITY.md` 渠道报告——这本身也是 T-07(虚假完成)在本项目上的应用。
|
|
243
|
+
5. **已声明的残余风险 R-07**:`/dsh-workplan/vendor/chart.umd.js` 不调用 `connection.requestRejection`,任何人只要能连到 DSH 端口就能读到这个固定文件(Chart.js 4.6.1,MIT,210078 字节,sha256 见 `docs/SBOM.md`)。它不含任何会话数据,读走它不泄露任何用户信息;它的存在本身也不构成秘密。若你的部署要求"任何响应都必须先鉴权",请在前置反向代理上统一拦截 `/dsh-workplan/*`。
|
|
244
|
+
6. **已声明的测试缺口**:`route()` 的鉴权拒绝分支、405 分支、响应截断分支没有逐分支自动化用例(见 §6.5)。这些行为目前由代码阅读与源码级断言支撑,不是由测试支撑;补测需要构造 DSH `connection` 桩件。
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
## 1.8.0 — 把"安全"从形容词变成证据链
|
|
2
|
+
|
|
3
|
+
> **一句话**:这一版给了你一份**按国际安全标准结构写出来、能被任何人 5 条命令复核**的材料,并且**明确告诉你它没有证书**。
|
|
4
|
+
>
|
|
5
|
+
> **One line**: this release ships security material **structured by an international security standard, verifiable by anyone in 5 commands**, and it **tells you plainly that there is no certificate**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🌍 为什么"通过 ISO/IEC 15408"这句话不能随便说
|
|
10
|
+
|
|
11
|
+
ISO/IEC 15408(简称 **CC**,通用准则)是国际安全标准,最新版是 **2026 年版**。它的规矩是三方分工:
|
|
12
|
+
|
|
13
|
+
**写代码的人交材料 → 独立实验室按 ISO/IEC 18045 去测 → 国家认证机构发证书。**
|
|
14
|
+
|
|
15
|
+
证书由第三方签发,**软件不能给自己发**。所以任何"本插件完全满足/已通过 ISO/IEC 15408"却没有**证书编号**的说法,都是不实陈述。
|
|
16
|
+
|
|
17
|
+
**本插件没有证书,所以我们不这么写。** 我们做的是把 CC 要的材料按标准结构真做出来、公开出来。
|
|
18
|
+
|
|
19
|
+
CC splits the work three ways: **developer supplies evidence → accredited lab evaluates → national scheme issues the certificate**. Software cannot certify itself. This plugin has no certificate, so it makes no such claim — instead it publishes the evidence, in the standard's own structure.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## ✅ 这一版新增了什么
|
|
24
|
+
|
|
25
|
+
| 材料 | 对应标准 | 内容 |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| [docs/cc/CC-2026-ASSESSMENT.md](https://github.com/abbaababa/dsh-workplan/blob/main/docs/cc/CC-2026-ASSESSMENT.md) | 自评估 | 按保证类逐类判定(ASE/ADV/AGD/ALC/ATE/AVA),**EAL1 就绪度矩阵**(14 项组件:11 就绪 / 2 部分 / 1 必须靠外部实验室),未修复差距逐条写明原因 |
|
|
28
|
+
| [docs/cc/SECURITY-TARGET.md](https://github.com/abbaababa/dsh-workplan/blob/main/docs/cc/SECURITY-TARGET.md) | 安全目标 ST | 首行即写 **"Conformance claim: NONE"**;7 条威胁、3 条假设、3 条组织策略、8 个功能要求组件,逐条映射到实现与验证命令 |
|
|
29
|
+
| [docs/cc/AVA-VULNERABILITY-ANALYSIS.md](https://github.com/abbaababa/dsh-workplan/blob/main/docs/cc/AVA-VULNERABILITY-ANALYSIS.md) | 脆弱性评定 | 攻击面穷举(2 条只读路由 + 4 个工具 + 1 个随包文件)、威胁→对策→残留风险、8 项缺陷(5 项本次修掉,3 项写明接受理由) |
|
|
30
|
+
| [docs/SBOM.md](https://github.com/abbaababa/dsh-workplan/blob/main/docs/SBOM.md) | 生命周期 ALC | 运行时 **0** 依赖;6 个开发依赖;1 个随包第三方文件(Chart.js 4.6.1 MIT,附 SHA-256) |
|
|
31
|
+
| [SECURITY.md](https://github.com/abbaababa/dsh-workplan/blob/main/SECURITY.md) | 安全策略 | 漏洞私密报告渠道与时限、攻击面、部署建议、**5 条"我们不做/不宣称"** |
|
|
32
|
+
| 187 项自动化测试 | 测试 ATE | `npm run verify` 一条命令复跑(1.7.1 为 183 项) |
|
|
33
|
+
|
|
34
|
+
## 🔧 实现层修复
|
|
35
|
+
|
|
36
|
+
- `src/runtime.ts`:新增冻结常量 `HARDENING_HEADERS`(`x-content-type-options: nosniff`、`referrer-policy: no-referrer`)与 `applyHardeningHeaders()`,在 `route()` 入口统一应用。
|
|
37
|
+
- `src/host.ts`:chart 静态文件路由同样应用,避免两条路由策略不一致。
|
|
38
|
+
- 新增 `tests/security-headers.test.ts`(4 项),锁死上述行为并断言两条路由都调用了加固助手。
|
|
39
|
+
- `package.json` 的 `files` 增加 `SECURITY.md` 与 `docs`,npm 包内即可查阅全部合规材料。
|
|
40
|
+
|
|
41
|
+
## 📦 安装(30 秒,小白版)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
dsh plugin --profile web add dsh-workplan@1.8.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
装完**重启一次 DSH Web**,刷新 <http://127.0.0.1:3080> 即可。
|
|
48
|
+
|
|
49
|
+
> Node.js 需要 **22 或更高**(`node -v` 自查)。
|
|
50
|
+
|
|
51
|
+
## 🔍 自己验证(不用相信我们)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/abbaababa/dsh-workplan.git && cd dsh-workplan
|
|
55
|
+
npm ci
|
|
56
|
+
npm run verify # 期望:tests 187 / pass 187 / fail 0
|
|
57
|
+
|
|
58
|
+
# 复核"无危险 API"这一条
|
|
59
|
+
grep -RInE "child_process|execSync|eval\(|new Function|writeFileSync|appendFileSync|mkdirSync|https?\.request" src || echo "0 命中(预期)"
|
|
60
|
+
|
|
61
|
+
# 复核硬化响应头确实生效
|
|
62
|
+
grep -n "HARDENING_HEADERS" src/runtime.ts
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## ⚠️ 我们不宣称的事
|
|
66
|
+
|
|
67
|
+
1. 没有 CC 证书,没有通过任何实验室评测。
|
|
68
|
+
2. 不是"完全满足 ISO/IEC 15408"的产品。
|
|
69
|
+
3. 不提供多租户隔离、加密存储、独立审计日志服务。
|
|
70
|
+
4. 不替代 DSH 自身的身份认证与权限体系。
|
|
71
|
+
5. 认证需要外部实验室与费用,**不是改代码能解决的**——所以这份材料的目标是"可复核",不是"冒充已认证"。
|
|
72
|
+
|
|
73
|
+
## 升级须知
|
|
74
|
+
|
|
75
|
+
- 无破坏性变更,无新增运行时依赖。
|
|
76
|
+
- 反向代理后部署请仍按 `SECURITY.md` §6 自行加 TLS 与认证。
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
**English summary**: Added a public self-assessment structured on ISO/IEC 15408:2026 (CC) — class-by-class mapping, EAL1 readiness matrix, a Security Target draft whose first line says `Conformance claim: NONE`, a vulnerability analysis with an enumerated attack surface, an SBOM (zero runtime dependencies), and a security policy with a private reporting channel. Hardened HTTP responses with `nosniff` and `no-referrer`, added 4 tests (183 → 187). No certificate is claimed, and none should be implied.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# dsh-workplan 1.8.1 — 自我更正版 / Self-correction release
|
|
2
|
+
|
|
3
|
+
**2026-10-30 | 补丁版 | 无新功能,无新主张,只修"说错的话"**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 一句话
|
|
8
|
+
|
|
9
|
+
1.8.0 发布后我们做了独立复核,发现**文档有三处说得比代码多**。讲安全的文档说错话,比不写文档更糟,所以单独发一个补丁版把话改对,并把改的过程也公开。
|
|
10
|
+
|
|
11
|
+
> 本版**没有**新增任何安全主张。仍然没有 CC 证书,仍然不宣称"通过"或"完全满足"。
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 改了什么(三条,都是文档)
|
|
16
|
+
|
|
17
|
+
| # | 之前怎么写 | 实际上 | 现在怎么写 |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| 1 | 图表库路由(`/dsh-workplan/vendor/chart.umd.js`)"同上鉴权" | 该路由从来没调用 `connection.requestRejection`;一条 `curl` 就能证伪 | 明说:这是**公开静态资源**(随包固定的 Chart.js 4.6.1,MIT,不含任何会话数据),只答 GET/HEAD,**不鉴权**;带数据的 `/dsh-workplan/plans` 才鉴权 |
|
|
20
|
+
| 2 | 自测覆盖"鉴权分支、方法限制、响应截断" | `tests/` 里 401/403、405、2.5 MB 截断**没有**逐分支用例 | 如实列出已覆盖项,并把缺口登记为安全目标草案 §9 的已声明缺口 |
|
|
21
|
+
| 3 | EAL1 矩阵里 `ASE_CCL.1` = ✅ | 同一份文档开头写着 "Conformance claim: NONE",自相矛盾 | 改为 🟡;就绪度合计 **11 项 → 10 项**(10 就绪 / 3 部分 / 1 必须外部实验室) |
|
|
22
|
+
|
|
23
|
+
## 改了什么(一处代码)
|
|
24
|
+
|
|
25
|
+
- `src/host.ts`:图表库路由补上方法限制 —— 非 GET/HEAD 返回 `405` 并带 `allow: GET, HEAD`;HEAD 只回头不回体。路径仍是常量(不由请求 URL 拼接),依旧没有写盘、子进程、出站请求。
|
|
26
|
+
|
|
27
|
+
## 补了什么(一处测试)
|
|
28
|
+
|
|
29
|
+
- `tests/security-headers.test.ts` 新增 1 项:断言图表路由的 405 与 GET/HEAD 限制确实存在,防止文档与实现再次各说各话。**187 → 188 项。**
|
|
30
|
+
|
|
31
|
+
## 补了一句必须说的话
|
|
32
|
+
|
|
33
|
+
**ISO/IEC 15408:2026 是现行国际标准,但认证体系还在用 2022 版。** 截至 2026 年,JISEC、波兰 NASK 与欧盟 CC 证书报告都仍要求 **CC/CEM:2022 Release 1**(含 2025-10-15 勘误 v1.2)。也就是说:我们参照的是最新版标准的结构,而**真实评估会先按 2022 版受理**。这是标准版本与认证实践之间的时差,不是插件的缺陷——但不说清楚就是误导,所以写进了自评估报告(差距 N-07)。
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 自己验证(复制即用)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/abbaababa/dsh-workplan.git && cd dsh-workplan
|
|
41
|
+
git checkout v1.8.1
|
|
42
|
+
npm ci && npm run verify # 期望:tests 188 / pass 188 / fail 0
|
|
43
|
+
|
|
44
|
+
# 1) 带数据的路由:有鉴权、有 405
|
|
45
|
+
grep -n "requestRejection\|allow: 'GET, HEAD'" src/runtime.ts
|
|
46
|
+
|
|
47
|
+
# 2) 静态资源路由:有 405,没有 requestRejection
|
|
48
|
+
awk '/vendor\/chart.umd.js/,/^ },/' src/host.ts | grep -n "405\|requestRejection"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
第二条命令的输出里,`405` 命中、`requestRejection` 不命中 —— 这正是文档现在说的样子。
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## English summary
|
|
56
|
+
|
|
57
|
+
**1.8.1 is a self-correction release with no new features and no new claims.**
|
|
58
|
+
|
|
59
|
+
After publishing 1.8.0 we ran an independent review and found three places where the documentation promised more than the code delivered:
|
|
60
|
+
|
|
61
|
+
1. `SECURITY.md` / `docs/cc/SECURITY-TARGET.md` claimed the vendored Chart.js route ran the same auth check as `/dsh-workplan/plans`. It never did. The docs now state the asymmetry plainly: the asset route is public, fixed, session-data-free, GET/HEAD only and **not** auth-checked; the data route is.
|
|
62
|
+
2. `SECURITY-TARGET.md` claimed the test suite covered the auth, method-restriction and truncation branches. It does not. The docs now list what is covered and register the gap in §9 of the Security Target draft.
|
|
63
|
+
3. The EAL1 matrix marked `ASE_CCL.1` as ready while the same document opens with `Conformance claim: NONE`. Corrected to partial; readiness is now **10 ready / 3 partial / 1 external-lab-only**.
|
|
64
|
+
|
|
65
|
+
One code change (the asset route now returns `405` for non-GET/HEAD with `allow: GET, HEAD`, and answers HEAD without a body) and one new test that pins it. The suite went from 187 to 188 tests.
|
|
66
|
+
|
|
67
|
+
One correction of substance: **ISO/IEC 15408:2026 is the current standard, but certification schemes still accept CC:2022 Release 1** (JISEC, NASK, and EU CC certificate reports as of 2026, including erratum v1.2 of 2025-10-15). Our material follows the 2026 structure; a real evaluation would be accepted under the 2022 edition first. That is a timing gap between standard and practice, not a plugin defect — but leaving it unsaid would mislead, so it is now recorded as gap N-07.
|
|
68
|
+
|
|
69
|
+
**Still true, unchanged:** no certificate, no lab evaluation, no EAL rating, no claim of "full compliance". What we publish is evidence anyone can re-run.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# dsh-workplan v1.8.2 — 首页说人话版 / a clearer front page
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
这一版只改文档,不改代码。
|
|
6
|
+
|
|
7
|
+
**首页第一句现在直接讲两个卖点:**
|
|
8
|
+
|
|
9
|
+
1. 安全证据按 **ISO/IEC 15408:2026(CC)** 公开,5 条命令自己验 —— 明说没有证书,也绝不宣称"通过认证";
|
|
10
|
+
2. 安装只要**一条命令**,**零第三方运行时依赖**。
|
|
11
|
+
|
|
12
|
+
顺手把首屏的铺陈删了:原来要滚过大段标准科普才看到卖点,现在前 5 行讲完;`1.5.0`/`1.4.3` 的历史说明折叠收起,内容没删。
|
|
13
|
+
|
|
14
|
+
安装:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
dsh plugin --profile web add dsh-workplan@1.8.2
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## English
|
|
21
|
+
|
|
22
|
+
Documentation only — no code changes.
|
|
23
|
+
|
|
24
|
+
**The first line of the README now states both selling points:**
|
|
25
|
+
|
|
26
|
+
1. An **ISO/IEC 15408:2026 (CC)** evidence pack you can verify with 5 commands — no certificate is claimed, and we never say "certified";
|
|
27
|
+
2. A **one-command install** with **zero runtime dependencies**.
|
|
28
|
+
|
|
29
|
+
The front page was also de-bloated: the selling points used to sit below a long standards explainer; now they appear in the first 5 lines, and the 1.5.0/1.4.3 history sections are collapsed (nothing deleted).
|
|
30
|
+
|
|
31
|
+
Install:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
dsh plugin --profile web add dsh-workplan@1.8.2
|
|
35
|
+
```
|
package/lib/host.js
CHANGED
|
@@ -336,12 +336,28 @@ export function apply(ctx, config = {}) {
|
|
|
336
336
|
path: '/dsh-workplan/vendor/chart.umd.js',
|
|
337
337
|
handler: (req, res) => {
|
|
338
338
|
applyHardeningHeaders(res);
|
|
339
|
+
/*
|
|
340
|
+
* [1.8.1] Read-only, and it stays read-only: the file path is a
|
|
341
|
+
* constant (never built from the request URL) and only GET/HEAD are
|
|
342
|
+
* answered. It deliberately does NOT call
|
|
343
|
+
* `connection.requestRejection`: this is a public, non-sensitive
|
|
344
|
+
* static asset with no per-user data. `/dsh-workplan/plans` is the
|
|
345
|
+
* route that carries data, and that one is auth-checked in
|
|
346
|
+
* `runtime.route()`. SECURITY.md states this asymmetry explicitly.
|
|
347
|
+
*/
|
|
348
|
+
if (req?.method !== 'GET' && req?.method !== 'HEAD') {
|
|
349
|
+
res.statusCode = 405;
|
|
350
|
+
res.setHeader('allow', 'GET, HEAD');
|
|
351
|
+
res.setHeader('content-type', 'text/plain; charset=utf-8');
|
|
352
|
+
res.end();
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
339
355
|
try {
|
|
340
356
|
const body = readFileSync(new URL('../vendor/chart.umd.js', import.meta.url));
|
|
341
357
|
res.statusCode = 200;
|
|
342
358
|
res.setHeader('content-type', 'text/javascript; charset=utf-8');
|
|
343
359
|
res.setHeader('cache-control', 'public, max-age=3600');
|
|
344
|
-
res.end(body);
|
|
360
|
+
res.end(req?.method === 'HEAD' ? undefined : body);
|
|
345
361
|
}
|
|
346
362
|
catch (error) {
|
|
347
363
|
res.statusCode = 404;
|
|
@@ -355,7 +371,7 @@ export function apply(ctx, config = {}) {
|
|
|
355
371
|
}
|
|
356
372
|
export const meta = {
|
|
357
373
|
name,
|
|
358
|
-
version: '1.8.
|
|
374
|
+
version: '1.8.2',
|
|
359
375
|
promptOrder: PROMPT_ORDER,
|
|
360
376
|
routes: ['/dsh-workplan/plans', '/dsh-workplan/vendor/chart.umd.js'],
|
|
361
377
|
};
|
package/package.json
CHANGED
package/src/host.ts
CHANGED
|
@@ -371,12 +371,28 @@ export function apply(ctx: any, config: WorkplanConfig = {}) {
|
|
|
371
371
|
path: '/dsh-workplan/vendor/chart.umd.js',
|
|
372
372
|
handler: (req: any, res: any) => {
|
|
373
373
|
applyHardeningHeaders(res)
|
|
374
|
+
/*
|
|
375
|
+
* [1.8.1] Read-only, and it stays read-only: the file path is a
|
|
376
|
+
* constant (never built from the request URL) and only GET/HEAD are
|
|
377
|
+
* answered. It deliberately does NOT call
|
|
378
|
+
* `connection.requestRejection`: this is a public, non-sensitive
|
|
379
|
+
* static asset with no per-user data. `/dsh-workplan/plans` is the
|
|
380
|
+
* route that carries data, and that one is auth-checked in
|
|
381
|
+
* `runtime.route()`. SECURITY.md states this asymmetry explicitly.
|
|
382
|
+
*/
|
|
383
|
+
if (req?.method !== 'GET' && req?.method !== 'HEAD') {
|
|
384
|
+
res.statusCode = 405
|
|
385
|
+
res.setHeader('allow', 'GET, HEAD')
|
|
386
|
+
res.setHeader('content-type', 'text/plain; charset=utf-8')
|
|
387
|
+
res.end()
|
|
388
|
+
return
|
|
389
|
+
}
|
|
374
390
|
try {
|
|
375
391
|
const body = readFileSync(new URL('../vendor/chart.umd.js', import.meta.url))
|
|
376
392
|
res.statusCode = 200
|
|
377
393
|
res.setHeader('content-type', 'text/javascript; charset=utf-8')
|
|
378
394
|
res.setHeader('cache-control', 'public, max-age=3600')
|
|
379
|
-
res.end(body)
|
|
395
|
+
res.end(req?.method === 'HEAD' ? undefined : body)
|
|
380
396
|
} catch (error) {
|
|
381
397
|
res.statusCode = 404
|
|
382
398
|
res.setHeader('content-type', 'text/plain; charset=utf-8')
|
|
@@ -392,7 +408,7 @@ export function apply(ctx: any, config: WorkplanConfig = {}) {
|
|
|
392
408
|
|
|
393
409
|
export const meta = {
|
|
394
410
|
name,
|
|
395
|
-
version: '1.8.
|
|
411
|
+
version: '1.8.2',
|
|
396
412
|
promptOrder: PROMPT_ORDER,
|
|
397
413
|
routes: ['/dsh-workplan/plans', '/dsh-workplan/vendor/chart.umd.js'],
|
|
398
414
|
}
|