Skip to content

GoAlert: bump go-jose v3 and v4 (6 Dependabot alerts) - #4635

Open
CameronJHall wants to merge 1 commit into
masterfrom
cambot/77-goalert-bump-go-jose-v3-and-v4-6-dependa-110
Open

CameronJHall wants to merge 1 commit into
masterfrom
cambot/77-goalert-bump-go-jose-v3-and-v4-6-dependa-110

Conversation

@CameronJHall

@CameronJHall CameronJHall commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Dependabot reports six alerts against github.com/go-jose/go-jose v3 and v4: a DoS when parsing RSA JWKs, panics in JSON parsing, and a panic in CBC-HMAC processing. There is no patched v3 release (every version up to 3.0.5 is affected), so v3 has to go. Its only user is oauth2-proxy/mockoidc, the dev/test OIDC server behind go tool mockoidc. Upstream mockoidc now uses go-jose v4, so bumping it removes v3 and also raises v4, which production OIDC login uses through go-oidc, to the patched 4.1.8.

What changed

  • go.mod/go.sum: bump github.com/oauth2-proxy/mockoidc to v0.0.0-20261103160011-e06ed0b7cb7f, upstream's latest commit, which imports go-jose/v4 instead of v3. go mod tidy then drops go-jose/v3 v3.0.5.
  • Minimal version selection also raises go-jose/v4 from 4.1.4 to 4.1.8 (the fixes landed in 4.1.5 and 4.1.6), stretchr/testify from 1.11.1 to 1.12.1 and go.yaml.in/yaml/v3 from 3.0.4 to 3.0.5, all required by the new mockoidc.
  • No code changes: devtools/mockoidc/main.go builds unchanged against the new version.
  • Supersedes Dependabot PR build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6 #4617 (go-jose v4 to 4.1.6).

Checks run

  • grep go-jose/v3 go.mod go.sum; go mod why -m github.com/go-jose/go-jose/v3; go mod graph | grep go-jose (no v3 matches; 'main module does not need module github.com/go-jose/go-jose/v3'; graph shows only go-jose/v4@v4.1.8): v3 is fully removed from the module graph, and v4 resolves to 4.1.8
  • curl POST https://api.osv.dev/v1/query for go-jose/v4 4.1.4 and 4.1.8, and v3 3.0.5; GET /v1/vulns for the 3 GHSAs (4.1.8: no vulns. 4.1.4 and 3.0.5: GHSA-4w3g-jfj2-cw2q, GHSA-mgcc-cww5-fp2q, GHSA-vvm8-gf78-28g4. Fixed in v4 4.1.5/4.1.6; v3 last affected 3.0.5): the resolved versions clear all three advisories behind the six alerts
  • go build ./... && go vet ./devtools/mockoidc/ ./auth/oidc/... (exit 0): mockoidc main.go and the production OIDC code compile against the new modules
  • go mod tidy && git diff --exit-code go.mod go.sum (no diff): go.mod and go.sum are tidy, as make check-go requires
  • GOTOOLCHAIN=go1.26.0 make generate (exit 0, no diff): the generated code the dep-autoapprove workflow would regenerate is unchanged
  • GOTOOLCHAIN=go1.26.0 golangci-lint run (v2.12.2, built from source into $TMPDIR) (0 issues, exit 0): the lint half of make check-go
  • ZONEINFO=$(go env GOROOT)/lib/time/zoneinfo.zip go test -short ./... (exit 0. Without ZONEINFO, 3 *_MidnightDST tests fail, and fail the same way on master): the Go half of make test, including the testify 1.12.1 bump
  • bin/tools/bun test web (make test's jest step), on this branch and on a master copy (152 pass, 3 fail on both (formatTimestamp x2, mapOverrideUserError)): the JS unit tests are unaffected; web/ and bun.lock are identical to master
  • built devtools/mockoidc, ran it with -addr=127.0.0.1:19997, and curled the discovery and JWKS endpoints (issuer http://127.0.0.1:19997/oidc; one RS256 RSA key in the JWKS): the new mockoidc still serves the endpoints GoAlert discovers
  • go run of a throwaway program in $TMPDIR using go-oidc v3.19.0 and go-jose v4.1.8 against that mock (login OK for both redirect hosts (localhost:6130 and 127.0.0.1:6120); nonce matched; preferred_username=jane.doe; reused code and wrong secret rejected): the same code exchange, id_token check, nonce check and userinfo lookup that auth/oidc does
  • GOTOOLCHAIN=go1.26.0 make reset-integration, then env -u CI bin/tools/bun run playwright test test/integration/oidc.spec.ts (4 passed (2 tests x chromium-wide/mobile)): real GoAlert login through go tool mockoidc end to end
  • bin/tools/bun run check && make web/src/build/static/app.js (both exit 0): the repo's test command and the bundle build the repo notes ask for on dependency bumps
  • bin/tools/bun run check: passed. The repo's test command, run by Cambot on the finished branch.

Drafted by Cambot for task “GoAlert: bump go-jose v3 and v4 (6 Dependabot alerts)”.

Cambot-Task: 77

mockoidc was the only module requiring github.com/go-jose/go-jose/v3,
which has no patched release for Dependabot alerts #130, #133 and #134.
Its latest commit (e06ed0b7cb7f) moved to go-jose/v4, so go mod tidy
removes v3 entirely.

Minimal version selection also raises go-jose/v4 from v4.1.4 to v4.1.8
(above v4.1.6, the fix for #131, #135 and #136), stretchr/testify from
v1.11.1 to v1.12.1, and go.yaml.in/yaml/v3 from v3.0.4 to v3.0.5, all
required by the new mockoidc.

Signed-off-by: CameronJHall <cjhall1283@gmail.com>
@CameronJHall
CameronJHall marked this pull request as ready for review November 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants