mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
Merge pull request #1034 from matthyx/1032
only attempt to print existing attack graphs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user