Skip to content

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Sep 25, 2025

This PR bumps up the Golang version to 1.25.1. It also:

  • removes the ms_tls13kdf Golang build tag when building in FIPS mode because this tag was only needed with Golang versions 1.24.x.
  • sets ths GODEBUG=tlsmlkem=0 environment variable when running FIPS140-only unit tests. This prevents errors like so: Failed to connect: crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode.

Copy link
Contributor

mergify bot commented Sep 25, 2025

This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@prodsecmachine
Copy link

prodsecmachine commented Sep 25, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@ycombinator ycombinator added the backport-active-all Automated backport with mergify to all the active branches label Sep 25, 2025
@ycombinator ycombinator requested a review from a team as a code owner September 25, 2025 17:12
v1v
v1v previously approved these changes Sep 25, 2025
blakerouse
blakerouse previously approved these changes Sep 25, 2025
Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

github-actions bot commented Sep 25, 2025

🔍 Preview links for changed docs

@ycombinator
Copy link
Contributor Author

ycombinator commented Sep 26, 2025

The fips140=only unit tests are failing like so:

crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode

These appear to be golang/go#75148, which should be fixable when golang/go#74630 is implemented. However, in order to upgrade to Go 1.25.1 now, we'll need to find a workaround.

These errors are coming from Go downloading dependencies before executing the tests. The errors can be simulated like so:

GODEBUG=fips140=only go mod download -x
# get https://proxy.golang.org/github.com/opencontainers/image-spec/@v/v1.1.1.info
# get https://proxy.golang.org/github.com/opencontainers/image-spec/@v/v1.1.1.info: Get "https://proxy.golang.org/github.com/opencontainers/image-spec/@v/v1.1.1.info": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode
...

I ran into the same problem in elastic/elastic-agent#10156 and I had success with explicitly downloading the dependencies before executing the tests. I'm running into a different problem on that PR now; once it's sorted out, I will apply the same approach on this PR here. Moving this PR into draft until then.

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@ycombinator ycombinator enabled auto-merge (squash) September 29, 2025 21:55
@ycombinator ycombinator merged commit 15b8c8a into elastic:main Oct 1, 2025
13 checks passed
@ycombinator ycombinator deleted the bump-golang-1.25.1 branch October 1, 2025 13:45
Copy link
Contributor

github-actions bot commented Oct 1, 2025

@Mergifyio backport 8.18 8.19 9.0 9.1 9.2

Copy link
Contributor

mergify bot commented Oct 1, 2025

backport 8.18 8.19 9.0 9.1 9.2

❌ No backport have been created

GitHub error: Branch not found

mergify bot pushed a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

# Conflicts:
#	.github/workflows/golangci-lint.yml
#	docs/fips.md
#	magefile.go
mergify bot pushed a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

# Conflicts:
#	.github/workflows/golangci-lint.yml
mergify bot pushed a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

# Conflicts:
#	.github/workflows/golangci-lint.yml
#	docs/fips.md
#	magefile.go
mergify bot pushed a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

Co-authored-by: Shaunak Kashyap <[email protected]>
@ycombinator
Copy link
Contributor Author

@Mergifyio backport 9.2

Copy link
Contributor

mergify bot commented Oct 1, 2025

backport 9.2

✅ Backports have been created

  • Backport to branch 9.2 not needed, change already in branch 9.2

ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

Co-authored-by: Shaunak Kashyap <[email protected]>
ycombinator added a commit that referenced this pull request Oct 1, 2025
* Bump Go version to 1.25.1 (#5562)

* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

* Remove FIPS doc

* Fixing conflicts

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
ycombinator added a commit that referenced this pull request Oct 2, 2025
* Bump Go version to 1.25.1 (#5562)

* Bump Go version to 1.25.1

* Update CHANGELOG entry

* Bump the version of golangci-lint

* Remove references to the ms_tls13kdf build tag

* Download go module dependencies before GODEBUG=fips140=only is set

* Exclude X25519 curve types when testing in FIPS-140 mode

* Stricter check

* Add missing license header

* Exclude X25519 curve types when testing in FIPS-140-only mode

* Use stricter check

* Update NOTICE files

* Remove IsFIPS140Only helper function

* Set GODEBUG=tlsmlkem=0 for FIPS140-only unit tests

* Remove replace directive from go.mod

* Try not pre-downloading dependencies

(cherry picked from commit 15b8c8a)

* Fixing conflicts

* Bumping timeout

---------

Co-authored-by: Shaunak Kashyap <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants