GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Stage 4: simple-git で git sync 移植 + コンフリクト解決ウィンドウ by ymnao · Pull Request #14 · ymnao/scripta

Conversation

@ymnao

@ymnao ymnao commented May 6, 2026

Copy link
Copy Markdown
Owner

概要

旧 Tauri 版 scripta src-tauri/src/commands/git_sync.rs(12 コマンド + validator + safe_write_in_repo)を simple-git ベースで Electron main に 1:1 移植 し、コンフリクト解決画面を 独立 BrowserWindow として開けるようにした。

関連 Issue

なし

移行 Stage

  • Stage 0: 雛形 + フロント表示確認
  • Stage 1: ファイル I/O
  • Stage 2: ワークスペース・ファイルツリー・ファイル監視
  • Stage 3: 全文検索(ripgrep sidecar)
  • Stage 4: Git Sync
  • Stage 5: OGP / PDF / アップデート
  • Stage 6: 仕上げ・配布・切り替え

変更内容

git IPC 12 コマンドの本実装(b587831 / 273e2ed)

  • [email protected] を依存追加
  • electron/main/utils/git-validators.ts: validateRelativePath / validateRefName / isStageNotFound / MAX_CONFLICT_CONTENT_SIZE を旧 Rust から 1:1 port
  • electron/main/utils/git-env.ts: LC_ALL=C / GIT_TERMINAL_PROMPT=0 / GIT_ASKPASS="" / SSH_ASKPASS="" / GIT_LITERAL_PATHSPECS=1 + core.hooksPath=NULL + editor/pager 系の no-op override を集約
  • electron/main/ipc/git.ts を全 no-op スタブから本実装に置換:
    • check-available / check-repo / status / add-all / commit / pull / push
    • get-conflicted-files / get-conflict-content / resolve-conflict / finish-conflict-resolution
    • get-last-commit-time
  • assertPathAllowed で canonical を取得し I/O を canonical で揃える(fs.ts / search.ts と同方針)
  • pull の "no tracking information" / push の "no upstream" は旧 Rust 互換で自動ハンドリング
  • get-conflict-content は git show :2:/:3: を raw 実行、modify/delete conflict の missing stage は empty で fallback
  • resolve-conflict modify は旧 Rust safe_write_in_repo を 1:1 port(親ディレクトリ bounds 再確認 + target が symlink なら拒否)
  • commit は simple-git の "stderr 空 = success 扱い" を回避するため、stdout の "nothing to commit" を明示 throw

コンフリクト解決ウィンドウ(fafa0a6)

  • electron/main/utils/window-lifecycle.ts を新設(親 / 子 共通の close cleanup helper)
  • electron/main/ipc/window.ts の window:open-conflict を本実装:
    • Map<canonical workspacePath, BrowserWindow> で単一インスタンス管理
    • 親の allowedRoots に登録された workspace のみ開かせる(renderer 引数を信頼せず main 側で再検証)
    • 子 webContents.id 向けに setActiveWorkspaceForWindow で path-guard 委譲
    • dev: ELECTRON_RENDERER_URL?conflict=true&workspacePath=<encoded> / prod: loadFile(..., { search })

simplify レビューでの並列化(ab987ee)

  • statusImpl / getConflictContentImpl / finishConflictResolutionImpl / pushImpl no-upstream 再試行で独立 git 呼び出しを Promise.all に集約
  • pushImpl の入れ子 try/catch を 1 段に平坦化

レビュー指摘での実害バグ修正

Commit 指摘内容 修正
d0830ed (高) handleComplete の git add -A が解消対象以外の未ステージ変更まで巻き込み
(中) git:conflict-resolved 全 BrowserWindow broadcast で別 workspace の paused 状態が誤クリア
gitAddAll 削除(個別 file は resolveConflictImpl 時点で stage 済)
emit に workspacePath payload、受信側で workspacePath !== resolved なら早期 return
3bf3d42 (高) git rebase --continue が default で commit message editor を起動 → ユーザーの GIT_EDITOR=vim 等でハング git-env.ts の env override に GIT_EDITOR=":" / EDITOR=":" / VISUAL=":" / GIT_PAGER="cat" 等を追加(POSIX shell no-op builtin)
f43a200 (中) BrowserWindow.fromId(webContents.id) の型ミスマッチで親解決が常に undefined
(中) loadURL 失敗時に Map / allowedRoots がリーク
getAllWindows().find(w => w.webContents.id === parentSenderId) に変更
load を try/catch で囲み、失敗時に conflictWindows.delete / setActiveWorkspaceForWindow(null) / win.destroy() を明示実行

動作確認

  • pnpm format / pnpm lint / pnpm typecheck / pnpm test 全 pass
  • 全テスト 71 files / 1475 passed + 2 skipped(Stage 3 の 1416 から +59)
    • validator 14 件 / git impl 35 件 + 1 件(hostile editor 回帰)/ window 8 件(parent / load failure 含む)/ useGitSync workspace-filter 1 件
  • GIT_EDITOR="sleep 30" pnpm test -t "rebase --continue" でローカル再現確認 → 修正後 0.7 秒で pass
  • pnpm dev でリモート設定済 workspace を開いて:
    • 自動コミット → push が成功する
    • 上流変更を pull → fast-forward で working tree に反映される
    • 同一ファイル両方変更で pull → conflict window が自動で開く → ours/theirs 選択 → 「完了」 → 親 window がリフレッシュ
    • 解決済みでもう一度「コンフリクト」ボタン → window が再度 focus(重複生成されない)
    • 親ウィンドウを閉じると子(conflict)も追従 close する

スクリーンショット

UI 変更なし(ConflictWindow.tsx 等のフロント側は Stage 0b で取り込み済み)。

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 8 commits May 6, 2026 01:38
@ymnao @claude
chore: simple-git 導入と git validator / env wrapper を追加
b587831
Stage 4 (Git Sync) の準備段階。

- [email protected] を dependencies に追加
- electron/main/utils/git-validators.ts: validateRelativePath / validateRefName
  / isStageNotFound / MAX_CONFLICT_CONTENT_SIZE を旧 Rust git_sync.rs から 1:1 port
- electron/main/utils/git-env.ts: createGit() / createGitNoCwd() / extractGitErrorMessage()
  - LC_ALL=C / GIT_TERMINAL_PROMPT=0 / GIT_ASKPASS="" / SSH_ASKPASS="" /
    GIT_LITERAL_PATHSPECS=1 + core.hooksPath=NULL を共通化
  - .env({...process.env, ...overrides}) で PATH/HOME を温存
- validator は旧 Rust 5 件 + 拡張で 14 ケースをテスト

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
feat: 旧 Rust git_sync.rs を simple-git で 12 コマンド実装
273e2ed
- electron/main/ipc/git.ts を全 no-op スタブから本実装に置換
  - check-available / check-repo / status / add-all / commit / pull / push
  - get-conflicted-files / get-conflict-content / resolve-conflict
  - finish-conflict-resolution / get-last-commit-time
  - emit-conflict-resolved(broadcast は既存実装を維持)
- assertPathAllowed で canonical を取得し I/O は canonical に揃える
  (fs.ts / search.ts と同方針)
- pull の "no tracking information" / push の "no upstream" は旧 Rust 互換で
  自動ハンドリング("" return / -u origin <branch> 自動付与)
- get-conflict-content は git show :2:/:3: を raw で実行、modify/delete
  conflict の missing stage は isStageNotFound で empty 文字列 fallback
- resolve-conflict modify は 旧 Rust safe_write_in_repo を 1:1 port
  (親ディレクトリ bounds 再確認 + target が symlink なら拒否)
- finish-conflict-resolution は .git/{rebase-merge,rebase-apply,MERGE_HEAD}
  で rebase --continue / commit --no-edit を分岐
- commit は simple-git の "stderr が空だと success 扱い" を回避するため、
  stdout の "nothing to commit" パターンを明示的に throw(旧 Tauri Err 経路再現)

simple-git 3.x の vulnerability ガードは process.env 由来の GIT_EDITOR /
GIT_ASKPASS / hooksPath を default で reject するため、対応する unsafe
フラグを git-env.ts でまとめて opt-in した。

テスト: 実 git バイナリ + mkdtemp で 35 ケース(merge/rebase/modify-delete
conflict、no-upstream auto-retry、symlink 拒否、path-guard 横断)。
全テスト 1465 passed (+35)。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
feat: コンフリクト解決ウィンドウを独立 BrowserWindow として開く
fafa0a6
- electron/main/utils/window-lifecycle.ts を新設
  - 親 / 子 共通の close handler (stopWatcherForWindow / clearSearchForWindow /
    unregisterWindow) を helper に切り出し、追加 cleanup を注入できる onCleanup
    フックを提供
- electron/main/index.ts の close handler を attachWindowLifecycle に置換
- electron/main/ipc/window.ts の window:open-conflict を本実装
  - Map<canonical workspacePath, BrowserWindow> で単一インスタンス管理
    (旧 Tauri WebviewWindow.getByLabel 互換、複数 workspace 並列にも対応)
  - parent の allowedRoots に登録された workspace のみ開かせる
    (renderer 引数を信頼せず main 側で再検証)
  - 子 webContents.id 向けに setActiveWorkspaceForWindow で path-guard 委譲
    (ConflictWindow.tsx は workspaceSet を呼ばないため必須)
  - dev: ELECTRON_RENDERER_URL?conflict=true&workspacePath=<encoded>
    prod: loadFile(..., { search }) で query 構築
- electron/main/ipc/window.test.ts を新規(vi.hoisted + Proxy で BrowserWindow
  をモック化、6 ケース:未承認 path 拒否 / workspace 登録 / URL 構築(dev/prod)/
  単一インスタンス / minimized 復帰)

全テスト 1471 passed (+6)。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
docs: migration-plan.md の Stage 4 チェックリストを完了状態にする
024b3ec
Stage 4 (Git Sync) 完了に伴い、L86-90 の `[ ]` を `[x]` に更新。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
refactor: git impl の独立 git 呼び出しを Promise.all で並列化
ab987ee
simplify レビューで指摘された逐次 await を並列化。git CLI spawn が逐次
だとレイテンシが累積するため、独立コマンドはまとめて投げる。

- statusImpl: rev-parse / status --porcelain / remote の 3 cmd を並列化
  (useGitSync の refresh で頻繁に呼ばれるホットパス)
- getConflictContentImpl: stage 2 / 3 の git show を並列化
  (conflict resolver 起動直前のブロッキング処理、UX 改善に直結)
- finishConflictResolutionImpl: rebase-merge / rebase-apply / MERGE_HEAD
  の fsp.access を並列化
- pushImpl: no-upstream 再試行で branch / remote 取得を並列化、入れ子の
  try/catch を平坦化(外側の catch を変数 firstError に詰めて単段に)

挙動変更なし。全 1471 テスト pass。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
fix: コンフリクト解消完了時のステージ巻き込みと broadcast 越境を修正
d0830ed
simplify レビュー後にユーザーから指摘された 2 件の実害バグを修正。

1. (高) 完了ボタンで `git add -A` を呼んでいたため、解消対象以外の
   未ステージ変更まで `git rebase --continue` / `git commit --no-edit`
   に巻き込んでいた。各ファイルは resolveConflict 時点で
   `git add -- <file>` / `git rm -- <file>` 済みのため、handleComplete
   の gitAddAll 呼び出しは不要かつ有害。削除。
2. (中) `git:conflict-resolved` を全 BrowserWindow に無差別 broadcast
   しており、別 workspace で未解決 conflict 中の useGitSync が
   `pausedRef.current = false` を先に実行してしまい、refreshStatus
   完了前に自動 commit/pull/push が paused 突破で走り得た。
   - main: emit に workspacePath payload を載せて broadcast
   - preload / commands.ts: emitConflictResolved / onConflictResolved
     のシグネチャを (workspacePath: string) で型付け
   - ConflictWindow: handleComplete / auto-close の両経路で
     emitConflictResolved(workspacePath) を呼ぶ
   - useGitSync: 受信時に `resolvedWorkspacePath !== workspacePath`
     なら早期 return(自分の workspace の event のみ paused をクリア)

回帰テスト追加: 別 workspace の broadcast を ignore し、自 workspace の
broadcast のみ refreshStatus を走らせることを確認(useGitSync.test.ts に
1 件追加、合計 1472 件 pass)。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
fix: editor 系 env を no-op で上書きして rebase --continue のハングを防ぐ
3bf3d42
`git rebase --continue` は default で commit message のエディタを起動する
ため、GIT_ENV_OVERRIDES に GIT_EDITOR / EDITOR / VISUAL の上書きがないと、
ユーザーの普段使い(vim / nano / VS Code 等)が呼ばれてプロセスが
ハングする。`commit --no-edit` 経路は明示 flag のため影響なし。

修正:
- git-env.ts に GIT_EDITOR=":" / GIT_SEQUENCE_EDITOR=":" / EDITOR=":" /
  VISUAL=":" を追加(POSIX shell の no-op builtin、git は
  `/bin/sh -c "<editor> <file>"` で起動するため即 exit 0)
- 同じ理由で GIT_PAGER="cat" / PAGER="cat" も追加(pager 起因の
  ハングを将来 防ぐ defensive override)

回帰テスト: `vi.stubEnv("GIT_EDITOR", "sleep 60")` で hostile な editor を
強制しても rebase --continue が即完走することを担保。

ローカル再現: 修正前は `GIT_EDITOR="sleep 30" pnpm test -t "rebase --continue"`
で `Please supply the message using either -m or -F option` でテスト失敗。
修正後は 0.7 秒で pass。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao @claude
fix: conflict window の parent 解決と load 失敗時の状態リークを修正
f43a200
simplify レビューで指摘された 2 件の中程度バグを修正。

1. (中) parent BrowserWindow が解決できておらず親子関連付けが効いていな
   かった。`event.sender.id` は webContents.id だが、
   `BrowserWindow.fromId()` は BrowserWindow.id を期待するため、常に null
   が返って parent === undefined になっていた。結果として「親 close で
   子も追従して close」が成立しない。
   → `BrowserWindow.getAllWindows().find(w => w.webContents.id === parentSenderId)`
   で線形探索に変更。`window:close` ハンドラ既存の
   `BrowserWindow.fromWebContents()` パターンと同じ意図で、senderId 経路
   をそのまま渡せる。
2. (中) loadURL / loadFile が失敗すると Map と allowedRoots に状態が
   残り、次回 openConflictWindow が壊れた window を focus し続ける状態
   リークがあった。
   → loadURL/File を try/catch で囲み、失敗時に conflictWindows.delete /
   setActiveWorkspaceForWindow(null) / win.destroy() を明示実行してから
   rethrow。real Electron では destroy が closed event を発火し
   attachWindowLifecycle 経由でも cleanup が走るが、両者とも冪等なため
   explicit に書く(mock 環境では closed event が発火しないため)。

回帰テスト追加 (window.test.ts):
- "resolves parent BrowserWindow via webContents.id (not BrowserWindow.id)":
  親 window を先に作って webContents.id を senderId に渡し、子 window の
  opts.parent が親 window object を指すことを確認。fromId() ベースの
  旧実装ではこのテストは fail する。
- "cleans up Map and allowedRoots when load fails":
  loadURL を reject させ、Map / allowedRoots / window の destroy が
  すべて行われ、再 open で新しい window が作られることを確認。

FakeWindow に destroy 追加、`simulateLoadFailure` で次回 load を一時的に
fail させるフラグを vi.hoisted に追加。

全テスト 1475 件 pass (+2)。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 6, 2026 11:35
Copilot started reviewing on behalf of ymnao May 6, 2026 11:36
View session
Copilot AI reviewed May 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

旧 Tauri 版の Git Sync 実装を Electron main(simple-git ベース)へ 1:1 移植し、コンフリクト解決 UI を独立した BrowserWindow として開けるようにする PR です。Stage 4(Git Sync)の移行を完了させ、旧版相当の UX を Electron で再現することを目的としています。

Changes:

  • simple-git を導入し、Git Sync の IPC 12 コマンド(status / pull / push / conflict 解決等)を Electron main に実装
  • コンフリクト解決ウィンドウの単一インスタンス管理と、親→子への workspace 権限委譲(path-guard)を追加
  • conflict 解消イベントに workspacePath payload を載せ、renderer 側で workspace を照合して誤クリアを防止(テスト追加)

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/commands.ts conflict 解消イベント API を workspacePath payload 付きに更新
src/hooks/useGitSync.ts conflict 解消 broadcast を workspace 単位でフィルタして paused 誤クリアを防止
src/hooks/useGitSync.test.ts conflict 解消 broadcast の workspace フィルタ動作をテスト追加
src/components/conflict/ConflictWindow.tsx git add -A の巻き込み回避+emit に workspacePath を付与、依存配列調整
src/components/conflict/ConflictWindow.test.tsx emit の引数(workspacePath)を検証するように更新
package.json simple-git 依存を追加
pnpm-lock.yaml simple-git および関連依存の lock 追加
electron/preload/index.ts emitConflictResolved / onConflictResolved を payload 付き IPC に更新
electron/preload/api.ts preload API 型を payload 付きに更新
electron/main/utils/window-lifecycle.ts window close 時の per-window 状態 cleanup を共通化
electron/main/utils/git-validators.ts Git 用 validator / 定数(path/ref/stage 判定)を追加
electron/main/utils/git-validators.test.ts validator のユニットテスト追加
electron/main/utils/git-env.ts Git 実行時の env/config/unsafe 設定を集約(hooks/editor/pager 等を制御)
electron/main/ipc/window.ts conflict resolver window の単一インスタンス生成・権限委譲・load 失敗 cleanup を実装
electron/main/ipc/window.test.ts conflict window の single instance / parent 解決 / load 失敗 cleanup をテスト追加
electron/main/ipc/git.ts Git Sync IPC を simple-git + raw 呼び出し中心で本実装、conflict resolved broadcast payload 化
electron/main/ipc/git.test.ts Git IPC 実装の統合テスト(repo/remote/conflict/rebase 等)を追加
electron/main/index.ts main window の close cleanup を attachWindowLifecycle に移譲
docs/migration-plan.md Stage 4 完了チェックを更新
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread electron/main/ipc/git.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ymnao @claude
fix: emit-conflict-resolved に path-guard を追加して broadcast 偽装を防ぐ
5607f78
Copilot レビューで指摘された認可漏れを修正。

`git:emit-conflict-resolved` ハンドラは renderer から渡される
workspacePath を検証せず全 BrowserWindow に broadcast していたため、
不正な / 別 workspace の renderer が任意の path を流して他 workspace の
`pausedRef` を解除できる経路があった。renderer は信頼できない前提で
他 IPC は `assertPathAllowed` を通しているのに、この emit だけ漏れていた。

修正:
- `emitConflictResolvedImpl(senderId, workspacePath)` を切り出し、冒頭で
  `assertPathAllowed(senderId, workspacePath)` を実行
- 正規の conflict window は createConflictWindow 内で
  `setActiveWorkspaceForWindow(childId, canonical)` 済みなので pass、
  偽装 emit は Permission denied で reject される
- destroyed window への send 防止に `!win.isDestroyed()` ガードも追加

回帰テスト追加 (git.test.ts):
- 正規 sender が自 workspace の path を emit → success
- 別 workspace の path を emit → Permission denied
- 何も登録されていない window から emit → Permission denied

全テスト 1478 件 pass (+3)。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao
ymnao requested a review from Copilot May 6, 2026 12:00
Copilot started reviewing on behalf of ymnao May 6, 2026 12:01
View session
Copilot AI reviewed May 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread electron/main/ipc/git.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread electron/main/utils/git-env.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ymnao @claude
fix: resolveConflict modify を canonical I/O に揃え、UNSAFE_FLAGS を整理
311a574
Copilot レビュー指摘 2 件に対応。

1. (must) resolveConflictImpl の modify 経路で canonical I/O されていない
   `assertPathAllowed(senderId, dirname(target))` の戻り値(canonical な親)
   を捨てて raw な target で mkdir/writeFile していたため、fs.ts の
   「判定に使った canonical をそのまま I/O に使う」TOCTOU 最小化方針から
   外れていた。
   → canonical な親を `canonicalParent` として保持し、`canonicalTarget =
     join(canonicalParent, basename(target))` で組み直して I/O する形に修正。
     symlink lstat は canonical 化前の `target` で実行する必要があるため
     順序は変えない(lstat は symlink 自身を検査)。`git add -- filePath`
     は repo-relative path で動作するため変更不要。

2. (recommend) UNSAFE_FLAGS が一律 true で前提とコメントがズレていた
   フラグの分類をコメントで明記し、不要なものを削除:
   - (A) 我々が env / config[] で安全な値に固定しているもの:
     hooksPath / editor / askPass / pager
   - (B) ユーザーの普段の git 環境(.gitconfig / 環境変数)を意図的に
     尊重するもの: credentialHelper / configPaths / sshCommand
     旧 Tauri 版が std::process::Command で process.env を継承していたのと
     同じ UX を維持するため。攻撃者制御値の流入は IPC 認可で workspace
     単位に閉じ込めて防ぐ。
   - 削除: allowUnsafeProtocolOverride(-c で設定しておらず、env 経路でも
     継承する必要がない)

回帰なし。全テスト 1478 件 pass。

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ymnao
ymnao requested a review from Copilot May 6, 2026 14:19
Copilot started reviewing on behalf of ymnao May 6, 2026 14:20
View session
Copilot AI reviewed May 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ymnao
ymnao merged commit 8c5b8a2 into main May 6, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ymnao
ymnao deleted the feature/stage-4-git branch May 6, 2026 14:44
ymnao added a commit that referenced this pull request Jun 19, 2026
@ymnao
chore: undici security advisory 9 件を parent>child override で対応 (#201)
095af69
@electron/get / jsdom 経由の undici 7.25.0 と node-gyp 経由の 6.25.0 を
それぞれ patched 版 (^7.28.0 / ^6.27.0) に固定して open alert を解消する。

対象 alert (9 件):
- #10 GHSA-pr7r-676h-xcf6 (medium) — cross-user info disclosure via shared cache whitespace bypass (7.x)
- #11 GHSA-vmh5-mc38-953g (high)   — TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgent (7.x)
- #12 GHSA-35p6-xmwp-9g52 (low)    — HTTP response queue poisoning via keep-alive socket reuse (6.x)
- #13 GHSA-35p6-xmwp-9g52 (low)    — 同上 (7.x)
- #14 GHSA-hm92-r4w5-c3mj (high)   — cross-origin request routing via SOCKS5 proxy pool reuse (7.x)
- #17 GHSA-p88m-4jfj-68fv (medium) — HTTP header injection via Set-Cookie percent-decoding (6.x)
- #18 GHSA-p88m-4jfj-68fv (medium) — 同上 (7.x)
- #19 GHSA-g8m3-5g58-fq7m (low)    — Set-Cookie SameSite downgrade via permissive substring matching (6.x)
- #20 GHSA-g8m3-5g58-fq7m (low)    — 同上 (7.x)

parent 特定:
- `@electron/[email protected]` (electron の devDep transitive) が optionalDep として undici 7.25.0
- `[email protected]` (Vitest の DOM 環境用 devDep) が undici 7.25.0
- `[email protected]` (@electron/rebuild → electron-builder 経由) が undici 6.25.0

実害評価: いずれも build/test time の transitive で本リポ runtime は触らない。
SOCKS5 ProxyAgent / shared cache / 攻撃者制御 Set-Cookie 等の前提を満たさないが、
alert closed 化が目的で patch を適用。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ymnao
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.