From 3328b6cdfa0ca5bb3b7cf9a991a7d4ee3395ad50 Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Mon, 14 Sep 2026 15:10:24 +0530 Subject: [PATCH 1/3] fix(utils): recognize GitHub-hosted ARM64 Ubuntu and Windows runner labels (#449) --- opa/opa_test.go | 4 ++++ opa/rego/poutine/utils.rego | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opa/opa_test.go b/opa/opa_test.go index 391114c..ff62db5 100644 --- a/opa/opa_test.go +++ b/opa/opa_test.go @@ -114,6 +114,8 @@ func TestJobUsesSelfHostedRunner(t *testing.T) { cases := map[string]bool{ "ubuntu-latest": false, "ubuntu-22.04": false, + "ubuntu-22.04-arm": false, + "ubuntu-24.04-arm": false, "ubuntu-20.04": false, "ubuntu-slim": false, "macos-latest-large": false, @@ -131,6 +133,8 @@ func TestJobUsesSelfHostedRunner(t *testing.T) { "windows-latest": false, "windows-2022": false, "windows-2019": false, + "windows-11-arm": false, + "windows-11-vs2026-arm": false, "self-hosted": true, "random-name": true, } diff --git a/opa/rego/poutine/utils.rego b/opa/rego/poutine/utils.rego index 9b0ba65..b38b25b 100644 --- a/opa/rego/poutine/utils.rego +++ b/opa/rego/poutine/utils.rego @@ -45,7 +45,7 @@ job_uses_self_hosted_runner(job) if { run_on := job.runs_on[_] not contains(run_on, "$") # skip expressions not regex.match( - "(?i)^((ubuntu-(([0-9]{2})\\.04|latest(-(4|8|16)-cores)?|slim)|macos-([0-9]{2}|latest)(-x?large)?|windows-(20[0-9]{2}|latest(-8-cores)?)|(buildjet|warp)-[a-z0-9-]+))$", + "(?i)^((ubuntu-(([0-9]{2})\\.04(-arm)?|latest(-(4|8|16)-cores)?|slim)|macos-([0-9]{2}|latest)(-x?large)?|windows-(20[0-9]{2}|latest(-8-cores)?|11(-vs[0-9]{4})?-arm)|(buildjet|warp)-[a-z0-9-]+))$", run_on, ) } else := false From d49642d8e24644ca797e1e490692270dc044488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Proulx?= <76956526+fproulx-boostsecurity@users.noreply.github.com> Date: Fri, 2 Oct 2026 13:57:36 -0400 Subject: [PATCH 2/3] Add support for ubuntu-26.04-arm in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: François Proulx <76956526+fproulx-boostsecurity@users.noreply.github.com> --- opa/opa_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/opa/opa_test.go b/opa/opa_test.go index ff62db5..0eaa36d 100644 --- a/opa/opa_test.go +++ b/opa/opa_test.go @@ -116,6 +116,7 @@ func TestJobUsesSelfHostedRunner(t *testing.T) { "ubuntu-22.04": false, "ubuntu-22.04-arm": false, "ubuntu-24.04-arm": false, + "ubuntu-26.04-arm": false "ubuntu-20.04": false, "ubuntu-slim": false, "macos-latest-large": false, From c709de160509b44dc2cbc80f1ed89c76943c1c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Proulx?= <76956526+fproulx-boostsecurity@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:25:06 -0400 Subject: [PATCH 3/3] Fix formatting in opa_test.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Proulx <76956526+fproulx-boostsecurity@users.noreply.github.com> --- opa/opa_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opa/opa_test.go b/opa/opa_test.go index 0eaa36d..5e8889c 100644 --- a/opa/opa_test.go +++ b/opa/opa_test.go @@ -116,7 +116,7 @@ func TestJobUsesSelfHostedRunner(t *testing.T) { "ubuntu-22.04": false, "ubuntu-22.04-arm": false, "ubuntu-24.04-arm": false, - "ubuntu-26.04-arm": false + "ubuntu-26.04-arm": false, "ubuntu-20.04": false, "ubuntu-slim": false, "macos-latest-large": false,