Skip to content

chore(deps): update module gopkg.in/go-jose/go-jose.v2 to v4 - #499

Open
red-hat-konflux-kflux-prd-rh02[bot] wants to merge 1 commit into
mainfrom
konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x
Open

chore(deps): update module gopkg.in/go-jose/go-jose.v2 to v4#499
red-hat-konflux-kflux-prd-rh02[bot] wants to merge 1 commit into
mainfrom
konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x

Conversation

@red-hat-konflux-kflux-prd-rh02

@red-hat-konflux-kflux-prd-rh02 red-hat-konflux-kflux-prd-rh02 Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
gopkg.in/go-jose/go-jose.v2 v2.6.3v4.1.4 age confidence

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Release Notes

go-jose/go-jose (gopkg.in/go-jose/go-jose.v2)

v4.1.4

Compare Source

What's Changed

Fixes Panic in JWE decryption. See GHSA-78h2-9frx-2jm8

Full Changelog: go-jose/go-jose@v4.1.3...v4.1.4

v4.1.3

Compare Source

This release drops Go 1.23 support as that Go release is no longer supported. With that, we can drop x/crypto and no longer have any external dependencies in go-jose outside of the standard library!

This release fixes a bug where a critical b64 header was ignored if in an unprotected header. It is now rejected instead of ignored.

What's Changed

Full Changelog: go-jose/go-jose@v4.1.2...v4.1.3

v4.1.2

Compare Source

What's Changed

go-jose v4.1.2 improves some documentation, errors, and removes the only 3rd-party dependency.

New Contributors

Full Changelog: go-jose/go-jose@v4.1.1...v4.1.2

v4.1.1

Compare Source

What's Changed

New Contributors

Full Changelog: go-jose/go-jose@v4.1.0...v4.1.1

v4.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: go-jose/go-jose@v4.0.5...v4.1.0

v4.0.5

Compare Source

What's Changed

Fixes GHSA-c6gw-w398-hv78

Various other dependency updates, small fixes, and documentation updates in the full changelog

New Contributors

Full Changelog: go-jose/go-jose@v4.0.4...v4.0.5

v4.0.4: Version 4.0.4

Compare Source

Fixed

  • Reverted "Allow unmarshalling JSONWebKeySets with unsupported key types" as a breaking change. See #​136 / #​137.

v4.0.3: Version 4.0.3

Compare Source

Changed

  • Allow unmarshalling JSONWebKeySets with unsupported key types (#​130)
  • Document that OpaqueKeyEncrypter can't be implemented (for now) (#​129)
  • Dependency updates

v4.0.2: Version 4.0.2

Compare Source

What's Changed

New Contributors

Full Changelog: go-jose/go-jose@v4.0.1...v4.0.2

v4.0.1: Version 4.0.1

Compare Source

Fixed

  • An attacker could send a JWE containing compressed data that used large
    amounts of memory and CPU when decompressed by Decrypt or DecryptMulti.
    Those functions now return an error if the decompressed data would exceed
    250kB or 10x the compressed size (whichever is larger). Thanks to
    Enze Wang@​Alioth and Jianjun Chen@​Zhongguancun Lab (@​zer0yu and @​chenjj)
    for reporting.

v4.0.0: Version 4.0.0

Compare Source

This release makes some breaking changes in order to more thoroughly address the vulnerabilities discussed in Three New Attacks Against JSON Web Tokens, "Sign/encrypt confusion", "Billion hash attack", and "Polyglot token".

Changed

  • Limit JWT encryption types (exclude password or public key types) (#​78)
  • Enforce minimum length for HMAC keys (#​85)
  • jwt: match any audience in a list, rather than requiring all audiences (#​81)
  • jwt: accept only Compact Serialization (#​75)
  • jws: Add expected algorithms for signatures (#​74)
  • Require specifying expected algorithms for ParseEncrypted,
    ParseSigned, ParseDetached, jwt.ParseEncrypted, jwt.ParseSigned,
    jwt.ParseSignedAndEncrypted (#​69, #​74)
    • Usually there is a small, known set of appropriate algorithms for a program to use and it's a mistake to allow unexpected algorithms. For instance the "billion hash attack" relies in part on programs accepting the PBES2 encryption algorithm and doing the necessary work even if they weren't specifically configured to allow PBES2.
  • Revert "Strip padding off base64 strings" (#​82)
  • The specs require base64url encoding without padding.
  • Minimum supported Go version is now 1.21

Added

  • ParseSignedCompact, ParseSignedJSON, ParseEncryptedCompact, ParseEncryptedJSON.
    • These allow parsing a specific serialization, as opposed to ParseSigned and ParseEncrypted, which try to automatically detect which serialization was provided. It's common to require a specific serialization for a specific protocol - for instance JWT requires Compact serialization.

v3.0.5

Compare Source

What's Changed

Fixes GHSA-78h2-9frx-2jm8

We recommend migrating from v3 to v4, and we will stop support v3 in the near future.

Full Changelog: go-jose/go-jose@v3.0.4...v3.0.5

v3.0.4

Compare Source

What's Changed

Backport fix for GHSA-c6gw-w398-hv78 CVE-2025-27144
#​174

Full Changelog: go-jose/go-jose@v3.0.3...v3.0.4

v3.0.3: Version 3.0.3

Compare Source

Fixed

  • Limit decompression output size to prevent a DoS. Backport from v4.0.1.

v3.0.2: Version 3.0.2

Compare Source

Fixed

  • DecryptMulti: handle decompression error (#​19)

Changed

  • jwe/CompactSerialize: improve performance (#​67)
  • Increase the default number of PBKDF2 iterations to 600k (#​48)
  • Return the proper algorithm for ECDSA keys (#​45)
  • Update golang.org/x/crypto to v0.19 (#​94)

Added

  • Add Thumbprint support for opaque signers (#​38)

v3.0.1: Version 3.0.1

Compare Source

Fixed

Security issue: an attacker specifying a large "p2c" value can cause JSONWebEncryption.Decrypt and JSONWebEncryption.DecryptMulti to consume large amounts of CPU, causing a DoS. Thanks to Matt Schwager (@​mschwager) for the disclosure and to Tom Tervoort for originally publishing the category of attack. https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf

The release is tagged off the release-v3.0.1 branch to avoid mixing in some as-yet unreleased changes on the v3 branch.

v3.0.0: Version 3.0.0

Compare Source

First release after moving from square/go-jose to the new go-jose/go-jose repository.

Fixes & Improvements
a10ff54 - Fix for EC thumbprint template so we compute EC thumbprints correctly
30f4a6a - Treat zero Expected.Time as now in Claims.Validate when verifying JWTs
4ac8eda - Fix handling of the x5u header (X.509 certificate URL) in JWKs
d7b900b - Strip padding off base64 strings, to match spec per RFC7515 Appendix C
7f81482 - Extract key from JWKs to ensure you can use it when verifying a detached signature
e225b2d - Support non-pointer JWKs to match behavior for other key types
94cbec2 - Use ed25519 from the stdlib instead of the golang.org/x/crypto version
eae0da4 - Export jose-util helpers as they might be useful for others
4bac79d - Fix issue square#182 that caused panic on claims with invalid JWT payload
60a6e9d - Use string.Builder to remove whitespace, instead of a regexp to improve performance
2009556 - Better error handling to avoid panic that can be caused by invalid headers

This release also cleans up a number of module references for the new repo migration, fixed some typos in comments, and more.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

To execute skipped test pipelines write comment /ok-to-test.


Documentation

Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.

@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch from 4b9315c to 498b09d Compare August 7, 2026 16:29
@red-hat-konflux-kflux-prd-rh02

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -t ./...
go: gopkg.in/go-jose/go-jose.v4@v4.1.4: parsing go.mod:
	module declares its path as: github.com/go-jose/go-jose/v4
	        but was required as: gopkg.in/go-jose/go-jose.v4

@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch 2 times, most recently from 313ce29 to fced98d Compare August 8, 2026 08:36
@ambient-code

ambient-code Bot commented Aug 8, 2026

Copy link
Copy Markdown

Automated review summary

PR type: Go dependency major version bump (gopkg.in/go-jose/go-jose.v2 v2.6.3 → v4).

Checklist

  1. go.mod changes: Yes — only one go.mod exists in this repository. However, the PR is incomplete (see below).
  2. CI status: All checks failing.
  3. k8s version bump: Not applicable.

Root cause of CI failure

The PR only modified go.mod but did not run go mod vendor to update the vendor/ directory. This causes an inconsistent vendoring error on every CI step:

go: inconsistent vendoring:
    gopkg.in/go-jose/go-jose.v4@v4.1.4: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    gopkg.in/go-jose/go-jose.v2@v2.6.3: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

Additional problem: v2 is still a required transitive dependency

Even if the vendor directory were updated, this upgrade cannot simply replace v2 with v4. The gopkg.in/go-jose/go-jose.v2 package is still actively imported by:

  • k8s.io/apiserver/plugin/pkg/authenticator/token/oidc — uses gopkg.in/go-jose/go-jose.v2 directly for OIDC token verification
  • github.com/coreos/go-oidc (v1) — also imports gopkg.in/go-jose/go-jose.v2

These packages use different import paths (gopkg.in/go-jose/go-jose.v2 vs gopkg.in/go-jose/go-jose.v4), so they are separate modules that cannot be conflated in go.mod. Removing v2 from go.mod would break the build even after running go mod vendor.

Note: the repository already vendors github.com/go-jose/go-jose/v4 v4.1.4 (used by sigstore). This is the correct module for v4 — it uses a github.com path rather than the gopkg.in path this PR attempts.

Recommendation

This PR cannot be merged as-is and should be closed. To properly address this:

  1. The gopkg.in/go-jose/go-jose.v2 dependency will only disappear when k8s.io/apiserver and github.com/coreos/go-oidc (v1) are themselves upgraded to consume github.com/go-jose/go-jose/v4.
  2. If the motivation is a security fix in go-jose, note that gopkg.in/go-jose/go-jose.v2 v2.6.3 itself has no outstanding CVEs — the security fixes were backported to the v2 line (see GHSA-c6gw-w398-hv78, patched in v2 branch).

@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch 19 times, most recently from 721d700 to 2a585b8 Compare August 16, 2026 08:25
@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch 5 times, most recently from 2259fbe to 85a0807 Compare August 17, 2026 20:21
@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch 12 times, most recently from a882303 to 11c8852 Compare August 24, 2026 12:38
Signed-off-by: red-hat-konflux-kflux-prd-rh02 <190377777+red-hat-konflux-kflux-prd-rh02[bot]@users.noreply.github.com>
@red-hat-konflux-kflux-prd-rh02
red-hat-konflux-kflux-prd-rh02 Bot force-pushed the konflux/mintmaker/main/gopkg.in-go-jose-go-jose.v2-4.x branch from 11c8852 to c999908 Compare August 26, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants