Skip to content
Merged
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
2 changes: 2 additions & 0 deletions remediation/workflow/pin/pinactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package pin
import (
"context"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -67,6 +68,7 @@ func PinAction(action, inputYaml string, exemptedActions []string, pinToImmutabl
PAT := os.Getenv("SECURE_REPO_PAT")
if PAT == "" {
PAT = os.Getenv("PAT")
log.Println("SECURE_REPO_PAT is not set, using PAT")
}

ctx := context.Background()
Expand Down
1 change: 0 additions & 1 deletion remediation/workflow/secureworkflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func TestSecureWorkflow(t *testing.T) {
}{
{fileName: "replaceactions.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false, wantAddedMaintainedActions: true},
{fileName: "allscenarios.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: true},
// {fileName: "missingaction.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false},
{fileName: "nohardenrunner.yml", wantPinnedActions: true, wantAddedHardenRunner: false, wantAddedPermissions: true},
{fileName: "noperms.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false},
{fileName: "nopin.yml", wantPinnedActions: false, wantAddedHardenRunner: true, wantAddedPermissions: true},
Expand Down