Repository navigation
fix(darwin): distrust the roots behind the compromised eMudhra intermediates - #274
Merged
Merged
Conversation
…ediates Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 of 4 tasks
furedea
added a commit
that referenced
this pull request
Oct 21, 2026
…lds (#275) ## 概要 Node.js と uv は自前の CA を内蔵しているので,#274 の CA ストアの修正では侵害された eMudhra 中間 CA を拒否できない.修正版(Node.js 24.22.1,uv 0.13.4)は nixpkgs ではまだ staging/master にしかないため,nixpkgs が追いつくまで公式のビルド済みバイナリを使う. | | 変更前 | 変更後 | |---|---|---| | Node.js | `unstable.nodejs_24`(24.18.1) | 公式 macOS ビルド 24.22.1(`nix/packages/nodejs_bin.nix`) | | uv | `pkgs.uv`(0.11.21) | 公式 macOS ビルド 0.13.4(`nix/packages/uv_bin.nix`) | | 検査ホストへの接続(`dv-g3b-emudhra` / `dv-g3b-aaa-emudhra`) | Node も uv も接続できる | Node は `CERT_REVOKED`,uv は接続エラーで拒否 | ## 受け入れ条件 - [x] 取得物の hash が公式の値と一致する(Node は `SHASUMS256.txt`,uv は GitHub release の digest) - [x] `nix flake check` が通る - [x] ビルドした Node と uv が両方の検査ホストを拒否し,Node は `api.github.com` に接続できる - [ ] `switch` 後,`node --version` が v24.22.1,`uv --version` が 0.13.4 になる <details> <summary>補足と戻し方</summary> - nixpkgs の状況(2026-10-22):Node.js 24.22.1 は staging のみ(unstable と master は 24.21.0),uv 0.13.4 は master と staging(unstable は 0.13.1,stable 26.05 は 0.11.21). - 戻し方:nixpkgs-unstable が Node.js 24.22.1 以上になったら `nodejsPackage` を `unstable.nodejs_24` に,使う nixpkgs が uv 0.13.4 以上になったら `uvPackage` を `uv` に戻し,2 つのファイルを消す.各ファイルの冒頭にも同じ条件を書いた. - 公式バイナリは aarch64-darwin 向けのみ.ホストはすべて aarch64-darwin. - 参考:[Node.js 2026-10-21 security releases](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases),[uv GHSA-hq85-5cpj-mr62](https://github.com/astral-sh/uv/security/advisories/GHSA-hq85-5cpj-mr62),[eMudhra advisory](https://emudhra.we-have-a-problem.com/) </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 21, 2026
furedea
added a commit
that referenced
this pull request
Oct 21, 2026
## 概要 Python の requests は `SSL_CERT_FILE` を読まず,各 venv の certifi を使う.手元の venv の certifi はすべて修正版(2026.10.19)より古く(2026.2.25〜2026.7.22),侵害された eMudhra 中間 CA を信頼する.`REQUESTS_CA_BUNDLE` を #274 で除外した CA ストアに向ける. | クライアント(swe-conform の venv で確認) | 変更前 | 変更後 | |---|---|---| | requests 2.34.2 | 検査ホストに接続できる(200) | `SSLError` で拒否 | | httpx 0.28.1 | #274 の `SSL_CERT_FILE` で既に拒否 | 変わらない | ## 受け入れ条件 - [x] `REQUESTS_CA_BUNDLE` が `/etc/ssl/certs/ca-certificates.crt` になる - [x] 同じ値を渡した requests が検査ホストを拒否する - [ ] `switch` 後の新しいシェルで,venv の requests が検査ホストを拒否する <details> <summary>補足</summary> - certifi 自体の更新は,各リポジトリの `exclude-newer = "1 week"` により 2026-10-26 以降に Renovate が行う.この変数はそれまでのつなぎで,#276 の戻し対象に加える. - 対象 lock:FIRE-Bench(2026.4.22),k8s-guideline-bench(2026.2.25),swe-bench-trial(2026.2.25),swe-conform(2026.7.22). </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
3 of 4 tasks
furedea
added a commit
that referenced
this pull request
Oct 21, 2026
…#282) ## 概要 #274 の `security.pki.caCertificateBlacklist` は,除外した root を消さず,「拒否」印付きの OpenSSL `TRUSTED CERTIFICATE` 形式で `/etc/ssl/certs/ca-certificates.crt` に残していた.OpenSSL を使う curl・Python・Node は印を守るが,codex(rustls)はこの形式を通常の証明書に変換して信頼してしまい,`SSL_CERT_FILE` を渡しても侵害チェーンの検査ホストに接続できた(`status=200`).root を含まない `ca-no-trust-rules-bundle.crt` から CA ストアを作る. | | 変更前 | 変更後 | |---|---|---| | CA ストアの元 | `ca-bundle.crt`(通常 120 件+`TRUSTED CERTIFICATE` 172 件.除外した root も拒否印付きで残る) | `ca-no-trust-rules-bundle.crt`(通常 120 件のみ.除外した root は含まない) | | curl で検査ホスト | `certificate rejected` | `unable to get local issuer certificate`(root がない) | | codex(`SSL_CERT_FILE` あり)で検査ホスト | 200 で接続 | 拒否される見込み(下の受け入れ条件で確認) | ## 受け入れ条件 - [x] 生成される CA ストアに `TRUSTED CERTIFICATE` 形式がなく,除外した root の PEM がない - [x] curl が両方の検査ホストを拒否し,`api.github.com` には接続できる - [x] `nix flake check` が通る - [ ] `switch` 後,`SSL_CERT_FILE` を設定した codex が検査ホストに接続できない <details> <summary>補足</summary> - `ca-no-trust-rules-bundle.crt` の通常の証明書 120 件は,`ca-bundle.crt` のサーバー認証用の 120 件と同じ集合. - `SSL_CERT_FILE`,`REQUESTS_CA_BUNDLE`,`NIX_SSL_CERT_FILE` はどれも同じ `/etc/ssl/certs/ca-certificates.crt` を指すので,変数の変更はない. - nixpkgs の cacert が侵害された中間 CA を拒否したら,この上書きも blacklist と一緒に外す(#276). - 注意:`/etc/zshenv` は親プロセスが環境を読み込み済みだと読み直さないため,`switch` 後は Ghostty と herdr を一度終了して起動し直さないと,新しい環境変数がペインに入らない. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
eMudhra(emSign)の中間 CA 8 枚は,公開証明書から秘密鍵を復元できる状態で発行されていた(advisory).ブラウザと OS は遮断済みだが,nix の CA ストアと,それを読む CLI(curl,git,Python など)はまだ信頼している.nixpkgs の
cacertが対応するまで,nix-darwin のsecurity.pki.caCertificateBlacklistで親の root 2 つを除く./etc/ssl/certs/ca-certificates.crt(NIX_SSL_CERT_FILE)Comodo AAA Services rootとemSign ECC Root CA - G3を除くSSL_CERT_FILEdv-g3b-emudhra/dv-g3b-aaa-emudhra)受け入れ条件
darwinConfigurations.mbp.systemがビルドできるapi.github.comには接続できるswitch後,新しいシェルでcurl https://dv-g3b-emudhra.we-have-a-problem.com/が証明書エラーになる補足と範囲外
/etc/ssl/cert.pem)は手動で同じ 2 つを除いた(バックアップは/etc/ssl/cert.pem.bak).Comodo AAA Services rootは Sectigo の広く使われる root なので,まれに接続できないサイトが出る可能性がある.nixpkgs のcacertが侵害された中間 CA だけを除いたら,この blacklist は外す.🤖 Generated with Claude Code