Skip to content

Upgrade to golang 1.26#2700

Merged
RebeccaMahany merged 2 commits intokolide:mainfrom
RebeccaMahany:becca/golang-1.26
Apr 17, 2026
Merged

Upgrade to golang 1.26#2700
RebeccaMahany merged 2 commits intokolide:mainfrom
RebeccaMahany:becca/golang-1.26

Conversation

@RebeccaMahany
Copy link
Copy Markdown
Contributor

@RebeccaMahany RebeccaMahany commented Apr 17, 2026

The four ignored staticcheck errors are all the same:

SA1019: rootKey.X|k.X|rootKey.Y|k.Y has been deprecated since Go 1.26 and an alternative has been available since Go 1.25: modifying the raw coordinates can produce invalid keys, and may invalidate internal optimizations; moreover, [big.Int] methods are not suitable for operating on cryptographic values. To encode and decode PublicKey values, use [PublicKey.Bytes] and [ParseUncompressedPublicKey] or [crypto/x509.MarshalPKIXPublicKey] and [crypto/x509.ParsePKIXPublicKey]. For ECDH, use [crypto/ecdh]. For lower-level elliptic curve operations, use a third-party module like filippo.io/nistec.

Since we aren't actually modifying the raw coordinates in the production code (just creating a copy that we can re-point), I don't think we have to worry particularly much here. I think we could swap to something like this in the future, but I wanted to minimize the testing surface for a major version upgrade.

rootKeyBytes, err := rootKey.Bytes()
if err != nil {
	return fmt.Errorf("getting root key bytes: %w", err)
}
parentEcdsa, err := ecdsa.ParseUncompressedPublicKey(rootKey.Curve, rootKeyBytes)
if err != nil {
	return fmt.Errorf("creating copy of root key: %w", err)
}

@RebeccaMahany RebeccaMahany added the dependencies Pull requests that update a dependency file label Apr 17, 2026
@RebeccaMahany RebeccaMahany marked this pull request as ready for review April 17, 2026 18:23
@RebeccaMahany RebeccaMahany added this pull request to the merge queue Apr 17, 2026
Merged via the queue into kolide:main with commit 13150ea Apr 17, 2026
47 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/golang-1.26 branch April 17, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants