Skip to content

Commit 9078b51

Browse files
authored
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.
1 parent ad18659 commit 9078b51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

actions/ql/lib/codeql/actions/security/SelfHostedQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ predicate isGithubHostedRunner(string runner) {
55
// list of github hosted repos: https://github.com/actions/runner-images/blob/main/README.md#available-images
66
runner
77
.toLowerCase()
8-
.regexpMatch("^(ubuntu-([0-9.]+|latest)|macos-([0-9]+|latest)(-x?large)?|windows-([0-9.]+|latest))$")
8+
.regexpMatch("^(ubuntu-([0-9.]+|latest)(-arm)?|macos-([0-9]+|latest)(-x?large|-intel)?|windows-([0-9.]+|latest)(-arm|-vs[0-9.]+)?)$")
99
}
1010

1111
bindingset[runner]

0 commit comments

Comments
 (0)