Skip to content

Commit ddedf1e

Browse files
authored
🌱 add test cases for author name and email (#4721)
Signed-off-by: Adam Korczynski <[email protected]>
1 parent c29a04d commit ddedf1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

checks/raw/dangerous_workflow_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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: "commits author name",
81+
variable: "github.event.commits[2].author.name",
82+
expected: true,
83+
},
84+
{
85+
name: "commits author email",
86+
variable: "github.event.commits[2].author.email",
87+
expected: true,
88+
},
7989
}
8090
for _, tt := range tests {
8191
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)