Skip to content

Commit

Permalink
bug: fix nilpointer (#385)
Browse files Browse the repository at this point in the history
* fix(issue_match): removed severity resolver

* bug: fixed nilpointer exception
  • Loading branch information
drochow authored Nov 18, 2024
1 parent 2d600a2 commit bffba75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scanner/k8s-assets/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (p *Processor) getService(ctx context.Context, serviceInfo scanner.ServiceI
}

// Return the first item
if listServicesResp.Services.TotalCount > 0 {
if listServicesResp.Services != nil && listServicesResp.Services.TotalCount > 0 && len(listServicesResp.Services.Edges) > 0 {
return listServicesResp.Services.Edges[0].Node.Id, nil
}

Expand Down

0 comments on commit bffba75

Please sign in to comment.