dsh-deeppilot 0.3.0 → 0.5.0

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/COMPATIBILITY.md CHANGED
@@ -1,36 +1,39 @@
1
1
  # Compatibility
2
2
 
3
- This file separates tested evidence from intended fallback behavior. Passing
4
- unit tests does not prove every DSH build, network, Mac, or iPhone combination.
3
+ This file separates tested evidence from intended behavior. Passing unit tests does not prove every DSH build, network, Mac, or iPhone combination.
5
4
 
6
5
  ## Public-beta baseline
7
6
 
8
7
  | Component | Baseline | Evidence |
9
8
  |---|---|---|
10
9
  | Node.js | 22 or newer | package engine and CI |
11
- | DSH packages | `0.1.1-rc.2` peer family | build/type contracts and isolated host smoke tests |
10
+ | DSH Host API | 0.1.2 controller family | source-built 0.1.2 Host, paired iOS client, new- and legacy-session history, and `/phone` protocol tests |
12
11
  | Host OS | macOS on Apple silicon | embedded helper artifact and local integration testing |
13
- | Remote access | Tailscale Funnel, ports 443/8443/10000 | helper and supervisor tests; real-tailnet acceptance remains release-specific |
14
- | iOS | native DeepPilot client, protocol v1 | simulator build and bridge pairing evidence |
15
-
16
- ## Expected degradation
17
-
18
- - Without a compatible embedded helper, the core bridge and trusted-LAN mode
19
- can still run; remote Funnel reports `unavailable`.
20
- - If a DSH host API is missing, only the dependent capability should be
21
- disabled. The plugin must not crash the host.
22
- - Query-string token authentication is legacy compatibility only. Current
23
- clients use Bearer or first-frame authentication.
12
+ | Remote access | Tailscale Funnel, ports 443/8443/10000 | helper and supervisor tests |
13
+ | iOS | native DeepPilot client, protocol v2 | simulator build and v2 pairing/challenge evidence |
14
+
15
+ ## Protocol boundary
16
+
17
+ - Protocol v2 is the only supported wire version. Existing protocol-v1 devices must pair again after upgrading.
18
+ - Bearer authentication, URL credentials, and first-frame shared tokens are rejected. A supported client registers a P-256 public key through `/phone/pair` and signs each WebSocket challenge.
19
+ - Without a compatible embedded helper, the core bridge and trusted-LAN mode can still run; remote Funnel reports `unavailable`.
20
+ - If a DSH Host API is missing, only the dependent capability should be disabled. The plugin must not crash the Host.
21
+ - On the tested 0.1.2 Host, the compatibility facade converts the
22
+ current Session controller's raw event arrays into the stable wrapped
23
+ history entries consumed by the phone bridge. Sessions persisted by earlier
24
+ Hosts can therefore be listed and opened when the 0.1.2 Host's own
25
+ persistence reader accepts their log vocabulary. Unsupported persisted
26
+ formats still fail closed in the Host without modifying the original log.
24
27
 
25
28
  ## Not yet claimed
26
29
 
27
30
  - Intel macOS support for the embedded helper;
28
31
  - signed/notarized helper distribution;
29
32
  - Windows or Linux host validation;
33
+ - repair or migration of persisted history rejected by the `0.1.2`
34
+ Host's own session reader;
30
35
  - every DSH developer-preview revision;
31
36
  - physical-device performance and every carrier/network combination;
32
37
  - production APNs delivery without a real provider credential and device.
33
38
 
34
- When reporting an issue, include `node --version`, the exact DSH package
35
- version, plugin commit/tag, macOS version and architecture, connection mode,
36
- and sanitized status output. Never include bearer tokens or message content.
39
+ When reporting an issue, include `node --version`, the exact DSH package version, plugin commit/tag, macOS version and architecture, connection mode, and sanitized status output. Never include pairing codes, key material, APNs tokens, or message content.
package/PRIVACY.md CHANGED
@@ -1,64 +1,36 @@
1
1
  # Privacy and data flow
2
2
 
3
- DeepPilot is designed around a direct connection to the DSH Host controlled by
4
- the user. The plugin does not upload complete conversations to a DeepPilot
5
- application server.
3
+ DeepPilot connects directly to the DSH Host controlled by the user. The plugin does not upload complete conversations to a DeepPilot application server.
6
4
 
7
5
  ## Data stored on the Mac
8
6
 
9
7
  By default, runtime state is stored under `$DSH_HOME/deeppilot/`:
10
8
 
11
- - `auth-token`: the pairing bearer token, mode `0600`;
12
- - `devices.json`: paired-device identifiers, names, app versions, last-seen
13
- timestamps, notification preferences, and APNs registrations;
14
- - `tailscale/`: local state for the optional embedded `tsnet` node.
9
+ - `host-id`: a random, non-secret stable audience identifier;
10
+ - `devices-v2.json`: paired public keys, fingerprints, scopes, device metadata, revocation/last-seen timestamps, notification preferences, and APNs registrations;
11
+ - `tailscale/`: local state for the optional embedded tsnet node.
15
12
 
16
- The pairing token and full APNs tokens are not rendered in routine logs. The
17
- settings report exposes only token readiness and masked/fingerprint values
18
- needed for diagnostics.
13
+ The directory is owner-only mode `0700`. The Mac never receives or stores iPhone private signing keys. Pairing codes exist only in plugin memory for up to five minutes and are not written to disk.
14
+
15
+ The settings report exposes public-key fingerprints, scopes, revocation state, and masked notification diagnostics. It does not expose full APNs tokens, pairing codes, or message bodies.
19
16
 
20
17
  ## Direct session connection
21
18
 
22
- Projects, session lists, conversation history, prompts, streaming events,
23
- approvals, questions, and model changes travel over the authenticated
24
- connection between the iPhone and the user's DSH Host.
19
+ Projects, history, prompts, streaming events, approvals, questions, and model changes travel over the authenticated connection between the iPhone and the user's DSH Host.
25
20
 
26
- - In LAN mode this is direct HTTP/WebSocket traffic and is not encrypted by the
27
- plugin. Use a trusted network.
28
- - In Funnel mode the phone uses HTTPS/WSS through Tailscale Funnel. The helper
29
- forwards only `/phone` and `/phone/health` to the local DSH origin.
21
+ - LAN mode is direct HTTP/WebSocket traffic and is not encrypted by the plugin. Use a trusted network.
22
+ - Funnel mode uses HTTPS/WSS. The helper forwards only `/phone`, `/phone/pair`, and `/phone/health`.
30
23
 
31
24
  ## Optional offline push
32
25
 
33
- Offline push is optional.
34
-
35
- ### Direct APNs mode
36
-
37
- When `provider: apns` is configured, the user's Mac sends the APNs device token
38
- and notification payload directly to Apple. The user supplies and controls the
39
- Apple provider credentials.
40
-
41
- ### DeepPilot relay mode
42
-
43
- When `provider: relay` is active, the plugin sends the following over HTTPS to
44
- the configured relay:
26
+ Direct APNs mode sends the device token and notification payload to Apple using user-controlled credentials. Relay mode sends over HTTPS:
45
27
 
46
28
  - a per-bridge relay authorization token;
47
- - target APNs device token and sandbox/production environment;
48
- - notification identifier, category, session identifier, title, and a short,
49
- truncated notification body.
50
-
51
- The body may contain a short assistant reply, session title, approval summary,
52
- or question text. The relay does not receive complete history, attachments,
53
- live token streams, prompts that are unrelated to the notification, the local
54
- pairing token, or the Tailscale node state.
29
+ - target APNs device token and environment;
30
+ - notification identifier, category, session identifier, title, and a short, truncated body.
55
31
 
56
- Apple receives the normal APNs alert payload in both modes. Users who do not
57
- want this disclosure can disable offline push; live WebSocket operation remains
58
- available.
32
+ The relay does not receive complete history, attachments, live token streams, unrelated prompts, pairing codes, device keys, the device registry, or Tailscale state. Disabling offline push removes this path.
59
33
 
60
34
  ## Logs
61
35
 
62
- Routine logs contain lifecycle state, delivery outcomes, and masked token
63
- prefixes. They are designed not to contain pairing tokens or message bodies.
64
- Frame-level diagnostics are emitted only when `debug` is enabled.
36
+ Routine logs contain lifecycle state, delivery outcomes, and process-local salted hashes for source/device identifiers. Logs are designed not to contain pairing codes, key material, APNs tokens, or message bodies. Frame diagnostics appear only with `debug`.
package/README.md CHANGED
@@ -20,7 +20,8 @@ Host on your own Mac and does not replace or modify the DSH Web UI.
20
20
 
21
21
  - Browse projects, sessions, history, and live agent output from iPhone.
22
22
  - Send prompts, switch models, create sessions, and answer approvals/questions.
23
- - Pair through a QR code with the secret stored on the Mac and in iOS Keychain.
23
+ - Pair with a five-minute single-use code and a per-device P-256 key; physical
24
+ iPhones keep the private key in Secure Enclave.
24
25
  - Connect over a trusted LAN or the optional embedded Tailscale Funnel.
25
26
  - Receive live notifications and optional APNs notifications while offline.
26
27
  - Self-update hint: the settings page footer shows the installed plugin
@@ -30,7 +31,7 @@ Host on your own Mac and does not replace or modify the DSH Web UI.
30
31
 
31
32
  ## Install from npm
32
33
 
33
- Requirements: Node.js 22+, a DSH `web` profile, and macOS. The bundled Funnel
34
+ Requirements: Node.js 22+, DSH 0.1.2 with a `web` profile, and macOS. The bundled Funnel
34
35
  helper currently supports Apple silicon; trusted-LAN mode does not require it.
35
36
 
36
37
  ```sh
@@ -39,7 +40,8 @@ dsh web
39
40
  ```
40
41
 
41
42
  After DSH restarts, open **Settings → DeepPilot**, enable the connection, show
42
- the pairing QR code, and scan it in the DeepPilot app.
43
+ the pairing QR code, and scan it in the DeepPilot app. The same panel also
44
+ shows a copyable pairing code for Simulator or manual entry.
43
45
 
44
46
  Package: [npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
45
47
 
@@ -57,13 +59,20 @@ DeepPilot state under `$DSH_HOME/deeppilot/`.
57
59
 
58
60
  Conversation traffic travels directly between the iPhone and your DSH Host.
59
61
  Trusted-LAN `ws://` traffic is unencrypted, so use it only on a network you
60
- trust. Optional Funnel mode exposes only the authenticated DeepPilot connection
61
- and health endpoints, not the complete DSH Web UI.
62
+ trust. Optional Funnel mode exposes only the DeepPilot connection, one-time
63
+ pairing, and health endpoints, not the complete DSH Web UI.
64
+
65
+ The DeepPilot settings page exposes **Connections per public source** under
66
+ the collapsed **Advanced settings** section. It defaults to `8`, accepts
67
+ `1`–`16`, and briefly restarts the Funnel helper when changed, so connected
68
+ remote clients reconnect once.
62
69
 
63
70
  Offline push is optional. Relay mode sends only the target APNs device token
64
71
  and a limited notification payload; full conversation history and live output
65
72
  do not pass through the relay. Read [PRIVACY.md](./PRIVACY.md) and
66
- [SECURITY.md](./SECURITY.md) before enabling remote access or push.
73
+ [SECURITY.md](./SECURITY.md) before enabling remote access or push. Protocol-v2
74
+ implementation status and remaining release validation are tracked in
75
+ [docs/SECURITY_ROADMAP.md](./docs/SECURITY_ROADMAP.md).
67
76
 
68
77
  ## Screenshots
69
78
 
@@ -80,8 +89,9 @@ reporting an issue.
80
89
  ## Protocol
81
90
 
82
91
  [PROTOCOL.md](./PROTOCOL.md) is the normative DeepPilot bridge protocol. Any
83
- wire change must update that document and `src/protocol.ts` together, preserve
84
- protocol-v1 compatibility, and be coordinated with the private iOS client.
92
+ wire change must update that document and `src/protocol.ts` together and be
93
+ coordinated with the private iOS client. Protocol v2 is the only supported wire
94
+ version; upgrades from v1 require re-pairing.
85
95
 
86
96
  ## Development
87
97
 
package/README.zh-CN.md CHANGED
@@ -19,7 +19,8 @@
19
19
 
20
20
  - 在 iPhone 查看项目、会话、历史记录和 Agent 实时输出;
21
21
  - 发送提示词、切换模型、创建会话,并处理审批与提问;
22
- - 扫描二维码配对,密钥保存在 Mac iOS Keychain;
22
+ - 使用 5 分钟有效的单次配对码与设备级 P-256 密钥;iPhone 真机私钥保存在
23
+ Secure Enclave;
23
24
  - 使用可信局域网,或可选的内嵌 Tailscale Funnel 远程连接;
24
25
  - 接收在线通知,以及可选的离线 APNs 推送;
25
26
  - 更新提示:设置页底部显示当前插件版本,并在有新版本时附加一个指向
@@ -28,7 +29,7 @@
28
29
 
29
30
  ## 从 npm 安装
30
31
 
31
- 需要 Node.js 22+、DSH `web` profile 与 macOS。内嵌 Funnel helper 目前支持
32
+ 需要 Node.js 22+、带 `web` profile 的 DSH 0.1.2 与 macOS。内嵌 Funnel helper 目前支持
32
33
  Apple silicon;可信局域网模式不依赖 helper。
33
34
 
34
35
  ```sh
@@ -37,7 +38,7 @@ dsh web
37
38
  ```
38
39
 
39
40
  DSH 重启后,打开 **设置 → DeepPilot**,启用连接并显示配对二维码,然后在
40
- DeepPilot App 中扫码。
41
+ DeepPilot App 中扫码。同一面板也会显示可复制的配对码,供模拟器或手动输入使用。
41
42
 
42
43
  npm 包:[npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
43
44
 
@@ -54,11 +55,16 @@ dsh plugin --profile web remove dsh-deeppilot
54
55
 
55
56
  完整会话流量由 iPhone 直接连接用户自己的 DSH Host。可信局域网中的 `ws://`
56
57
  是明文流量,只应在可信网络使用。可选 Funnel 模式只暴露经过认证的 DeepPilot
57
- 连接与健康检查端点,不会暴露完整 DSH Web UI。
58
+ 连接、单次配对与健康检查端点,不会暴露完整 DSH Web UI。
59
+
60
+ DeepPilot 设置页在默认折叠的“高级设置”中提供“每个公网来源的连接上限”,默认
61
+ `8`,可设置为 `1`–`16`。修改后 Funnel helper 会短暂重启,已连接的远程客户端
62
+ 会自动重连一次。
58
63
 
59
64
  离线推送是可选功能。中继模式只发送目标 APNs 设备 Token 和有限的通知内容;
60
65
  完整会话历史与实时输出不会经过中继。启用远程访问或推送前,请阅读
61
- [PRIVACY.md](./PRIVACY.md) 与 [SECURITY.md](./SECURITY.md)
66
+ [PRIVACY.md](./PRIVACY.md) 与 [SECURITY.md](./SECURITY.md)。协议 v2 的实现状态与
67
+ 剩余发布验证记录在 [docs/SECURITY_ROADMAP.zh-CN.md](./docs/SECURITY_ROADMAP.zh-CN.md)。
62
68
 
63
69
  ## App 截图
64
70
 
@@ -74,8 +80,8 @@ dsh plugin --profile web remove dsh-deeppilot
74
80
  ## 协议
75
81
 
76
82
  [PROTOCOL.md](./PROTOCOL.md) 是 DeepPilot 桥接协议的规范性文档。任何 wire
77
- 变更都必须同步更新该文档与 `src/protocol.ts`,保持协议 v1 向后兼容,并与
78
- 私有 iOS 客户端协调。
83
+ 变更都必须同步更新该文档与 `src/protocol.ts`,并与私有 iOS 客户端协调。
84
+ 协议 v2 是唯一支持的 wire version;从 v1 升级必须重新配对。
79
85
 
80
86
  ## 开发
81
87
 
package/SECURITY.md CHANGED
@@ -2,43 +2,41 @@
2
2
 
3
3
  ## Supported releases
4
4
 
5
- Until the first stable release, only the latest tagged public-beta release is
6
- supported. DSH itself is a developer preview, so reports must include the exact
7
- DSH version, plugin commit or tag, operating system, architecture, and whether
8
- LAN or Funnel mode was used.
5
+ Until the first stable release, only the latest tagged public-beta release is supported. Reports must include the exact DSH version, plugin commit or tag, operating system, architecture, and whether LAN or Funnel mode was used.
9
6
 
10
7
  ## Reporting a vulnerability
11
8
 
12
- Do not open a public issue containing pairing tokens, APNs device tokens,
13
- provider keys, relay credentials, private hostnames, conversation content, or
14
- an unpatched exploit. Use GitHub's private vulnerability reporting for
15
- `Mars-Sea/dsh-deeppilot` when available. If that channel is unavailable, open a
16
- minimal public issue requesting a private contact channel without including
17
- the sensitive details.
18
-
19
- ## Trust boundaries
20
-
21
- - `/phone` and `/phone/health` require the pairing bearer token.
22
- - New clients authenticate with the `Authorization: Bearer` header or the
23
- first WebSocket frame. Query-string tokens exist only for legacy clients.
24
- - The token is stored with mode `0600` on the Mac and in iOS Keychain.
25
- - Pairing QR codes contain the bearer secret. Treat screenshots as leaked
26
- credentials and rotate the token from the DeepPilot settings page.
27
- - LAN `ws://` is unencrypted. Use it only on a trusted network.
28
- - The optional Funnel helper publishes only `/phone` and `/phone/health`, not
29
- the complete DSH Web UI.
30
- - Debug logs may include status and masked identifiers, but must never include
31
- pairing tokens or message bodies.
9
+ Do not open a public issue containing pairing codes, APNs device tokens, provider keys, relay credentials, private hostnames, conversation content, or an unpatched exploit. Use GitHub private vulnerability reporting for `Mars-Sea/dsh-deeppilot` when available. Otherwise open a minimal issue asking for a private contact channel without sensitive details.
10
+
11
+ ## Protocol-v2 trust boundaries
12
+
13
+ - `/phone/pair` accepts only a short-lived, single-use pairing code and a P-256 public key. The code expires after five minutes and is invalidated after one successful registration.
14
+ - `/phone` upgrades anonymously, then sends a fresh 30-second challenge bound to the stable Host audience. The client proves possession of its registered P-256 private key with ECDSA/SHA-256.
15
+ - The iOS app uses a non-exportable Secure Enclave key on physical devices. The Mac stores only public keys and metadata.
16
+ - `GET /phone/health` is intentionally unauthenticated and returns only minimal readiness/version facts.
17
+ - Protocol v1, shared Bearer tokens, query credentials, and `c2s.hello.auth` are not accepted. There is no remote downgrade switch.
18
+ - The server enforces explicit protocol scopes, while the normal settings UI grants the default scope set and exposes only the global connection switch plus per-device deletion. Deleting a device disconnects it immediately.
19
+ - The canonical `$DSH_HOME/deeppilot` directory is repaired to mode `0700`. `host-id` and `devices-v2.json` are owner-only.
20
+ - LAN `ws://` is unencrypted. Use it only on a trusted network. Public access should use Funnel HTTPS/WSS.
21
+ - The Funnel helper publishes only `/phone`, `/phone/pair`, and `/phone/health`, never the complete DSH Web UI.
22
+ - Logs must never include pairing codes, key material, APNs tokens, or message bodies.
23
+
24
+ ## Online attack controls
25
+
26
+ - The Funnel helper allows at most 60 requests per source per minute and 600 globally. Concurrent WebSockets per public source are configurable from 1 to 16 and default to 8.
27
+ - The Node bridge independently allows at most 12 anonymous authentication or pairing attempts per source per minute, 120 globally, and two concurrent unauthenticated WebSockets per source.
28
+ - Five failures within ten minutes block that source for 15 minutes. A blocked request receives HTTP 429 with `Retry-After`.
29
+ - The bridge ignores caller-supplied forwarding headers on non-loopback sockets.
30
+ - Audit logs use process-local salted hashes, preventing stable source/device correlation across restarts.
31
+
32
+ If a QR code is exposed before expiry, invalidate it or issue a new one. If a paired device is lost or suspected compromised, delete that device from the settings list; other devices remain valid.
32
33
 
33
34
  ## Release integrity
34
35
 
35
- The public beta includes a prebuilt macOS Apple-silicon helper. Verify it from
36
- the repository root with:
36
+ Verify the public-beta helper from the repository root with:
37
37
 
38
38
  ```bash
39
39
  cd bin && shasum -a 256 -c SHA256SUMS
40
40
  ```
41
41
 
42
- Developer ID signing and notarization are release gates for broad end-user
43
- distribution. Until those gates are complete, the helper is a public-beta
44
- artifact and not a production-readiness claim.
42
+ Developer ID signing and notarization remain release gates for broad end-user distribution.
package/bin/SHA256SUMS CHANGED
@@ -1,6 +1,6 @@
1
- 6f7caac1655a0d2bce606bcfde2e53a4dde6aea89dff8d99fe2fb3d055d4461f ./darwin-amd64/dsh-deeppilot-tunnel
2
- 1eaa95742dbe592ab6e5c8bc00715fa63028b975a11876841e221390657535df ./darwin-arm64/dsh-deeppilot-tunnel
3
- 766c4dfdd70e1b7607b276d4e0cc66cfb6398904c9b841f973641622d9da26ab ./linux-amd64/dsh-deeppilot-tunnel
4
- a61bc73b2eca7b6b8358d0c6ff3e6475de8200448d1ac423647d95c37b4d9a2f ./linux-arm64/dsh-deeppilot-tunnel
5
- 205f598f9c79138f4d8cef372f7a4aa9883f6a70d313bd5277ebac442e46063c ./windows-amd64/dsh-deeppilot-tunnel.exe
6
- 0282ee0a0a20bb1d220f9a6d4158a5f17d4c4afbbdb2451a22a246f219bbcde5 ./windows-arm64/dsh-deeppilot-tunnel.exe
1
+ 1f7f29e139f978a68da0bc80c5755e37aca311de06e5e2a14fb09ccb34647571 ./darwin-amd64/dsh-deeppilot-tunnel
2
+ a7c879a104468c6ab7c782176f4ca4f1c87fbbffef298dc3a1009fa8960a801f ./darwin-arm64/dsh-deeppilot-tunnel
3
+ 210a182ca76f09a244d8439f071b68c606157e5bdd18f383c16b2454b72d117c ./linux-amd64/dsh-deeppilot-tunnel
4
+ fb7d93a5edb2eeff8b867aa5c745618ef44f425bb7c4cd6aa6289116efef9fb2 ./linux-arm64/dsh-deeppilot-tunnel
5
+ c1a23b917d4fcde70b449574b00cd4e453cd7e13d4777a7f7affaad9e0efbbac ./windows-amd64/dsh-deeppilot-tunnel.exe
6
+ eff7c91008f5846ccebdd8c7eb51f65ef96455c46f489de7c4d3d6b888a4f3f5 ./windows-arm64/dsh-deeppilot-tunnel.exe
@@ -0,0 +1,24 @@
1
+ # Protocol-v2 security status
2
+
3
+ [简体中文](./SECURITY_ROADMAP.zh-CN.md)
4
+
5
+ Status: implemented on the development branch. `PROTOCOL.md` is normative. Protocol v1 is not retained; all devices must pair again.
6
+
7
+ ## Implemented
8
+
9
+ - five-minute, single-use, high-entropy pairing codes;
10
+ - P-256 device identities, Secure Enclave on physical iOS devices with a simulator Keychain fallback;
11
+ - per-connection nonce/audience/timestamp challenge signatures;
12
+ - host-side public-key fingerprints, per-device scopes and immediate revocation;
13
+ - anonymous-endpoint rate limits, source blocking, bounded unauthenticated concurrency, and a bounded registry;
14
+ - minimal unauthenticated health response; no Bearer or URL credentials;
15
+ - privacy-preserving audit identifiers, a global connection switch, and per-device deletion; scopes remain enforced at the protocol layer.
16
+
17
+ ## Remaining release validation
18
+
19
+ - share fixed canonical/signature vectors between TypeScript and Swift tests;
20
+ - exercise pairing, reconnect/resume, and per-device deletion through both real LAN and Funnel paths;
21
+ - add abuse tests for malformed requests, connection churn, replay, and many-source pressure;
22
+ - document local recovery when `devices-v2.json` is lost;
23
+ - decide whether high-impact approval responses should require fresh local biometric/user-presence confirmation;
24
+ - keep dependency scanning and CodeQL green, then sign and notarize every distributed helper before claiming production readiness.
@@ -0,0 +1,24 @@
1
+ # 协议 v2 安全状态
2
+
3
+ [English](./SECURITY_ROADMAP.md)
4
+
5
+ 状态:已在开发分支实现,`PROTOCOL.md` 为规范来源。不保留协议 v1,所有设备都需要重新配对。
6
+
7
+ ## 已实现
8
+
9
+ - 5 分钟有效、单次使用的高熵配对码;
10
+ - P-256 设备身份;iOS 真机使用 Secure Enclave,模拟器使用钥匙串回退;
11
+ - 每次连接使用 nonce、audience 和时间戳完成挑战签名;
12
+ - 主机侧公钥指纹、单设备 scope 和即时撤销;
13
+ - 匿名入口限速、来源封禁、未认证连接并发上限和设备表容量上限;
14
+ - 最小化匿名探活响应,不接受 Bearer 或 URL 凭据;
15
+ - 隐私化审计标识、全局连接开关和逐设备删除入口;scope 继续由协议层强制执行。
16
+
17
+ ## 发布前剩余验证
18
+
19
+ - 在 TypeScript 与 Swift 测试间共享固定的规范化编码/签名向量;
20
+ - 通过真实 LAN 与 Funnel 验证配对、重连/恢复和逐设备删除;
21
+ - 补充畸形请求、连接抖动、重放和多来源压力测试;
22
+ - 记录 `devices-v2.json` 丢失后的本机恢复流程;
23
+ - 决定高影响审批是否要求新的本地生物识别/用户在场确认;
24
+ - 保持依赖扫描与 CodeQL 通过,并在宣称生产可用前签名、公证所有分发 helper。