Skip to content

Commit 63616e4

Browse files
spencerschrockbalteravishay
authored andcommitted
🐛 Add nil check before accessing a step's uses value. (ossf#2935)
Signed-off-by: Spencer Schrock <[email protected]> Signed-off-by: Avishay <[email protected]>
1 parent 7643683 commit 63616e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

checks/sast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ var searchGitHubActionWorkflowCodeQL fileparser.DoWhileTrueOnFileContent = func(
262262
for _, job := range workflow.Jobs {
263263
for _, step := range job.Steps {
264264
e, ok := step.Exec.(*actionlint.ExecAction)
265-
if !ok {
265+
if !ok || e == nil || e.Uses == nil {
266266
continue
267267
}
268268
// Parse out repo / SHA.

0 commit comments

Comments
 (0)