Skip to content

Commit 22d3e92

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ae7a131 + a1d5c3f commit 22d3e92

6 files changed

Lines changed: 106 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v5
1919
with:
20-
go-version: '1.24'
20+
go-version: '1.25'
2121

2222
- name: Set up uv
2323
uses: astral-sh/setup-uv@v5

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: '1.24'
24+
go-version: '1.25'
2525

2626
- name: Set up uv
2727
uses: astral-sh/setup-uv@v5

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ mv perfmonger ~/bin/perfmonger
5454

5555
### Build from source
5656

57-
You need Go 1.24 or later (matches `core/go.mod`).
57+
You need Go 1.25 or later (matches `core/go.mod`).
5858

5959
```sh
6060
git clone https://github.com/hayamiz/perfmonger.git

‎RELEASING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ On a `v*.*.*` tag push, `release.yml`:
8686

8787
1. Checks out the repository with full history (`fetch-depth: 0`, required by
8888
GoReleaser to compute the version).
89-
2. Sets up Go 1.24 and `uv`.
89+
2. Sets up Go 1.25 and `uv`.
9090
3. Runs the test gate: `make build && make vet && make test`. If this fails the
9191
release is aborted.
9292
4. Extracts the top section of `NEWS.md` into `/tmp/relnotes.md`:

‎core/go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hayamiz/perfmonger/core
22

3-
go 1.25.0
3+
go 1.25.12
44

55
require (
66
github.com/hayamiz/go-projson v0.0.0-20210510072849-3503bd24ae61
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Go ツールチェーンを 1.25.12+ に引き上げて残存 stdlib 脆弱性を解消
3+
type: chore
4+
priority: high
5+
status: resolved
6+
created: 2026-07-12
7+
updated: 2026-07-12
8+
---
9+
10+
## Triage
11+
12+
- Complexity: low
13+
- Mechanical fix: yes
14+
- Requires user decision: no
15+
- Notes: 修正対象・修正値ともに govulncheck 調査で確定済み(下記 Description 参照)。
16+
配布形式や設計判断は不要で、`go` ディレクティブ/CI の `go-version`/ドキュメントの
17+
バージョン記述を機械的に引き上げるだけ。依存モジュール(x/crypto・x/sys)は
18+
Dependabot PR #44 で解決済みのため追加作業なし。検証はプロジェクト規定の
19+
`make build && make vet && make test` と govulncheck で行う。
20+
21+
## Description
22+
23+
`govulncheck` による調査の結果、`core` モジュールで**到達可能な脆弱性はすべて
24+
Go 標準ライブラリ由来**であり、ビルドに使う Go ツールチェーンを引き上げることで
25+
解消できることが判明した。ローカル開発環境(go1.26.5)ではすでに到達可能な
26+
脆弱性は 0 件だが、**CI・リリースビルドは古い Go を使うため配布バイナリには
27+
脆弱性が残る**。この恒久対処を行う。
28+
29+
### 現状のギャップ
30+
31+
- `core/go.mod`: `go 1.25.0`
32+
- `.github/workflows/ci.yml` / `release.yml`: `go-version: '1.24'`
33+
- `RELEASING.md`: 「Go 1.24」、`README.md`: 「Go 1.24 or later」
34+
35+
`GOTOOLCHAIN=auto` の下、CI は `go` ディレクティブの `1.25.0` までしか自動昇格
36+
しない。`1.25.0` は下記の修正を含まないため、CI 産の配布バイナリに到達可能な
37+
脆弱性(特に `GO-2026-4602`)が残る。
38+
39+
### govulncheck が示した到達可能な脆弱性(go1.24 ビルド時点)
40+
41+
| ID | パッケージ | 修正版 | 備考 |
42+
|----|-----------|--------|------|
43+
| GO-2026-4602 | `os`(FileInfo が Root から脱出) | os@go1.25.8 | 最も高い下限の一つ |
44+
| GO-2025-3956 | `os/exec`(LookPath) | os/exec@go1.24.6 | go1.25 系で解消済み |
45+
| GO-2025-3750 | `os`/`syscall`(O_CREATE\|O_EXCL) | os@go1.24.4 | Windows 限定・Linux 専用の本 project では無影響 |
46+
47+
到達不能層(import/require のみ)にも stdlib のパッチ待ち advisory が多数あり、
48+
その修正下限の最大は `1.25.12`(例: `os@go1.25.12`、`stdlib@go1.25.12`)。
49+
50+
### 決定した修正値
51+
52+
ビルド下限を **`1.25.12`** に引き上げる(`GO-2026-4602` の 1.25.8 を含み、
53+
到達不能な stdlib advisory 群もまとめて解消できる最小の統一値)。
54+
55+
### 修正内容
56+
57+
1. `core/go.mod` — `go 1.25.0` → `go 1.25.12`(`GOTOOLCHAIN=auto` の下限を固定)。
58+
2. `.github/workflows/ci.yml` / `.github/workflows/release.yml` —
59+
`go-version: '1.24'` → `'1.25'`(既存流儀どおり最新 1.25.x に追随)。
60+
3. `RELEASING.md` — 「Sets up Go 1.24」等の記述を Go 1.25 系へ更新。
61+
4. `README.md` — Build from source の「Go 1.24 or later」を「Go 1.25 or later」へ。
62+
63+
### 残る非対処項目(対処不能・対処不要)
64+
65+
- `GO-2026-5932`(`golang.org/x/crypto@v0.52.0`、Fixed in: N/A)— 上流に修正版が
66+
存在せず、かつ perfmonger の実コードから到達不能。バージョン更新では消せない
67+
ため本チケットのスコープ外。
68+
69+
### 関連
70+
71+
- 依存更新(x/crypto 0.45.0→0.52.0): Dependabot PR #44(マージ済み)
72+
- ローカル goreleaser ツーリング: コミット `34aafb7`
73+
74+
## Resolution (2026-07-12)
75+
76+
Description の「修正内容」1〜4 を機械的に適用した。
77+
78+
### 変更ファイル
79+
80+
- `core/go.mod` — `go 1.25.0` → `go 1.25.12`。`GOTOOLCHAIN=auto` のビルド下限を
81+
固定し、CI・リリースでも到達可能だった `GO-2026-4602`(要 1.25.8)を含む
82+
stdlib 脆弱性群を解消する。
83+
- `.github/workflows/ci.yml` / `.github/workflows/release.yml` —
84+
`go-version: '1.24'` → `'1.25'`。
85+
- `RELEASING.md` — 「Sets up Go 1.24」→「Sets up Go 1.25」。
86+
- `README.md` — Build from source の「Go 1.24 or later」→「Go 1.25 or later」。
87+
88+
### 検証(go1.26.5 ローカル環境、go.mod 下限 1.25.12)
89+
90+
- `make build` … PASS(`make clean` 後のフルビルド)。
91+
- `make vet` … PASS。
92+
- `make test`(Go 単体 + pytest)… PASS(pytest 41 passed)。
93+
- `govulncheck ./...`(core)… **到達可能な脆弱性 0 件**。到達不能な残 1 件は
94+
`GO-2026-5932`(`golang.org/x/crypto@v0.52.0`、Fixed in: N/A)で、上流に修正が
95+
無く実コードから未到達のため対処不能・対処不要(Description 参照)。
96+
97+
### 備考
98+
99+
コード変更は無く、ビルドツールチェーン下限とドキュメントのバージョン記述のみの
100+
更新。ユーザー可視の動作変更は無いため spec 更新は不要(本 project に spec 宣言も
101+
なし)。

0 commit comments

Comments
 (0)