Skip to content

Commit c62caaf

Browse files
Balijepalli Vamshi KrishnaBalijepalli Vamshi Krishna
authored andcommitted
log to validate pat
1 parent b912dfc commit c62caaf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

remediation/workflow/pin/pinactions.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package pin
33
import (
44
"context"
55
"fmt"
6+
"log"
67
"os"
78
"path/filepath"
89
"regexp"
@@ -67,6 +68,7 @@ func PinAction(action, inputYaml string, exemptedActions []string, pinToImmutabl
6768
PAT := os.Getenv("SECURE_REPO_PAT")
6869
if PAT == "" {
6970
PAT = os.Getenv("PAT")
71+
log.Println("SECURE_REPO_PAT is not set, using PAT")
7072
}
7173

7274
ctx := context.Background()

remediation/workflow/secureworkflow_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ func TestSecureWorkflow(t *testing.T) {
217217
}{
218218
{fileName: "oneJob.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false, wantAddedMaintainedActions: true},
219219
{fileName: "allscenarios.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: true},
220-
// {fileName: "missingaction.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false},
221220
{fileName: "nohardenrunner.yml", wantPinnedActions: true, wantAddedHardenRunner: false, wantAddedPermissions: true},
222221
{fileName: "noperms.yml", wantPinnedActions: true, wantAddedHardenRunner: true, wantAddedPermissions: false},
223222
{fileName: "nopin.yml", wantPinnedActions: false, wantAddedHardenRunner: true, wantAddedPermissions: true},

0 commit comments

Comments
 (0)