Skip to content

Commit 2c96127

Browse files
author
Alvaro Muñoz
committed
Improve event context sources + test
1 parent 284c52f commit 2c96127

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ql/lib/codeql/actions/dataflow/FlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class GitHubEventCtxSource extends RemoteFlowSource {
200200
or
201201
regexp = pathEvent() and flag = "filename"
202202
) and
203-
normalizeExpr(context).regexpMatch("(?i).*" + wrapRegexp(regexp) + ".*")
203+
normalizeExpr(context).regexpMatch("(?i)\\s*" + wrapRegexp(regexp) + ".*")
204204
)
205205
}
206206

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test
2+
on:
3+
issue_comment:
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- run: |
13+
{
14+
echo "recreate_vm=${{ contains(github.event.comment.body, 'recreate-vm') }}"
15+
} >> $GITHUB_OUTPUT
16+

0 commit comments

Comments
 (0)