@@ -25,9 +25,7 @@ abstract class RemoteFlowSource extends SourceNode {
25
25
26
26
bindingset [ context]
27
27
private predicate isExternalUserControlledIssue ( string context ) {
28
- exists ( string reg |
29
- reg = [ "\\bgithub\\.event\\.issue\\.title\\b" , "\\bgithub\\.event\\.issue\\.body\\b" ]
30
- |
28
+ exists ( string reg | reg = [ "github\\.event\\.issue\\.title" , "github\\.event\\.issue\\.body" ] |
31
29
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
32
30
)
33
31
}
@@ -37,12 +35,12 @@ private predicate isExternalUserControlledPullRequest(string context) {
37
35
exists ( string reg |
38
36
reg =
39
37
[
40
- "\\bgithub\\ .event\\.pull_request\\.title\\b " , "\\bgithub\\ .event\\.pull_request\\.body\\b " ,
41
- "\\bgithub\\ .event\\.pull_request\\.head\\.label\\b " ,
42
- "\\bgithub\\ .event\\.pull_request\\.head\\.repo\\.default_branch\\b " ,
43
- "\\bgithub\\ .event\\.pull_request\\.head\\.repo\\.description\\b " ,
44
- "\\bgithub\\ .event\\.pull_request\\.head\\.repo\\.homepage\\b " ,
45
- "\\bgithub\\ .event\\.pull_request\\.head\\.ref\\b " , "\\bgithub\\ .head_ref\\b "
38
+ "github\\ .event\\.pull_request\\.title" , "github\\ .event\\.pull_request\\.body" ,
39
+ "github\\ .event\\.pull_request\\.head\\.label" ,
40
+ "github\\ .event\\.pull_request\\.head\\.repo\\.default_branch" ,
41
+ "github\\ .event\\.pull_request\\.head\\.repo\\.description" ,
42
+ "github\\ .event\\.pull_request\\.head\\.repo\\.homepage" ,
43
+ "github\\ .event\\.pull_request\\.head\\.ref" , "github\\ .head_ref"
46
44
]
47
45
|
48
46
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
@@ -51,23 +49,21 @@ private predicate isExternalUserControlledPullRequest(string context) {
51
49
52
50
bindingset [ context]
53
51
private predicate isExternalUserControlledReview ( string context ) {
54
- Utils:: normalizeExpr ( context )
55
- .regexpMatch ( Utils:: wrapRegexp ( "\\bgithub\\.event\\.review\\.body\\b" ) )
52
+ Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( "github\\.event\\.review\\.body" ) )
56
53
}
57
54
58
55
bindingset [ context]
59
56
private predicate isExternalUserControlledComment ( string context ) {
60
- Utils:: normalizeExpr ( context )
61
- .regexpMatch ( Utils:: wrapRegexp ( "\\bgithub\\.event\\.comment\\.body\\b" ) )
57
+ Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( "github\\.event\\.comment\\.body" ) )
62
58
}
63
59
64
60
bindingset [ context]
65
61
private predicate isExternalUserControlledGollum ( string context ) {
66
62
exists ( string reg |
67
63
reg =
68
64
[
69
- "\\bgithub\\ .event\\.pages\\[[0-9]+\\]\\.page_name\\b " ,
70
- "\\bgithub\\ .event\\.pages\\[[0-9]+\\]\\.title\\b "
65
+ "github\\ .event\\.pages\\[[0-9]+\\]\\.page_name" ,
66
+ "github\\ .event\\.pages\\[[0-9]+\\]\\.title"
71
67
]
72
68
|
73
69
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
@@ -79,16 +75,15 @@ private predicate isExternalUserControlledCommit(string context) {
79
75
exists ( string reg |
80
76
reg =
81
77
[
82
- "\\bgithub\\.event\\.commits\\[[0-9]+\\]\\.message\\b" ,
83
- "\\bgithub\\.event\\.head_commit\\.message\\b" ,
84
- "\\bgithub\\.event\\.head_commit\\.author\\.email\\b" ,
85
- "\\bgithub\\.event\\.head_commit\\.author\\.name\\b" ,
86
- "\\bgithub\\.event\\.head_commit\\.committer\\.email\\b" ,
87
- "\\bgithub\\.event\\.head_commit\\.committer\\.name\\b" ,
88
- "\\bgithub\\.event\\.commits\\[[0-9]+\\]\\.author\\.email\\b" ,
89
- "\\bgithub\\.event\\.commits\\[[0-9]+\\]\\.author\\.name\\b" ,
90
- "\\bgithub\\.event\\.commits\\[[0-9]+\\]\\.committer\\.email\\b" ,
91
- "\\bgithub\\.event\\.commits\\[[0-9]+\\]\\.committer\\.name\\b" ,
78
+ "github\\.event\\.commits\\[[0-9]+\\]\\.message" , "github\\.event\\.head_commit\\.message" ,
79
+ "github\\.event\\.head_commit\\.author\\.email" ,
80
+ "github\\.event\\.head_commit\\.author\\.name" ,
81
+ "github\\.event\\.head_commit\\.committer\\.email" ,
82
+ "github\\.event\\.head_commit\\.committer\\.name" ,
83
+ "github\\.event\\.commits\\[[0-9]+\\]\\.author\\.email" ,
84
+ "github\\.event\\.commits\\[[0-9]+\\]\\.author\\.name" ,
85
+ "github\\.event\\.commits\\[[0-9]+\\]\\.committer\\.email" ,
86
+ "github\\.event\\.commits\\[[0-9]+\\]\\.committer\\.name" ,
92
87
]
93
88
|
94
89
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
@@ -98,7 +93,7 @@ private predicate isExternalUserControlledCommit(string context) {
98
93
bindingset [ context]
99
94
private predicate isExternalUserControlledDiscussion ( string context ) {
100
95
exists ( string reg |
101
- reg = [ "\\bgithub\\ .event\\.discussion\\.title\\b " , "\\bgithub\\ .event\\.discussion\\.body\\b " ]
96
+ reg = [ "github\\ .event\\.discussion\\.title" , "github\\ .event\\.discussion\\.body" ]
102
97
|
103
98
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
104
99
)
@@ -109,15 +104,14 @@ private predicate isExternalUserControlledWorkflowRun(string context) {
109
104
exists ( string reg |
110
105
reg =
111
106
[
112
- "\\bgithub\\.event\\.workflow\\.path\\b" ,
113
- "\\bgithub\\.event\\.workflow_run\\.head_branch\\b" ,
114
- "\\bgithub\\.event\\.workflow_run\\.display_title\\b" ,
115
- "\\bgithub\\.event\\.workflow_run\\.head_repository\\.description\\b" ,
116
- "\\bgithub\\.event\\.workflow_run\\.head_commit\\.message\\b" ,
117
- "\\bgithub\\.event\\.workflow_run\\.head_commit\\.author\\.email\\b" ,
118
- "\\bgithub\\.event\\.workflow_run\\.head_commit\\.author\\.name\\b" ,
119
- "\\bgithub\\.event\\.workflow_run\\.head_commit\\.committer\\.email\\b" ,
120
- "\\bgithub\\.event\\.workflow_run\\.head_commit\\.committer\\.name\\b" ,
107
+ "github\\.event\\.workflow\\.path" , "github\\.event\\.workflow_run\\.head_branch" ,
108
+ "github\\.event\\.workflow_run\\.display_title" ,
109
+ "github\\.event\\.workflow_run\\.head_repository\\.description" ,
110
+ "github\\.event\\.workflow_run\\.head_commit\\.message" ,
111
+ "github\\.event\\.workflow_run\\.head_commit\\.author\\.email" ,
112
+ "github\\.event\\.workflow_run\\.head_commit\\.author\\.name" ,
113
+ "github\\.event\\.workflow_run\\.head_commit\\.committer\\.email" ,
114
+ "github\\.event\\.workflow_run\\.head_commit\\.committer\\.name" ,
121
115
]
122
116
|
123
117
Utils:: normalizeExpr ( context ) .regexpMatch ( Utils:: wrapRegexp ( reg ) )
0 commit comments