diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e07f454..4afcfc7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,9 @@ jobs: bun run build - name: Download dependencies - run: go mod download + run: | + go version + go mod download - name: Test run: go test ./... diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index 5e5e1bc7..3279742a 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '>=1.25.1' + go-version-file: go.mod - name: Build frontend env: @@ -63,6 +63,7 @@ jobs: run: | go mod download go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(git describe --tags)'" -o max-api.exe + go version -m max-api.exe - name: Update Electron version run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdbbd12a..82df0bd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,16 +41,18 @@ jobs: - name: Set up Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: - go-version: '>=1.25.1' + go-version-file: go.mod - name: Build Backend (amd64) run: | go mod download go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION' -extldflags '-static'" -o max-api-$VERSION + go version -m "max-api-$VERSION" - name: Build Backend (arm64) run: | sudo apt-get update DEBIAN_FRONTEND=noninteractive sudo apt-get install -y gcc-aarch64-linux-gnu CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION' -extldflags '-static'" -o max-api-arm64-$VERSION + go version -m "max-api-arm64-$VERSION" - name: Generate checksums run: sha256sum max-api-* > checksums-linux.txt @@ -94,11 +96,12 @@ jobs: - name: Set up Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: - go-version: '>=1.25.1' + go-version-file: go.mod - name: Build Backend run: | go mod download go build -ldflags "-X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION'" -o max-api-macos-$VERSION + go version -m "max-api-macos-$VERSION" - name: Generate checksums run: shasum -a 256 max-api-macos-* > checksums-macos.txt @@ -144,11 +147,12 @@ jobs: - name: Set up Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: - go-version: '>=1.25.1' + go-version-file: go.mod - name: Build Backend run: | go mod download go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$VERSION'" -o max-api-$VERSION.exe + go version -m "max-api-$VERSION.exe" - name: Generate checksums run: sha256sum max-api-*.exe > checksums-windows.txt diff --git a/AGENTS.md b/AGENTS.md index 81fb70bb..cbd89fcc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ This is an AI API gateway/proxy built with Go. It aggregates 40+ upstream AI pro ## Tech Stack -- **Backend**: Go 1.22+, Gin web framework, GORM v2 ORM +- **Backend**: Go 1.26.10 (security build baseline), Gin web framework, GORM v2 ORM - **Frontend**: React 19, TypeScript, Rsbuild, Base UI, Tailwind CSS - **Databases**: SQLite, MySQL, PostgreSQL (all three must be supported) - **Cache**: Redis (go-redis) + in-memory cache diff --git a/CLAUDE.md b/CLAUDE.md index 706612ce..0746fc08 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ This is an AI API gateway/proxy built with Go. It aggregates 40+ upstream AI pro ## Tech Stack -- **Backend**: Go 1.22+, Gin web framework, GORM v2 ORM +- **Backend**: Go 1.26.10 (security build baseline), Gin web framework, GORM v2 ORM - **Frontend**: React 19, TypeScript, Rsbuild, Base UI, Tailwind CSS - **Databases**: SQLite, MySQL, PostgreSQL (all three must be supported) - **Cache**: Redis (go-redis) + in-memory cache diff --git a/Dockerfile b/Dockerfile index 52cdcfe8..a118ad05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY ./VERSION . WORKDIR /build/default RUN DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(cat VERSION) bun run build -FROM golang:1.26.1-alpine@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 AS builder2 +FROM golang:1.26.10-alpine@sha256:9ce231b28998b32e116927c61aa5c406183061d4f3f2d61b292c88e7f6bdf7ca AS builder2 ENV GO111MODULE=on CGO_ENABLED=0 ARG TARGETOS @@ -28,7 +28,8 @@ RUN go mod download COPY . . COPY --from=builder /build/default/dist ./web/default/dist -RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api +RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api \ + && go version -m max-api FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a diff --git a/Dockerfile.dev b/Dockerfile.dev index 4d73a766..72a14aa5 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,7 +1,7 @@ # Backend-only build for frontend development # Skips frontend build, uses a placeholder for //go:embed web/dist -FROM golang:1.26.1-alpine AS builder +FROM golang:1.26.10-alpine@sha256:9ce231b28998b32e116927c61aa5c406183061d4f3f2d61b292c88e7f6bdf7ca AS builder ENV GO111MODULE=on CGO_ENABLED=0 ARG TARGETOS @@ -19,7 +19,8 @@ COPY . . RUN mkdir -p web/default/dist && \ echo 'devuse frontend dev server' > web/default/dist/index.html -RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api +RUN go build -ldflags "-s -w -X 'github.com/MAX-API-Next/MAX-API/common.Version=$(cat VERSION)'" -o max-api \ + && go version -m max-api FROM debian:bookworm-slim diff --git a/README.en.md b/README.en.md index c3600849..054f811f 100644 --- a/README.en.md +++ b/README.en.md @@ -291,6 +291,8 @@ MAX API is not a foundation model and does not claim to have already achieved AG ## 🚢 Deployment guide +The security baseline for source builds is **Go 1.26.10**, which includes the certificate verification fix for CVE-2026-111943. Recompile with the patched toolchain and replace the backend binary when upgrading; installing a newer Go version or restarting an old binary does not update its standard library. CI and Docker builds use this version consistently. + The following steps use a stable release as an example. Pin the version tag and commit, and complete backup, verification, and rollback preparation before upgrading. Docker Compose is recommended: diff --git a/README.fr.md b/README.fr.md index e1d019e9..e25e1e2a 100644 --- a/README.fr.md +++ b/README.fr.md @@ -291,6 +291,8 @@ MAX API n'est pas un modèle de fondation et ne prétend pas avoir déjà attein ## 🚢 Guide de déploiement +La référence de sécurité pour les compilations depuis les sources est **Go 1.26.10**, qui inclut le correctif de vérification des certificats pour CVE-2026-111943. Recompilez avec la chaîne d'outils corrigée et remplacez le binaire du backend lors de la mise à niveau ; installer une nouvelle version de Go ou redémarrer un ancien binaire ne met pas à jour sa bibliothèque standard. Les compilations CI et Docker utilisent cette même version. + Les étapes suivantes prennent une version stable comme exemple. Figez le tag et le commit utilisés, puis préparez la sauvegarde, la vérification et le retour arrière avant toute mise à niveau. Docker Compose est recommandé : diff --git a/README.ja.md b/README.ja.md index a7d6d130..62e6d379 100644 --- a/README.ja.md +++ b/README.ja.md @@ -291,6 +291,8 @@ MAX API は基盤モデルではなく、現時点で AGI や自律運用を実 ## 🚢 デプロイガイド +ソースからビルドする際のセキュリティ基準は **Go 1.26.10** です。CVE-2026-111943 の証明書検証修正が含まれます。更新時は修正済みツールチェーンで再コンパイルし、バックエンドの実行ファイルを置き換えてください。Go のインストール更新や古い実行ファイルの再起動だけでは、組み込まれた標準ライブラリは更新されません。CI と Docker でも同じバージョンを使用します。 + 以下の手順は正式版を例にしています。使用するバージョンタグとコミットを固定し、アップグレード前にバックアップ、検証、ロールバックの準備を完了してください。 Docker Compose を推奨します: diff --git a/README.md b/README.md index 1f215350..1df14672 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,8 @@ MAX API 不是基础模型,也不宣称当前已经实现 AGI 或自治运维 ## 🚢 部署指南 +源码构建的安全基线为 **Go 1.26.10**,包含 CVE-2026-111943 的证书校验修补。升级时必须使用修补后的工具链重新编译并替换后端二进制;仅安装新版 Go 或重启旧产物不会更新其中的标准库。CI 和 Docker 构建统一采用此版本。 + 以下步骤以正式版为例。请固定版本标签和对应提交,并在升级前完成备份、校验和回滚准备。 推荐使用 Docker Compose: diff --git a/README.zh_CN.md b/README.zh_CN.md index 34ae42f4..4d90ab83 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -293,6 +293,8 @@ MAX API 不是基础模型,也不宣称当前已经实现 AGI 或自治运维 ## 🚢 部署指南 +源码构建的安全基线为 **Go 1.26.10**,包含 CVE-2026-111943 的证书校验修补。升级时必须使用修补后的工具链重新编译并替换后端二进制;仅安装新版 Go 或重启旧产物不会更新其中的标准库。CI 和 Docker 构建统一采用此版本。 + 以下步骤以正式版为例。请固定版本标签和对应提交,并在升级前完成备份、校验和回滚准备。 推荐使用 Docker Compose: diff --git a/README.zh_TW.md b/README.zh_TW.md index 32437e89..202ca6c7 100644 --- a/README.zh_TW.md +++ b/README.zh_TW.md @@ -293,6 +293,8 @@ MAX API 不是基礎模型,也不宣稱目前已經實現 AGI 或自治運維 ## 🚢 部署指南 +原始碼建置的安全基準為 **Go 1.26.10**,包含 CVE-2026-111943 的憑證驗證修補。升級時必須使用修補後的工具鏈重新編譯並替換後端執行檔;僅安裝新版 Go 或重新啟動舊產物不會更新其中的標準函式庫。CI 與 Docker 建置統一採用此版本。 + 以下步驟以正式版為例。請固定版本標籤和對應提交,並在升級前完成備份、驗證和回復準備。 建議使用 Docker Compose: diff --git a/electron/README.md b/electron/README.md index d2a25ee0..4f9caa69 100644 --- a/electron/README.md +++ b/electron/README.md @@ -37,6 +37,8 @@ This will: ## Building for Production +Build the backend with **Go 1.26.10** before packaging Electron. This is the security baseline for CVE-2026-111943; replace any previously built backend binary, since rebuilding only the Electron wrapper does not update Go's embedded standard library. The root `go.mod` defines the version used by CI. + ### Quick Build ```bash # Ensure Go binary exists in parent directory diff --git a/go.mod b/go.mod index 5523f932..1cb4faef 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/MAX-API-Next/MAX-API -// +heroku goVersion go1.25 -go 1.25.1 +// +heroku goVersion go1.26.10 +go 1.26.10 require ( github.com/Azure/go-ntlmssp v0.1.1