Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions checks/raw/dangerous_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ func containsUntrustedContextPattern(variable string) bool {
`head_commit\.message|` +
`head_commit\.author\.email|` +
`head_commit\.author\.name|` +
`head_commit\.committer\.email|` +
`head_commit\.committer\.name|` +
`commits.*\.author\.email|` +
`commits.*\.author\.name|` +
`commits.*\.committer\.email|` +
`commits.*\.committer\.name|` +
`blocked_user\.name|` +
`blocked_user\.email|` +
`pull_request\.head\.ref|` +
Expand Down
20 changes: 20 additions & 0 deletions checks/raw/dangerous_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ func TestUntrustedContextVariables(t *testing.T) {
variable: "github.event.commits[2].author.email",
expected: true,
},
{
name: "head_commit committer name",
variable: "github.event.head_commit.committer.name",
expected: true,
},
{
name: "head_commit committer email",
variable: "github.event.head_commit.committer.email",
expected: true,
},
{
name: "commits committer name",
variable: "github.event.commits[0].committer.name",
expected: true,
},
{
name: "commits committer email",
variable: "github.event.commits[0].committer.email",
expected: true,
},
{
name: "blocked_user name",
variable: "github.event.pull_request.organization.blocked_user.name",
Expand Down
Loading