From 25c97e96344b87d620c3ce08dc430e50e1ff1235 Mon Sep 17 00:00:00 2001 From: Delicious233 <101502465+DeliciousBuding@users.noreply.github.com> Date: Mon, 17 Aug 2026 21:21:00 +0800 Subject: [PATCH] =?UTF-8?q?docs(governance):=20=E7=99=BB=E8=AE=B0=20AH-SR-?= =?UTF-8?q?052=20auth=20fail-closed=20=E9=BB=98=E8=AE=A4=20fail-open=20?= =?UTF-8?q?=E9=A3=8E=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- docs/governance/security-risk-register.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/governance/security-risk-register.md b/docs/governance/security-risk-register.md index 30db9565a..708369991 100644 --- a/docs/governance/security-risk-register.md +++ b/docs/governance/security-risk-register.md @@ -51,6 +51,7 @@ Hub/Edge 的 `Security scan (gosec)` step 自 #1574 起 hard fail(不再 `cont | AH-SR-043 | Mitigated in repo (web + shared gates; residual desktop seeds) | Web composer demo success 仅允许显式 `mock`/`fixture` + shell `demoRuntimeFallback`;共享 `allowsWorkbenchDemoRuntimeMutation` fail-closed,`auto`/`observed`/`approved-real` 不静默假成功;mutation path inventory + unit tests。Desktop 仍有 demo seed conversations / isDemo fallback(非本 issue 主范围)。 | 可选:Desktop seed 去默认 + live Hub mutation E2E 证据。 | | AH-SR-044 | Mitigated in repo (#465) | Desktop/Web product health 不再把 Edge runners 当 inventory SSOT;Local Edge status 由 health + agents/models 推导,Hub sync 发布 agent/model capability;`/v1/runners` 与 `health.checks.runners` 保留为 diagnostics。 | 可选:settings UI 若仍插值旧 runner 文案键则清理;live Desktop/Web 健康面板截图证据。 | | AH-SR-051 | Mitigated in repo (2026-08-09 security/release/infra lane) | **本批四项修复**:(1) JWT 弱密钥黑名单从精确匹配改 prefix 匹配,覆盖 `.env.example` 文档值 `dev-secret-change-in-production-min-length-32`(41 字符,原精确匹配漏网、绕过 32 字符最小长度门禁)——`hub-server/internal/config/config_validate.go` + `isKnownWeakSecret` + 3 测试;(2) `release.yml` 加 `security-gate` job(tag-guard 之后、build-go 之前,真阻断 `continue-on-error: false`,跑 `verify-release-gate.py -SkipRefCheck`,`RELEASE_SIGNING_APPROVED` repo variable 注入);(3) `verify-release-gate.py` 两条无条件 signing/updater Blocker 改双条件变量化(`RELEASE_SIGNING_APPROVED=true` + `deployments/production/signing-manifest.sha256` 证据文件,无则保守阻断);(4) `deployments/production/docker-compose.yml` `PG_HOST` 默认值 `127.0.0.1:` → `127.0.0.1`(端口走 `PG_PORT`,修 DSN 拼错);(5) `app/web/nginx.conf` 加 CSP/HSTS/X-Frame-Options/nosniff(对齐 AH-SR-037 desktop 严格度)。 | 无 Open High;signing 冻结由 `RELEASE_SIGNING_APPROVED` + 证据文件双条件解除,operator 解除前发布阻断(保守)。Go toolchain 升级 ≥1.26.5、refresh token reuse 检测、image 钉版本列 Wave 3 独立 PR。 | +| AH-SR-052 | Accepted (High; compensating control: operator env) | Hub access-token jti 黑名单(logout 即时吊销,#888)在 Redis 故障时**默认 fail-open**(`AuthFailClosedDefault = false`)。Redis 短时故障窗口内,已 logout 的 access JWT 仍被产品 API 接受直到自然 TTL 到期。补偿控制:operator 在生产 `deployments/production/docker-compose.yml` 显式设 `AGENTHUB_AUTH_FAIL_CLOSED=true`。 | Owner: Hub; Accepted 2026-08-17; closing: flip `AuthFailClosedDefault` to `true`(破坏性,需 PR + 全量 middleware/cache 测试)或 verify 所有生产部署已注入 env。 | | AH-SR-013 | Local-only | 本机未跟踪 `.env` 可能包含 secret-looking 值。 | 保持 `.env` ignored;不要 zip/paste/force-add;必要时本机轮换。 | | AH-SR-050 | Open (foundation only; #1174) | Desktop **local terminal host** surface: typed `TerminalPort` + capability gate only; no real PTY yet. Residual risk if future host adapter exposes free-form shell or renderer process APIs. | Real host must: (1) keep PTY ownership off renderer, (2) allowlist profiles only (no free-form command from UI), (3) Web `localTerminal=false` + UI hidden, (4) audit spawn/write/close. |