From 0b711f29084462498bf483e25c28d647e0e24a17 Mon Sep 17 00:00:00 2001 From: kongesque Date: Mon, 16 Nov 2026 12:51:22 +0800 Subject: [PATCH] build: update Go to 1.27.4 for net/http security fix GO-2026-6859 (published 2026-11-11) affects net/http in Go 1.27.3 and is fixed in Go 1.27.4. The CLI runs no HTTP server, but govulncheck reports the patched symbols as reachable, so the security scan fails every CI run on 1.27.3. Update the module, compiler guard, CI and release pins, build requirements, and the security record together. --- .github/workflows/cli-release.yml | 2 +- .github/workflows/cli.yml | 4 ++-- AGENTS.md | 2 +- CHANGELOG.md | 7 +++++++ README.ja.md | 2 +- README.md | 2 +- README.th.md | 2 +- README.zh-TW.md | 2 +- docs/CLI.ja.md | 2 +- docs/CLI.md | 2 +- docs/CLI.th.md | 2 +- docs/CLI.zh-TW.md | 2 +- docs/DEVELOPMENT.md | 6 +++--- docs/SECURITY.md | 17 ++++++++++++++--- docs/SESSION.md | 2 +- go.mod | 2 +- scripts/check-toolchain.sh | 4 ++-- 17 files changed, 40 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index 3e93797..30321ff 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.27.3' + go-version: '1.27.4' cache: true - name: Verify security toolchain shell: bash diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 16538b8..1a485ca 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.27.3' + go-version: '1.27.4' cache: true - name: Verify security toolchain shell: bash @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.27.3' + go-version: '1.27.4' cache: true - name: Verify security toolchain shell: bash diff --git a/AGENTS.md b/AGENTS.md index 9260386..d50c96f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ This repository contains no Matrix connector or homeserver integration. ## Build and checks -Requirements: Go 1.27.3. macOS needs CGO and Xcode Command Line Tools for Keychain. +Requirements: Go 1.27.4. macOS needs CGO and Xcode Command Line Tools for Keychain. Linux and Windows support `CGO_ENABLED=0`. No libolm or ffmpeg is required. ```sh diff --git a/CHANGELOG.md b/CHANGELOG.md index ca3d694..5242245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,13 @@ and the documentation at your installed version's tag. - The docs no longer promise a seven-day refresh interval; LINE decides when a refresh is due. +### Security + +- Require the reviewed Go 1.27.4 compiler for source, CI, and release builds to + address [GO-2026-6859](https://pkg.go.dev/vuln/GO-2026-6859) in `net/http`. + The advisory affects HTTP/1 servers, which the CLI does not run, but the + vulnerability scan reports the affected package as reachable. + ## [0.6.0] - 2026-11-07 Inbox control and agent safety: mark chats read on purpose, filter unread diff --git a/README.ja.md b/README.ja.md index 812a96e..183c516 100644 --- a/README.ja.md +++ b/README.ja.md @@ -234,7 +234,7 @@ Homebrewでは `brew upgrade line-cli` を実行します。その他のイン ## ビルドと開発への参加 -ソースからのビルドには **Go 1.27.3** が必要です。macOSではXcode Command Line ToolsとCGOも必要です。 +ソースからのビルドには **Go 1.27.4** が必要です。macOSではXcode Command Line ToolsとCGOも必要です。 設定と開発時の検証は[ソースからのビルド](docs/CLI.ja.md#build-from-source)と [開発への参加](CONTRIBUTING.md)(英語)を参照してください。 diff --git a/README.md b/README.md index db13d46..024b158 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ values, and private messages. ## Build and contribute -Source builds require **Go 1.27.3**; macOS also needs Xcode Command Line Tools +Source builds require **Go 1.27.4**; macOS also needs Xcode Command Line Tools and CGO. See [build from source](docs/CLI.md#build-from-source) and [contributing](CONTRIBUTING.md) for setup and development checks. diff --git a/README.th.md b/README.th.md index 0473ee9..c6f9bf9 100644 --- a/README.th.md +++ b/README.th.md @@ -230,7 +230,7 @@ line update # อัปเดตเมื่อรองรับ ห ## บิลด์และร่วมพัฒนา -การบิลด์จากซอร์สโค้ดต้องใช้ **Go 1.27.3** บน macOS ต้องมี Xcode Command Line Tools และ CGO ด้วย +การบิลด์จากซอร์สโค้ดต้องใช้ **Go 1.27.4** บน macOS ต้องมี Xcode Command Line Tools และ CGO ด้วย ดูวิธีตั้งค่าและตรวจสอบใน[คู่มือบิลด์จากซอร์สโค้ด](docs/CLI.th.md#build-from-source) และ [คู่มือร่วมพัฒนา](CONTRIBUTING.md) (ภาษาอังกฤษ) diff --git a/README.zh-TW.md b/README.zh-TW.md index 990903b..9742dc0 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -226,7 +226,7 @@ Homebrew 請使用 `brew upgrade line-cli`。其他安裝方式請參閱 ## 建置與參與開發 -原始碼建置需要 **Go 1.27.3**;macOS 另需 Xcode Command Line Tools 與 CGO。 +原始碼建置需要 **Go 1.27.4**;macOS 另需 Xcode Command Line Tools 與 CGO。 設定與開發檢查請參閱[原始碼建置](docs/CLI.zh-TW.md#build-from-source)及 [參與開發指南](CONTRIBUTING.md)(英文)。 diff --git a/docs/CLI.ja.md b/docs/CLI.ja.md index 0007112..4c928f1 100644 --- a/docs/CLI.ja.md +++ b/docs/CLI.ja.md @@ -1051,7 +1051,7 @@ Homebrewはまだこれらのスクリプトをインストールしません。 ### ソースからビルドする -GitとGo 1.27.3が必要です。macOSではKeychain対応のため、Xcode Command Line ToolsとCGOも必要です。 +GitとGo 1.27.4が必要です。macOSではKeychain対応のため、Xcode Command Line ToolsとCGOも必要です。 macOSまたはLinux: diff --git a/docs/CLI.md b/docs/CLI.md index fb094cf..fb2892d 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -1089,7 +1089,7 @@ scripts yet. ### Build from source -You need Git and Go 1.27.3. macOS also needs Xcode Command Line Tools +You need Git and Go 1.27.4. macOS also needs Xcode Command Line Tools and CGO for Keychain support. On macOS or Linux: diff --git a/docs/CLI.th.md b/docs/CLI.th.md index 11bb16a..135f122 100644 --- a/docs/CLI.th.md +++ b/docs/CLI.th.md @@ -1036,7 +1036,7 @@ line completion powershell | Out-String | Invoke-Expression ### บิลด์จากซอร์สโค้ด -ต้องมี Git และ Go 1.27.3 บน macOS ต้องมี Xcode Command Line Tools และ CGO เพื่อรองรับ Keychain ด้วย +ต้องมี Git และ Go 1.27.4 บน macOS ต้องมี Xcode Command Line Tools และ CGO เพื่อรองรับ Keychain ด้วย บน macOS หรือ Linux: diff --git a/docs/CLI.zh-TW.md b/docs/CLI.zh-TW.md index 2cdac8e..cc2d80e 100644 --- a/docs/CLI.zh-TW.md +++ b/docs/CLI.zh-TW.md @@ -994,7 +994,7 @@ line completion powershell | Out-String | Invoke-Expression ### 從原始碼建置 -需要 Git 與 Go 1.27.3。macOS 還需要 Xcode Command Line Tools 與 CGO,以支援 Keychain。 +需要 Git 與 Go 1.27.4。macOS 還需要 Xcode Command Line Tools 與 CGO,以支援 Keychain。 macOS 或 Linux: diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index e92f3a0..e5e8de1 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -10,7 +10,7 @@ for everyday usage, see the [CLI guide](CLI.md). Tests live beside the packages they exercise. Ordinary tests use synthetic data, fake APIs, and temporary storage. They do not require a LINE login. Requirements -are Go 1.27.3; macOS also needs CGO and Xcode Command Line Tools for Keychain. +are Go 1.27.4; macOS also needs CGO and Xcode Command Line Tools for Keychain. Linux and Windows support `CGO_ENABLED=0`. ## Build and checks @@ -241,7 +241,7 @@ The original eight audit probes now have permanent corrected-behavior coverage: ## Security regression and release checks -Use `GOTOOLCHAIN=go1.27.3` when the host Go version differs. The build guard +Use `GOTOOLCHAIN=go1.27.4` when the host Go version differs. The build guard checks the compiler selected by `GO`, and rejects an unreviewed toolchain. ```sh @@ -290,7 +290,7 @@ the [changelog](../CHANGELOG.md) until a version and release date are chosen. - Check relative links and heading anchors, including inside the extracted release archive. Source/development references may link to GitHub. - Keep the Go module, compiler guard, build instructions, CI and release pins in - sync. The reviewed toolchain is currently **Go 1.27.3**, not a minimum-version + sync. The reviewed toolchain is currently **Go 1.27.4**, not a minimum-version claim that accepts every future compiler. - Review stdout/stderr, partial results, exit codes, and mutation outcomes in the [JSON reference](JSON.md). Existing legacy JSON shapes diff --git a/docs/SECURITY.md b/docs/SECURITY.md index eedc18a..a31ab13 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -130,11 +130,11 @@ fail explicitly and may require a reviewed budget adjustment. ### Toolchain and vulnerability scans -Builds select Go 1.27.3, including CI/release jobs. `build.sh` checks the actual +Builds select Go 1.27.4, including CI/release jobs. `build.sh` checks the actual compiler selected by `GO`/`GOTOOLCHAIN`; older compilers and unreviewed versions -fail before building. The minimum module directive is also Go 1.27.3. This +fail before building. The minimum module directive is also Go 1.27.4. This replaces the earlier Go 1.26+ requirement. To select the reviewed compiler: -`GOTOOLCHAIN=go1.27.3 ./build.sh`. Future toolchain updates should change the +`GOTOOLCHAIN=go1.27.4 ./build.sh`. Future toolchain updates should change the module, CI pins, and compiler guard together after advisory review. Run `./scripts/security-check.sh ./bin/line` for source and binary scans using @@ -143,6 +143,17 @@ pinned govulncheck v1.9.0. Release jobs scan each target before packaging. [Go 1.27.2](https://go.dev/doc/devel/release#go1.27.0) contains its fix. Scanner findings require applicability review; there is no standard-library exemption. +Security update (2026-11-16): [GO-2026-6859](https://pkg.go.dev/vuln/GO-2026-6859), +published on 2026-11-11, is a crash in HTTP/1 servers that use `MaxBytesReader` +or `MaxBytesHandler`. The CLI runs no HTTP server, but govulncheck reports the +patched `net/http` symbols as reachable from its HTTP client calls, so the scan +fails on Go 1.27.3. Go 1.27.4 contains the fix. The module, compiler guard, and +CI/release jobs now select that toolchain. No advisory suppression is used. + +After this update, source and macOS arm64 binary scans with govulncheck v1.9.0 +and Go 1.27.4 reported no reachable or imported-package vulnerabilities. Five +module-only findings remain in code that the CLI does not call. + Security update (2026-10-22): [GO-2026-6809](https://pkg.go.dev/vuln/GO-2026-6809), published on 2026-10-21, identifies compromised intermediate certificates that `crypto/x509` must reject. Go 1.27.3 adds the certificate denylist. The module, diff --git a/docs/SESSION.md b/docs/SESSION.md index 126ef18..0d39bd5 100644 --- a/docs/SESSION.md +++ b/docs/SESSION.md @@ -178,7 +178,7 @@ fails, the client cannot guarantee recovering that unknown/uncommitted token. ### Historical token-audit validation Recorded on macOS with Go 1.27.1; this is historical evidence, not the current -build requirement. Current builds require Go 1.27.3. +build requirement. Current builds require Go 1.27.4. Checks recorded for that audit: diff --git a/go.mod b/go.mod index ee33279..137ab5e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kongesque/line-cli -go 1.27.3 +go 1.27.4 require golang.org/x/crypto v0.54.0 diff --git a/scripts/check-toolchain.sh b/scripts/check-toolchain.sh index 7660601..9497f0e 100755 --- a/scripts/check-toolchain.sh +++ b/scripts/check-toolchain.sh @@ -3,7 +3,7 @@ # compiler chosen by GO/GOTOOLCHAIN, not an unrelated executable on PATH. set -eu compiler=$("${GO:-go}" env GOVERSION) -if [ "$compiler" != "go1.27.3" ]; then - printf '%s\n' "LINE CLI requires the reviewed Go 1.27.3 toolchain (selected: $compiler). Set GOTOOLCHAIN=go1.27.3." >&2 +if [ "$compiler" != "go1.27.4" ]; then + printf '%s\n' "LINE CLI requires the reviewed Go 1.27.4 toolchain (selected: $compiler). Set GOTOOLCHAIN=go1.27.4." >&2 exit 1 fi