fix(utils): recognize GitHub-hosted ARM64 Ubuntu and Windows runner labels (#449) - #451
Conversation
|
Hi, just following up on this when you get a chance. The branch is up to date and checks are green. If it looks good from your side, it should be ready to merge. Happy to make any changes if needed. Thanks! |
sorry, just noticed this. will have a look |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add coverage for ubuntu-26.04-arm and scanner integration fixtures.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates runner detection so GitHub-hosted ARM64 Ubuntu and Windows labels are not misclassified as self-hosted.
Changes:
- Extends the Rego runner regex for ARM64 labels.
- Adds Ubuntu and Windows ARM64 regression tests.
| File | Description |
|---|---|
opa/rego/poutine/utils.rego |
Recognizes ARM64 hosted runner labels. |
opa/opa_test.go |
Adds regression tests for ARM64 labels. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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>
Signed-off-by: François Proulx <76956526+fproulx-boostsecurity@users.noreply.github.com>
|
Sorry for the delay @Tyagiquamar , merged now |

Problem
pr_runs_on_self_hostedflags GitHub-hosted ARM64 runner labels (such asubuntu-24.04-arm,ubuntu-22.04-arm,windows-11-arm, andwindows-11-vs2026-arm) as self-hosted runners because the runner matching regex inopa/rego/poutine/utils.regodoes not account for-armsuffixes on versioned Linux or Windows 11 runner labels.Root Cause
job_uses_self_hosted_runnerinopa/rego/poutine/utils.regomatched runner strings againstubuntu-(([0-9]{2})\.04|...)andwindows-(20[0-9]{2}|...), omitting optional-armsuffixes for Ubuntu labels and Windows 11 ARM variants.Fix
job_uses_self_hosted_runnerregex inopa/rego/poutine/utils.regoto supportubuntu-NN.NN-armandwindows-11(-vsNNNN)?-arm.ubuntu-24.04-arm,ubuntu-22.04-arm,windows-11-arm, andwindows-11-vs2026-arminopa/opa_test.go.Verification
go test ./opapassed cleanly (100% test suite green).Fixes #449