Skip to content

Commit

Permalink
Add check for empty CertifyBad nodes in query bad (#2365)
Browse files Browse the repository at this point in the history
Signed-off-by: robert-cronin <[email protected]>
  • Loading branch information
robert-cronin authored Dec 12, 2024
1 parent 2cd0ed9 commit 7bbf610
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/guacone/cmd/bad.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ var queryBadCmd = &cobra.Command{
logger.Fatalf("error querying for package: %v", err)
}

if len(certifyBadResponse.CertifyBad) == 0 {
fmt.Println("No CertifyBad nodes found!")
return
}

mapCertifyBad := map[string][]model.CertifyBadCertifyBad{}
for _, certifyBad := range certifyBadResponse.CertifyBad {
switch subject := certifyBad.Subject.(type) {
Expand Down

0 comments on commit 7bbf610

Please sign in to comment.