diff --git a/core/pkg/resultshandling/printer/v2/attacktracks.go b/core/pkg/resultshandling/printer/v2/attacktracks.go index fee6b94e..902fcd7d 100644 --- a/core/pkg/resultshandling/printer/v2/attacktracks.go +++ b/core/pkg/resultshandling/printer/v2/attacktracks.go @@ -120,7 +120,9 @@ func (prettyPrinter *PrettyPrinter) printAttackTracks(opaSessionObj *cautils.OPA fmt.Fprintf(prettyPrinter.writer, "Severity: %s\n", apis.SeverityNumberToString(resource.Severity)) fmt.Fprintf(prettyPrinter.writer, "Total vectors: %v\n\n", len(resources[i].PriorityVector)) - prettyPrinter.printResourceAttackGraph(resourceToAttackTrack[resource.ResourceID]) + if v, found := resourceToAttackTrack[resource.ResourceID]; found { + prettyPrinter.printResourceAttackGraph(v) + } sort.Slice(resource.PriorityVector, func(x, y int) bool { return resource.PriorityVector[x].Score > resource.PriorityVector[y].Score