From 076f53ea93e35e5a54830d534fcb492895e56d08 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 11:08:57 +0200 Subject: [PATCH 1/6] Go: Update to 1.27 --- MODULE.bazel | 2 +- go/actions/test/action.yml | 2 +- go/extractor/go.mod | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 8bdc850e3271..1ae226f0e89b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -273,7 +273,7 @@ use_repo( ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") -go_sdk.download(version = "1.26.4") +go_sdk.download(version = "1.27rc1") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//go/extractor:go.mod") diff --git a/go/actions/test/action.yml b/go/actions/test/action.yml index 3cc3334d39ed..05184dae1d8e 100644 --- a/go/actions/test/action.yml +++ b/go/actions/test/action.yml @@ -4,7 +4,7 @@ inputs: go-test-version: description: Which Go version to use for running the tests required: false - default: "~1.26.4" + default: "1.27.0-rc.1" run-code-checks: description: Whether to run formatting, code and qhelp generation checks required: false diff --git a/go/extractor/go.mod b/go/extractor/go.mod index 5de56683a3e0..e986a0706d14 100644 --- a/go/extractor/go.mod +++ b/go/extractor/go.mod @@ -1,8 +1,8 @@ module github.com/github/codeql-go/extractor -go 1.26 +go 1.27 -toolchain go1.26.4 +toolchain go1.27rc1 // when updating this, run // bazel run @rules_go//go -- mod tidy From 36c7fba26d6a26d3deae4b15f235179cf91181ec Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 11:38:38 +0200 Subject: [PATCH 2/6] Go: Bump `maxGoVersion` to 1.27 --- go/extractor/autobuilder/build-environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/extractor/autobuilder/build-environment.go b/go/extractor/autobuilder/build-environment.go index c660373205b2..bd7fc0adabe1 100644 --- a/go/extractor/autobuilder/build-environment.go +++ b/go/extractor/autobuilder/build-environment.go @@ -12,7 +12,7 @@ import ( ) var minGoVersion = util.NewSemVer("1.11") -var maxGoVersion = util.NewSemVer("1.26") +var maxGoVersion = util.NewSemVer("1.27") type versionInfo struct { goModVersion util.SemVer // The version of Go found in the go directive in the `go.mod` file. From f0d1d6525470b55dc4c45a3a6beff656b2908fa5 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 11:42:04 +0200 Subject: [PATCH 3/6] Go: Update test formatting --- go/extractor/toolchain/toolchain_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/extractor/toolchain/toolchain_test.go b/go/extractor/toolchain/toolchain_test.go index 8a6b38318cb9..a62c9016a700 100644 --- a/go/extractor/toolchain/toolchain_test.go +++ b/go/extractor/toolchain/toolchain_test.go @@ -8,9 +8,9 @@ import ( func TestParseGoVersion(t *testing.T) { tests := map[string]string{ - "go version go1.18.9 linux/amd64": "go1.18.9", - "go version go1.26.3-X:nodwarf5 linux/amd64": "go1.26.3", - "go version go1.26.3rc1 linux/amd64": "go1.26.3rc1", + "go version go1.18.9 linux/amd64": "go1.18.9", + "go version go1.26.3-X:nodwarf5 linux/amd64": "go1.26.3", + "go version go1.26.3rc1 linux/amd64": "go1.26.3rc1", "warning: GOPATH set to GOROOT (/usr/local/go) has no effect\ngo version go1.18.9 linux/amd64": "go1.18.9", } for input, expected := range tests { From 4af6feda68d01351836c384f5069e740f4b97ca3 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 12:37:39 +0200 Subject: [PATCH 4/6] Go: Add change note --- go/ql/lib/change-notes/2026-06-25-go-1.27.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 go/ql/lib/change-notes/2026-06-25-go-1.27.md diff --git a/go/ql/lib/change-notes/2026-06-25-go-1.27.md b/go/ql/lib/change-notes/2026-06-25-go-1.27.md new file mode 100644 index 000000000000..b1998aee7f54 --- /dev/null +++ b/go/ql/lib/change-notes/2026-06-25-go-1.27.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Go 1.27 is now supported. From 0c12d920ab1d8a16031aab5736070e8465ced063 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 12:39:14 +0200 Subject: [PATCH 5/6] Go: Update supported versions to include 1.27 --- docs/codeql/reusables/supported-versions-compilers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst index b73c9d7e6e97..814c39f90103 100644 --- a/docs/codeql/reusables/supported-versions-compilers.rst +++ b/docs/codeql/reusables/supported-versions-compilers.rst @@ -17,7 +17,7 @@ .NET 5, .NET 6, .NET 7, .NET 8, .NET 9, .NET 10","``.sln``, ``.slnx``, ``.csproj``, ``.cs``, ``.cshtml``, ``.xaml``" GitHub Actions,"Not applicable",Not applicable,"``.github/workflows/*.yml``, ``.github/workflows/*.yaml``, ``**/action.yml``, ``**/action.yaml``" - Go (aka Golang), "Go up to 1.26", "Go 1.11 or more recent", ``.go`` + Go (aka Golang), "Go up to 1.27", "Go 1.11 or more recent", ``.go`` Java,"Java 7 to 26 [6]_","javac (OpenJDK and Oracle JDK), Eclipse compiler for Java (ECJ) [7]_",``.java`` From 966f86ba5735f3a38d1c06b3ac8a8f8d3b1adbca Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 15:36:53 +0200 Subject: [PATCH 6/6] Go: Fix `findMethodOnTypeWithGivenReceiver` for Go 1.27 --- go/extractor/trap/labels.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/extractor/trap/labels.go b/go/extractor/trap/labels.go index 473e2e761f2e..ca43bc370252 100644 --- a/go/extractor/trap/labels.go +++ b/go/extractor/trap/labels.go @@ -187,7 +187,7 @@ func findMethodOnTypeWithGivenReceiver(tp types.Type, object types.Object) *type if definedType, ok := tp.(*types.Named); ok { for i := 0; i < definedType.NumMethods(); i++ { meth := definedType.Method(i) - if object == meth.Type().(*types.Signature).Recv() { + if object == meth.Type().(*types.Signature).Recv().Origin() { return meth } }