Skip to content

[PR] fix: DNS-poisoned upstream TLS failures — stop advising "trust that CA", add cert forensics and circuit coverage (#4403) - #4417

Open
ranxianglei wants to merge 3 commits into
masterfrom
2026-10-23_dns-poison-tls-forensics
Open

ranxianglei wants to merge 3 commits into
masterfrom
2026-10-23_dns-poison-tls-forensics

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #4403

Problem

When the upstream TLS handshake dies with a trust code (self-signed, untrusted root, alt-name mismatch…), bili's remediation text — introduced by #3776 — unconditionally told the user to export the presented chain's CA into NODE_EXTRA_CA_CERTS / network.caFile. That is correct for the common producer (Kaspersky-style HTTPS scanning, corporate MITM) but dangerous for the other live producer this issue documents: DNS poisoning / link injection presenting a forged or foreign certificate. There, the advice installs the attacker's CA. Three gaps compounded it:

  • the log line and the 502 body carried no certificate identity at all (Node's TLS errors don't include the cert, so nothing was captured) — "enterprise scanner" vs "link injection" was indistinguishable without manual openssl s_client;
  • unclassified (unknown) transport deaths never counted toward the circuit gate (the gate reused the banner whitelist), so a poisoning-flapping host never stopped resending full context;
  • three final-failure paths (acp-loop re-request, external summary dispatch, preflight summary request) never touched the alert/circuit ledger at all.

Changes

  1. Evidence-branched remediation (tlsTrustRemediation(ctx)): expired → upstream-lapse/clock-skew text, no CA advice; ERR_TLS_CERT_ALTNAME_INVALID → "signed by a trusted CA but its names exclude the host — do NOT install any new CA, verify resolution"; probe-captured SAN provably lacking the target host → "do NOT install THIS CA"; enterprise signal detected (proxy on loopback/private space, or extra CA material already configured) → the original [Bug][tls] Proxy upstream TLS broken by security-software HTTPS scanning (Kaspersky MITM): client sees only a generic 502 | 安全软件HTTPS扫描致代理上游TLS失败,客户端只见泛502 #3776 scanner text verbatim; otherwise verify-DNS-first wording (still names Kaspersky/scanning and the caFile fix, behind "Before installing ANY CA").
  2. Forensic capture (new src/upstream-cert-probe.ts): on a direct-mode trust-code failure bili performs one fire-and-forget ≤5s handshake (rejectUnauthorized:false) and caches per-host for 10 min (max 4 concurrent). Result — remote IP, subject, issuer, SAN, fp256 — lands in the log line, the free-text failure string (probeRemote=/certSubject=/certIssuer=/certSan=/certFp256=), the structured 502 upstreamFailure slice (raw values), and feeds the SAN cross-check in (1). Never fires through a proxy (the tunnel presents its own cert) and never for non-trust codes.
  3. Circuit gate coverage (CIRCUIT_KINDS = ALERT_KINDS ∪ {unknown}): unknown now counts toward opening; banners stay on the strict whitelist ("better silent than a misleading red banner"); client-abort and post-connect upstream-timeout remain excluded from both.
  4. Ledger parity on silent paths: acp-loop re-request transport failure, external summary final dispatch failure, and preflight summary request-stage transport failure now record alert + circuit (+ probe where applicable); resolving responses on the two summary paths clear the host's alerts/circuit, same invariant as the relay path.
  5. caFile identity logging (P2-1): loading network.caFile / NODE_EXTRA_CA_CERTS now logs each merged certificate's subject/issuer/fp256 (loud warn when nothing parseable was found).
  6. Rename (P2-2): isFailFastUpstreamKind → isTransparentReplayableKind (identical kind set; the name said nothing about why they're retryable).

Free-text forensic fields mask private hostnames (existing #255 discipline, same as the url= field); the structured slice stays raw.

Behavior changes (old → new)

Surface Old New Why
TLS trust hint (all channels) single unconditional "install the scanner/vendor CA" text evidence-branched (see 1); original text survives only behind a detected enterprise signal under active hijacking the old text installed the attacker's CA
CERT_HAS_EXPIRED hint carried NODE_EXTRA_CA_CERTS advice lapse/clock-skew text, no CA advice trusting more CAs cannot fix an expired leaf (updates the #1987 test pin, annotated)
Circuit open gate ALERT_KINDS only ALERT_KINDS ∪ {unknown} three consecutive unexplained pre-response deaths are enough reason to stop resending full context
acp-loop re-request / external summary / preflight summary final failures logged only alert + circuit recorded; summary successes clear the host ledger these are reachability evidence for their host, same as the relay path
Outbound traffic none on TLS failure one ≤5s handshake per host per 10 min, direct mode only, trust codes only forensics require seeing the certificate Node refuses
caFile / NODE_EXTRA_CA_CERTS load silent per-cert identity lines (info) + loud warn when unparseable silent trust expansion was invisible to the operator
internal API isFailFastUpstreamKind isTransparentReplayableKind naming clarity (P2-2), identical behavior

No config surface changes: no new fields/env vars; network.caFile and NODE_EXTRA_CA_CERTS keep their semantics.

Coordination

PR #4257 (#4254) touches the same hot files (upstream-alerts/fail/proxy, relay, server) and separately puts the failure kind into the 502 error field — that part of #4403 (P2-3) is deliberately NOT duplicated here. If #4257 merges first this branch needs a mechanical rebase; the changes are additive on the same detail object.

Tests

New hermetic regression suite tests/issue4403-dns-poison-tls-forensics.test.ts (18 tests): classification pins, gate-only unknown accounting (opens circuit, no banner; ETIMEDOUT still excluded), all five hint branches, seeded + real-handshake forensic capture (isolated XDG root, minted leaf, listen(0) ports), end-to-end P0-3 wiring through the real summary executor, caFile identity logging. Affected suites rerun locally green (upstream-fail, issue3776, issue3148-upstream-circuit, upstream-alerts, external-summary-http, preflight-fail-fast, preflight-transport-recovery incl. the updated #1987 pin); typecheck + build clean. Full-suite verdict: CI.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-23_dns-poison-tls-forensics (0516588)

Latest build — install this exact version

npm install -g billion-context@0.0.9718-pr.4417.082dd82

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
0516588 billion-context@0.0.9718-pr.4417.082dd82 build
285824f billion-context@0.0.5472-pr.4417.68ee4fe build
dc5dc17 billion-context@0.0.5435-pr.4417.983f547 build
c248bb7 billion-context@0.0.5415-pr.4417.657d031 build
97a3a8a billion-context@0.0.5409-pr.4417.f634f52 build
b9c44bf billion-context@0.0.5274-pr.4417.6e94478 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4417.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix: DNS-poisoned upstream TLS failures — stop advising "trust that CA", add cert forensics and circuit coverage (#4403) [PR] fix: DNS-poisoned upstream TLS failures — stop advising "trust that CA", add cert forensics and circuit coverage (#4403) Oct 23, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

查重:不重复。 按失败签名(TLS trust 提示方向错误 / 证书取证字段缺失 / unknown 不计断路器 / 三条静默路径不记账)检索 open+closed issue 与 PR,无并列修复。相关条目及关系:

标签: bug, opencode, scope/wiring, p2(缺陷类;原始报告复现于 opencode 车道;改动落在请求管道失败分类/告警/断路层 = 协议接线;核心转发可用、有绕行,非不可用亦非缓存泄露 → p2)。

这是 agent 自产 PR(源自 #4403 工作会话),不重做。现在转入独立审核:拉取分支逐段核对 diff、独立走一遍回归清点与测试有效性审查、确认 CI 状态,结论按结构化八问回复。审核进行中。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (ai: vllm-qwen/qwen3.8-27b)

独立审核完成:拉取分支逐文件通读全部 14 个改动 + 本地定向验证 + CI 证据核对。结论先行:代码本身达到合并标准;当前 CI 6 个红 shard 全部来自 master 自身的回归(已另立 #4498),与本 PR 无关。审核期间在 PR 分支上补了 2 个有标注的修复 commit(b9c44bf → c248bb7)。

动作清单

  1. rebase 到当前 master 02f544d——原分支落后 130 个 commit,rebase 零冲突;
  2. 修掉本 PR 唯一自带的红项(unused-exports gate):新增的 PresentedCertInfo、TlsTrustRemediationCtx 两个类型接口是内部死导出,按 gate 的 INTERNAL_ONLY 指引去掉 export(与 master 自己的 6c78337 同模式);gate 报的另外 4 处来自 base 早于 master 已修的 tests/corrupt-index-child.ts,rebase 后自然消失;
  3. 顺手修一个 review 发现:P0-1 的 SAN 交叉核对原先精确匹配——合法企业扫描器用单张通配符证书重签内网域(SAN *.corp.example,访问 api.corp.example)会被误判成劫持形态,反而给出「Do NOT install this CA」。现按 RFC 6125 通配符语义(只覆盖最左一级标签;apex 与多级子域仍判劫持),新增 2 个测试钉住两个方向。行为变更披露:SAN 交叉核对 旧=精确匹配 → 新=RFC 6125 通配符感知,影响面=持有通配符 SAN 的扫描器证书不再落到「勿装此 CA」分支,改落 verify-first 默认文案。

验证证据

八问

  1. 是什么问题:DNS 投毒/链路注入导致上游 TLS 握手失败时,bili 的修复建议无条件让用户「装所呈现证书对应的 CA」——活动劫持下等于装攻击者根证书;同时日志/502 里没有任何证书身份可查,未分类失败不计熔断,三处失败点根本不写告警台账。
  2. 什么原因导致的:[Bug][tls] Proxy upstream TLS broken by security-software HTTPS scanning (Kaspersky MITM): client sees only a generic 502 | 安全软件HTTPS扫描致代理上游TLS失败,客户端只见泛502 #3776 把修复文案按单一场景(企业扫描)写成唯一场景;而 Node 的 TLS 错误本身不携带证书字节,取证通道根本不存在。本 PR 从源头改:按证据分支(错误码/探针 SAN/企业信号)+ fire-and-forget 取证探针 + 台账补齐,不是在输出层打补丁。
  3. 影响范围与严重程度:direct-mode 下遇到 TLS trust 失败的用户面(小众但后果重);劫持场景跟随旧文案 = 信任面扩给攻击者,属严重误导;其余场景是诊断盲区(要手动 openssl s_client)。
  4. 怎么修复的:文案按证据五分支(expired→上游过期无 CA 建议;altname→受信 CA 但名字不含 host 勿装新 CA;探针 SAN 缺 host→勿装此 CA;企业信号命中→[Bug][tls] Proxy upstream TLS broken by security-software HTTPS scanning (Kaspersky MITM): client sees only a generic 502 | 安全软件HTTPS扫描致代理上游TLS失败,客户端只见泛502 #3776 原文逐字保留;默认→先验 DNS 再谈 CA);≤5s/10min 缓存/最多 4 并发的取证握手(仅 direct-mode trust code,永不走代理、永不抛错、不在请求关键路径);熔断条件 ∪{unknown}(banner 仍用严格白名单);acp-loop 重发/外部摘要/preflight 摘要三处静默路径补齐 alert+circuit 台账,成功清账与 relay 同一不变量;caFile/NODE_EXTRA_CA_CERTS 加载时逐张记身份。
  5. 是否有回归问题:逐项清点过既有行为——[Bug][tls] Proxy upstream TLS broken by security-software HTTPS scanning (Kaspersky MITM): client sees only a generic 502 | 安全软件HTTPS扫描致代理上游TLS失败,客户端只见泛502 #3776 原文案保留(仅加企业信号门槛);CERT_HAS_EXPIRED 提示去 CA 建议(PR 正文已披露,测试 pin 带注释更新,方向正确:多信 CA 治不了过期叶子);熔断条件放宽(PR 正文已披露,ETIMEDOUT/客户端中断仍双向排除);重试集合改名集合完全相同(测试钉住);relay 成功清账不变量扩展到两条摘要路径(同语义);master 窗口内对 upstream-* 系列文件零变更,server.ts/relay.ts 只有生命周期/output-reservation 区,rebase+typecheck+定向套件证明无语义碰撞;无 fail-fast 变吞错、无阈值/时序漂移、无输出格式破坏(502 diag 为附加字段,字符串化字节不变)。本轮新增的通配符变更见动作清单第 3 条披露。
  6. 是否破坏缓存:不涉及——不动前缀缓存/fold 状态/重试游标/去重键;探针结果只进日志与 502 诊断,不进请求体。
  7. 是否改了设计方向:不涉及——延续 [Bug][tls] Proxy upstream TLS broken by security-software HTTPS scanning (Kaspersky MITM): client sees only a generic 502 | 安全软件HTTPS扫描致代理上游TLS失败,客户端只见泛502 #3776/[Feature] Web UI 主动提示上游连接失败(全局 banner),而不是只埋日志 #1682 的诊断+台账方向,补的是证据分支与覆盖面;探针为独立模块,失步即整轮缺席,不改任何既有数据流。
  8. 是否引入新配置:不涉及——无新 env/config 字段,network.caFile 与 NODE_EXTRA_CA_CERTS 语义不变。

测试有效性:新套件是真测试——真实握手 e2e(隔离 XDG root + 自签 mintHostCert + listen(0))、P0-3 接线走真实 summary executor(死端口 ×3)、每个 gate 都断言正反两向(unknown 开熔断但不弹 banner / ETIMEDOUT 两边都不计 / 非 trust code 不触发探针),断言有牙,回归时抓得住。

判定:可合。PR 描述完整(行为变更表逐项披露、与 #4257 的协调说明准确——#4257 仍未合,P2-3 未重复实现),代码与测试达标。建议等 #4498 修复、master 转绿后合并;若提前合并,6 个红 shard 由 #4498 解释即可。我不执行合并操作:#4417

@ranxianglei
ranxianglei force-pushed the 2026-10-23_dns-poison-tls-forensics branch from c248bb7 to dc5dc17 Compare October 24, 2026 10:10
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重:重复 #4506 —— 本 PR 的 CI 红不是本 PR 改动引起的,是继承 master 自身的红(#4506,已 bisect 定位,修复 #4511 已于今日 09:59Z 合入 master)。

发生了什么:6 条 test 车道全红,但逐份比对日志后只有 两个不同的失败用例,且都在存储域:#3250 WAL cap 断言(tests/issue3250-wal-checkpoint.test.ts:291,「left 1095952 bytes, cap 1048576」)和 media CAS stale-row sweep 断言(tests/media-cas.test.ts:134,refcount 1 !== 0)。本 PR 的 diff 全部在 TLS/DNS forensics(src/upstream-*、preflight、fetch-util 等),与存储代码零重叠。对照 master 自己的 CI run(40073163544 @02f544da):master 同样只红这两个用例;两波 CI(master run + 本 PR run,ubuntu/windows × node22/24 共 12 条车道)里这两个用例每次跑到都失败,确定性失败,不是 flake。

怎么修的:没有动本 PR 任何代码,把分支 rebase 到修复后的 master(fa81aa24b,含 #4511 的修复)。零冲突,原 3 个 commit 原样重放,rebase 前后 PR diff 逐字节一致(md5 相同,c248bb749 → dc5dc17,lease 保护 force-push)。本地验证:build ✓、typecheck ✓、定向测试绿——两个原红用例 + 本 PR 自己的 3 个测试文件(issue4403-dns-poison-tls-forensics / upstream-fail / preflight-transport-recovery),46/46 通过。全量回归留给 CI。

八问:

  1. 是什么问题:PR 的 6 条红车道全部来自 master 继承的两个存量存储测试失败,与本 PR 的 DNS-poison TLS 取证改动无关。
  2. 什么原因:今晨合入的 Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 row-identity-historian 存储层改动(CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506 内 bisect 钉死):①retired 行的媒体映射与 CAS 引用永不释放——真 bug,Same image bytes stored once per conversation/message copy — split media payloads into a content-addressed store (follow-up to #3751/#3748) #3762/Storage cleanup wave 2: Batch-clearing nine items (Correctness #3841/#3798 + GC #3463/#3671/#3762 + Posture #3723/#3489/ | 存储收尾第二波:九项一次清账(正确性 #3841/#3798 + GC #3463/#3671/#3762 + 姿态 #3723/#3489/#3633/#3788) #3901 家族的字节泄漏;②新增 identity 列/索引让每行 WAL 体积增大约 250B,击穿 custom-cap 用例的一页余量预算——测试算术问题,截断不变量本身完好。两者均由 [PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511 修复。
  3. 影响范围与严重程度:master 红期间所有走 master CI 的 PR 合并被阻(不止本 PR);对本 PR 是全 test 车道阻断,属 p2(工作被阻但有明确恢复路径,[PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511 合入后 rebase 即恢复)。
  4. 怎么修复的:rebase 到修复后的 master,不修改本 PR 任何逻辑;根因修复在 [PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511(已合并)。
  5. 是否有回归问题:rebase 未引入回归——零冲突、PR diff 逐字节未变、本地 build/typecheck/定向测试全绿。rebase 带入的唯一新代码是 [PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511 的存储修复本身,其回归面已在 CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506 验证(storage 全家族绿 + tsc 干净)。高危模式逐项过:无语义漂移、无阈值/时序/输出格式变化(fail-fast 行为未动)。
  6. 是否破坏缓存:不涉及——无缓存/重试/增量游标相关改动。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

标签:沿用既有 bug / opencode / p2 / pr / scope/wiring(本条目是 wiring 域 PR 镜像,恰好一个 scope;CI 红属 master 继承的瞬态,根因已在 #4506 单独跟踪,不另立条目)。

结论:rebase 完成并已推送,等新 head(dc5dc17)CI 跑完;预期转绿后可合并。若新 head 仍红,属另一问题,届时再报。

@ranxianglei
ranxianglei force-pushed the 2026-10-23_dns-poison-tls-forensics branch from dc5dc17 to 285824f Compare October 24, 2026 11:32
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

跟进:六个测试 lane 已全部转绿,最后一个红(docs-sync)是 master 既有问题、已随 #4524 合入修复。本 PR 已再次 rebase 到最新 master,新 head 285824f6d。

时间线(接上一条回复):

  1. 原 6 个红的 test job —— 全部在 rebase 后的 head dc5dc17c3 上转绿(ubuntu/windows × node 22/24 各分片)。那两个失败用例(#3250 WAL 自定义上限、media CAS stale-row sweep)是 master 侧问题(CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506 定案:Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 引入,真实 bug + 测试算术),由 [PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511 修复合入,本 PR rebase 即继承修复,与 PR 改动零代码重叠。
  2. 剩下唯一的红:docs-sync —— 根因与本报告无关:master 自 [PR] feat: plugin-lane server-owned history — msgid pinning + transcript render endpoint | 插件车道服务端正史:msgid 钉身份 + 正史渲染端点 #4505 合并起自身就是红的。证据:在未含本 PR 改动的纯 master(c81c17d93)本地跑门禁命令 node tools/gen-config-docs.mjs generate && git diff --exit-code,生成器会从 CONFIGURATION.md:103 / CONFIGURATION.zh-CN.md:103 各删掉一行 rollout.features.pluginLaneServerHistory——因为 [PR] feat: plugin-lane server-owned history — msgid pinning + transcript render endpoint | 插件车道服务端正史:msgid 钉身份 + 正史渲染端点 #4505 只提交了文档行、丢掉了 website/config-reference/rollout.yaml 里的种子条目,种子→文档单源链断裂。
  3. 该问题已立项并修复:docs-sync has been all red on master since the merge of #4505: the rollout.features.pluginLaneServerHistory seed entry i | docs-sync 自 #4505 合并起在 master 全红:rollout.features.pluginLaneServerHistory 种子条目丢失 #4520(记录)+ [PR] docs: restore dropped pluginLaneServerHistory seed row — unblocks docs-sync on master #4524(补回种子条目)。[PR] docs: restore dropped pluginLaneServerHistory seed row — unblocks docs-sync on master #4524 已于刚才合入 master(8ae56a010)。我在其 head 独立验证过:生成器 exit 0,四个受控文件零 diff。
  4. 本 PR 处理:rebase 到含 [PR] docs: restore dropped pluginLaneServerHistory seed row — unblocks docs-sync on master #4524 的最新 master,新 head 285824f6d。PR diff 不变(14 文件 +855/−49,rebase 前逐字节核对过 md5);本地 build、typecheck、定向测试(media-cas / issue3250-wal-checkpoint / issue4403 / upstream-fail / preflight-transport-recovery)46/46 全绿。

八问(增量状态):

  1. 是什么问题:CI 六 lane 红 = 两个 master 侧存储测试回归(CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506/[PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511)+ 一个 master 侧 docs-sync 断裂(docs-sync has been all red on master since the merge of #4505: the rollout.features.pluginLaneServerHistory seed entry i | docs-sync 自 #4505 合并起在 master 全红:rollout.features.pluginLaneServerHistory 种子条目丢失 #4520/[PR] docs: restore dropped pluginLaneServerHistory seed row — unblocks docs-sync on master #4524),均非本 PR 引入。
  2. 什么原因导致的:① Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 的 row-identity-historian 让 retired 行的 media 引用不释放 + WAL 每行开销使旧测试的 slack 预算失效;② [PR] feat: plugin-lane server-owned history — msgid pinning + transcript render endpoint | 插件车道服务端正史:msgid 钉身份 + 正史渲染端点 #4505 提交文档行时漏了配置种子条目。
  3. 影响范围与严重程度:docs-sync 是 required check,曾卡住所有新 PR 的全绿(仓库级);两个存储测试只影响 CI 判定面,运行时行为无碍。均已修复合入。
  4. 怎么修复的:本 PR 侧只做 rebase 继承上游修复 + 保持自身 diff 零漂移;根因修复分别在上游 [PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511 / [PR] docs: restore dropped pluginLaneServerHistory seed row — unblocks docs-sync on master #4524。
  5. 是否有回归问题:rebase 后 PR diff 逐字节未变;build/typecheck/定向测试全绿;与 [PR] feat: plugin-lane server-owned history — msgid pinning + transcript render endpoint | 插件车道服务端正史:msgid 钉身份 + 正史渲染端点 #4505 的插件车道管线变更(loop/core.ts、preflight.ts 邻域)共存无冲突。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:等新 head 285824f6d 的 CI 跑完——预期全绿(测试 lane 上一 head 已实证,d docs-sync 随 #4524 合入解除)。绿后即可合并。

awork and others added 3 commits November 14, 2026 08:27
Certificate-trust deaths got one unconditional remediation ("install the
scanner/vendor CA") regardless of who presented the certificate — under
active DNS hijacking that advised installing the attacker's CA.

- tlsTrustRemediation branches on evidence (fired code, hostname,
  enterprise signal, probe-captured SAN): expired -> lapse/clock-skew
  text with no CA advice; alt-name-invalid or SAN lacking the host ->
  "do NOT install this CA" + verify resolution; enterprise signal
  (local/private proxy or configured extra CA material) -> original
  #3776 scanner text verbatim; default -> verify-DNS-first.
- New upstream-cert-probe module: fire-and-forget <=5s handshake on
  direct-mode trust-code failures captures remote IP/subject/issuer/SAN/
  fp256 into bili.log, the 502 upstreamFailure slice and the remediation
  cross-check. 10-min per-host cache, max 4 concurrent, never through a
  proxy.
- Circuit gate now counts unknown-kind failures (CIRCUIT_KINDS =
  ALERT_KINDS union {unknown}); banner set unchanged.
- Alert/circuit accounting added to the previously silent final-failure
  paths: acp-loop re-request, external summary dispatch, preflight
  summary request stage (resolving responses clear, like the relay).
- network.caFile / NODE_EXTRA_CA_CERTS load logs each merged cert's
  subject/issuer/fp256 (#4403 P2-1).
- Rename isFailFastUpstreamKind -> isTransparentReplayableKind (P2-2).

Behavior changes disclosed in the PR description.
…orts gate (#4403)

PresentedCertInfo and TlsTrustRemediationCtx are referenced only inside their
defining files (callers use object literals / inferred types), so the leading
export is dead surface — drop it per the gate's INTERNAL_ONLY guidance, same
pattern as 6c78337.
…find)

The probe-captured SAN comparison was exact-match, so a legitimate enterprise
scanner re-signing an internal domain with a single wildcard cert (SAN
*.corp.example for api.corp.example) fell into the mitm-suspect branch and got
'Do NOT install this CA' advice. Wildcards now cover exactly one leftmost label
(apex and multi-label hosts still read as hijack). Review-driven refinement of
the P0-1 evidence branching; behavior change disclosed in the PR thread.
@ranxianglei
ranxianglei force-pushed the 2026-10-23_dns-poison-tls-forensics branch from 285824f to 0516588 Compare November 14, 2026 00:47
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

已完成 rebase 并 force-push,冲突全部解决。

1. 是什么问题:PR #4417 与 base 分支 master 冲突(merge state: dirty),需要 rebase 到 master 并解决全部冲突。

2. 什么原因导致的:PR 切出后 master 前进了 2348 个 commit,其中两处与 PR 撞车:

3. 影响范围与严重程度:纯 rebase / 冲突解决,无行为变更。PR 分支现在干净地坐在 master 之上(merge-base == master head),merge conflict 已消除。

4. 怎么修复的:git rebase origin/master,解决 10 个文件 16 个冲突块,外加 1 个 master 新增测试文件里 PR 不知道的旧名引用。两处关键决策:

5. 是否有回归问题:无。重命名行为中性;7-kind 集合采用 master 的(丢弃 PR 的旧 5-kind 是正确的)。npm run typecheck 通过、npm run build 通过、159 个定向测试(覆盖 upstream-fail / issue4403 / issue5807 / preflight-transport-recovery / external-summary-http / upstream-alerts / issue3148-circuit / issue4254-egress / preflight-fail-fast / issue6005-lease)全绿。

6. 是否破坏缓存:不涉及(纯 rebase,未触碰缓存/重试/游标/去重逻辑)。

7. 是否改了设计方向:不涉及。

8. 是否引入了新的配置:不涉及。

状态:分支已 rebase 到 master 并 force-push(新 head 0516588cb3,3 个 commit,净 14 文件 +860/-54)。CI 待跑——刚 push,mirror 缓存尚未捕获 check 状态(约 60s 刷新),不预判红绿。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant