Skip to content

Commit dd92a45

Browse files
Balijepalli Vamshi KrishnaBalijepalli Vamshi Krishna
authored andcommitted
use secure repo token
1 parent 7e13d65 commit dd92a45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

remediation/workflow/pin/pinactions.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ func PinAction(action, inputYaml string, exemptedActions []string, pinToImmutabl
6363
owner := splitOnSlash[0]
6464
repo := splitOnSlash[1]
6565

66-
PAT := os.Getenv("PAT")
66+
// use secure repo token
67+
PAT := os.Getenv("SECURE_REPO_PAT")
68+
if PAT == "" {
69+
PAT = os.Getenv("PAT")
70+
}
6771

6872
ctx := context.Background()
6973
ts := oauth2.StaticTokenSource(

0 commit comments

Comments
 (0)