Skip to content

Commit 420fff2

Browse files
authored
update (#1031)
Signed-off-by: laurentsimon <[email protected]> Signed-off-by: laurentsimon <[email protected]>
1 parent 8d8c1ec commit 420fff2

3 files changed

Lines changed: 7 additions & 83 deletions

File tree

‎main.go‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ import (
2424
)
2525

2626
func main() {
27+
triggerEventName := os.Getenv("GITHUB_EVENT_NAME")
28+
if triggerEventName == "pull_request_target" {
29+
log.Fatalf("pull_request_target trigger is not supported for security reasons" +
30+
"see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/")
31+
}
32+
2733
action, err := entrypoint.New()
2834
if err != nil {
2935
log.Fatalf("creating scorecard entrypoint: %v", err)
@@ -35,7 +41,7 @@ func main() {
3541

3642
if os.Getenv(options.EnvInputPublishResults) == "true" &&
3743
// `pull_request` do not have the necessary `token-id: write` permissions.
38-
os.Getenv("GITHUB_EVENT_NAME") != "pull_request" {
44+
triggerEventName != "pull_request" {
3945
// Get json results by re-running scorecard.
4046
jsonPayload, err := signing.GetJSONScorecardResults()
4147
if err != nil {

‎starter-workflows/code-scanning/properties/scorecards.properties.json‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎starter-workflows/code-scanning/scorecards.yml‎

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)