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 {
3535 `issue\.body|` +
3636 `pull_request\.title|` +
3737 `pull_request\.body|` +
38+ `pull_request\.labels\.[^.]+\.name|` +
3839 `comment\.body|` +
3940 `review\.body|` +
4041 `review_comment\.body|` +
Original file line number Diff line number Diff line change @@ -76,6 +76,16 @@ func TestUntrustedContextVariables(t *testing.T) {
7676 variable : "github.event.commits[0].id" ,
7777 expected : false ,
7878 },
79+ {
80+ name : "PR label name" ,
81+ variable : "github.event.pull_request.labels.foo.name" ,
82+ expected : true ,
83+ },
84+ {
85+ name : "PR label wildcard name" ,
86+ variable : "github.event.pull_request.labels.*.name" ,
87+ expected : true ,
88+ },
7989 }
8090 for _ , tt := range tests {
8191 t .Run (tt .name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments