Update regex for GitHub hosted runner matching

Fixes false positives (of critical severity). New label naming conventions were introduced since the query was initially written.
This commit is contained in:
Jaroslav Lobačevski
2026-06-12 09:37:18 +03:00
committed by GitHub
parent ad18659373
commit 9078b511c6

View File

@@ -5,7 +5,7 @@ predicate isGithubHostedRunner(string runner) {
// list of github hosted repos: https://github.com/actions/runner-images/blob/main/README.md#available-images
runner
.toLowerCase()
.regexpMatch("^(ubuntu-([0-9.]+|latest)|macos-([0-9]+|latest)(-x?large)?|windows-([0-9.]+|latest))$")
.regexpMatch("^(ubuntu-([0-9.]+|latest)(-arm)?|macos-([0-9]+|latest)(-x?large|-intel)?|windows-([0-9.]+|latest)(-arm|-vs[0-9.]+)?)$")
}
bindingset[runner]