File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ func containsUntrustedContextPattern(variable string) bool {
35
35
`issue\.body|` +
36
36
`pull_request\.title|` +
37
37
`pull_request\.body|` +
38
+ `labels\.[^.]+\.name|` +
38
39
`comment\.body|` +
39
40
`review\.body|` +
40
41
`review_comment\.body|` +
Original file line number Diff line number Diff line change @@ -86,6 +86,16 @@ func TestUntrustedContextVariables(t *testing.T) {
86
86
variable : "github.event.commits[2].author.email" ,
87
87
expected : true ,
88
88
},
89
+ {
90
+ name : "PR label name" ,
91
+ variable : "github.event.pull_request.labels.foo.name" ,
92
+ expected : true ,
93
+ },
94
+ {
95
+ name : "PR label wildcard name" ,
96
+ variable : "github.event.pull_request.labels.*.name" ,
97
+ expected : true ,
98
+ },
89
99
}
90
100
for _ , tt := range tests {
91
101
t .Run (tt .name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments