From 2605d472b7c4a57cbf3f2e962aa9bb434f2861e6 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 31 Oct 2026 21:50:20 +0100 Subject: [PATCH] security: x/net v0.62.0, the Go floor at 1.27.3, and a lane that would have said so MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TWO REACHABLE ADVISORIES, and nothing in this repository could ever have reported either: it had no vulnerability lane at all. Found on 2026-10-31 by a sweep of the 58 Go repositories across go-webengine, go-compressions, go-filesystems and go-images -- the first anyone had run over them. 58 scanned, 0 unread, 2 reaching something: this repository and go-webengine/engine, both the same x/net advisory. GO-2026-6860 golang.org/x/net v0.61.0 -> v0.62.0 session.go:106:29 engineRender -> Engine.RenderWithLinks -> html.Parse cmd/browserproxy/main.go:90:29 run -> http.Server.Shutdown -> html.ParseFragment GO-2026-6809 crypto/x509 Certificate.Verify, fixed in go1.26.10 and go1.27.3; reachable because go.mod declared `go 1.27.2` and the standard library is judged by the version the module claims. Those call paths are the actual job of this program: it parses pages it did not write. This is not an init artefact. ⛔ RENOVATE COULD NOT HAVE FOUND THE FIRST ONE. x/net was an INDIRECT requirement (`// indirect`), so it is not a floor this module declares for itself and no manager had a version string to compare or rewrite. Nothing watched it. The same advisory sat green for days in two go-pkgx repositories three days earlier and was found there by pull requests that touched nothing related. Measured, same tree, same govulncheck, GOOS=linux GOARCH=amd64: before 2 vulnerabilities, both with symbol traces (above) after No vulnerabilities found. 0 affected. THE FLOOR IS NAMED IN THREE PLACES AND ALL THREE MOVED, because raising go.mod alone would have left the lane building the vulnerable toolchain and the README advertising a floor two patches below the real one: go.mod go 1.27.2 -> 1.27.3 ci.yml GO_VERSION 1.27.2 -> 1.27.3 (one definition, 3 jobs) README badge "Go 1.27.1+" -> "Go 1.27.3+" (already stale by two) AND THE HOLE THAT HID THEM IS CLOSED: .github/workflows/vuln.yml, a govulncheck judged by go-fleettools/vulngate rather than by an exit status, on push, pull_request, a DAILY cron and workflow_dispatch. ⛔ Its own workflow and not a job in ci.yml: a schedule there would run the wasm end-to-end lane and the cross-build matrix every night to ask a question about dependencies. ⛔ It takes the toolchain from go.mod and not from ci.yml's GO_VERSION. The declared floor is what a consumer running `go install` with GOTOOLCHAIN=local honours, so it is the version the question is about -- and reading it there keeps one source of truth instead of a second copy that rots out of step. ⛔ The judge is @latest and not a pin, and the reason is measured: a pin inside a `run:` block is read by no dependency manager, so it rots in silence. go-gitsafe/gitsafe pins vulngate@v0.20.1 in its own copy of this step while go-fleettools/fleettools is at v0.51.0 -- thirty-one minor versions, and nothing said so. ⛔ A disabled cron reports nothing rather than failing: GitHub switches scheduled workflows off after 60 days without repository activity. Hence workflow_dispatch, a comment saying silence is not green, and a badge in the README so the lane is visible rather than merely present. The gate was run by hand before being committed, which is how I know it ships green: govulncheck wrote 883 KB of JSON, vulngate exited 0 judging GO-2026-5932 a notice (required, not called, no released fix published) with the advisory database 4 days old against its 21-day cap. gofmt clean, go build ./... ok, go vet ./... silent, go test ./... 2 packages ok, actionlint silent. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 7 ++- .github/workflows/vuln.yml | 93 ++++++++++++++++++++++++++++++++++++++ README.md | 3 +- go.mod | 4 +- go.sum | 4 +- 5 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/vuln.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6c4e65..2d6f81a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,12 @@ permissions: env: CGO_ENABLED: "0" - GO_VERSION: "1.27.2" + # ⛔ KEEP THIS EQUAL TO go.mod's `go` DIRECTIVE. It is the toolchain the + # artefacts are built with, and the standard library is judged by it: on + # 2026-10-31 this said 1.27.2 while GO-2026-6809 (crypto/x509 + # Certificate.Verify) was reachable from cmd/browserproxy, fixed in go1.27.3. + # Raising go.mod alone would leave the lane building the vulnerable one. + GO_VERSION: "1.27.3" jobs: test: diff --git a/.github/workflows/vuln.yml b/.github/workflows/vuln.yml new file mode 100644 index 0000000..98dba1c --- /dev/null +++ b/.github/workflows/vuln.yml @@ -0,0 +1,93 @@ +name: vuln + +# ⛔ THIS REPOSITORY HAD NO VULNERABILITY LANE AT ALL, and it is a proxy that +# parses pages it did not write. Measured 2026-10-31 by a sweep of the 58 Go +# repositories across go-webengine, go-compressions, go-filesystems and +# go-images -- the first anyone had run over them: +# +# GO-2026-6860 (golang.org/x/net, fixed in v0.62.0) was REACHABLE here, +# through two call paths that are the actual job of this program: +# session.go:106:29 engineRender -> Engine.RenderWithLinks +# -> html.Parse +# cmd/browserproxy/main.go:90:29 run -> http.Server.Shutdown +# -> html.ParseFragment +# +# and GO-2026-6809 (crypto/x509 Certificate.Verify, fixed in go1.26.10 and +# go1.27.3) was reachable from cmd/browserproxy, because go.mod declared +# `go 1.27.2` and the standard library is judged by the version the module +# claims. +# +# ⛔ RENOVATE COULD NOT HAVE FOUND THE FIRST ONE. x/net was an INDIRECT +# requirement (`// indirect` in go.mod), so it is not a floor this module +# declares for itself and no manager had a version string to compare or +# rewrite. Nothing watched it. The same advisory sat green for days in two +# go-pkgx repositories three days earlier and was found there by pull requests +# that touched nothing related. +# +# ⛔ AND A GATE THAT ONLY FIRES ON A PUSH HAS THE COVERAGE OF THE REPOSITORY'S +# ACTIVITY, which is why this is a workflow of its own with a daily schedule +# rather than a job in ci.yml: a schedule there would run the wasm end-to-end +# lane and the cross-build matrix every night to ask a question about +# dependencies. Daily rather than weekly because the vulnerability database is +# updated on business days. +# +# ⛔ THE CRON TIME IS A REQUEST, NOT AN APPOINTMENT -- GitHub runs scheduled +# workflows late -- and a DISABLED cron reports nothing rather than failing, +# because GitHub switches scheduled workflows off after 60 days without +# repository activity. Hence workflow_dispatch, and hence this comment: silence +# on this lane is not green. +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '41 6 * * *' + workflow_dispatch: + +permissions: + contents: read + +jobs: + vuln: + name: govulncheck, judged by vulngate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + # ⛔ FROM go.mod, NOT FROM ci.yml's GO_VERSION. The declared floor is what + # a consumer running `go install` with GOTOOLCHAIN=local actually honours, + # so it is the version this question is about -- and reading it here keeps + # one source of truth instead of a second copy that rots out of step. + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + + # ⛔ SAY WHICH TOOLCHAIN RAN. The standard library is judged by ONE + # version, so a lane that silently resolved another answers a different + # question -- and here the toolchain IS half the verdict: the same source + # reports GO-2026-6809 under 1.27.2 and nothing under 1.27.3. + - run: go version + + # ⛔ NO `set -o pipefail`, deliberately. govulncheck exits non-zero over + # findings it has decided this module does not call, and ZERO over some it + # has -- which is the whole reason vulngate exists. An unread scan is + # caught instead by the emptiness check below and by vulngate, which + # believes a run only when it carried a config AND an SBOM. + # + # ⛔ @latest FOR THE JUDGE, NOT A PIN, and the reason is measured: a pin + # inside a `run:` block is read by no dependency manager, so it rots in + # silence. go-gitsafe/gitsafe pins vulngate@v0.20.1 in its own copy of + # this step while go-fleettools/fleettools is at v0.51.0 -- thirty-one + # minor versions, and nothing said so. For a judge whose whole value is + # knowing today's rules, and which already refuses an advisory database + # older than 21 days, newest is the correct answer and not a convenience. + - name: govulncheck, judged by vulngate + run: | + set -eu + go install golang.org/x/vuln/cmd/govulncheck@latest + go install github.com/go-fleettools/fleettools/cmd/vulngate@latest + BIN="$(go env GOPATH)/bin" + "$BIN/govulncheck" -format json ./... > /tmp/vuln.json || true + test -s /tmp/vuln.json || { echo "::error::govulncheck wrote nothing at all"; exit 1; } + "$BIN/vulngate" -go "$(go env GOVERSION)" /tmp/vuln.json diff --git a/README.md b/README.md index a9b3c9f..f0a6f42 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,12 @@ # go-webengine / browserproxy [![CI](https://github.com/go-webengine/browserproxy/actions/workflows/ci.yml/badge.svg)](https://github.com/go-webengine/browserproxy/actions/workflows/ci.yml) +[![vuln](https://github.com/go-webengine/browserproxy/actions/workflows/vuln.yml/badge.svg)](https://github.com/go-webengine/browserproxy/actions/workflows/vuln.yml) ![coverage](https://img.shields.io/badge/coverage-100%25%20(root)-brightgreen) [![Go Reference](https://pkg.go.dev/badge/github.com/go-webengine/browserproxy.svg)](https://pkg.go.dev/github.com/go-webengine/browserproxy) [![Docs](https://img.shields.io/badge/docs-mkdocs--material-0079A8)](https://go-webengine.github.io/docs/) [![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](LICENSE) -[![Go 1.27.1+](https://img.shields.io/badge/Go-1.27.1%2B-00ADD8?logo=go)](https://go.dev/dl/) +[![Go 1.27.3+](https://img.shields.io/badge/Go-1.27.3%2B-00ADD8?logo=go)](https://go.dev/dl/) A pure-Go, **`CGO_ENABLED=0`** **remote-browser** service. It renders web pages server-side with the pure-Go [`go-webengine/engine`](https://github.com/go-webengine/engine) diff --git a/go.mod b/go.mod index 9e5d21a..ab082bc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/go-webengine/browserproxy -go 1.27.2 +go 1.27.3 require ( github.com/go-webengine/engine v0.18.1 @@ -39,7 +39,7 @@ require ( github.com/tannevaled/gobig2 v0.2.0 // indirect golang.org/x/crypto v0.58.0 // indirect golang.org/x/image v0.47.0 // indirect - golang.org/x/net v0.61.0 // indirect + golang.org/x/net v0.62.0 // indirect golang.org/x/sys v0.49.0 // indirect golang.org/x/text v0.43.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260817212433-ac3dfec99bb1 // indirect diff --git a/go.sum b/go.sum index 7089956..dc7d1cd 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,8 @@ golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= golang.org/x/image v0.47.0 h1:za/8gVz++PPZqmZJBNSISICN5Rrj5zixP/8K++fgmqo= golang.org/x/image v0.47.0/go.mod h1:IkN5o4A7vq55vXN8FWjjnhg9Rs2GOtffqsSi9mWAKYE= -golang.org/x/net v0.61.0 h1:RR+6j/BTBCrggOLugxa+66R8FvoN6MHlzDlZIbN9YFw= -golang.org/x/net v0.61.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= +golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=