analyze performance upgrade
This commit is contained in:
@@ -6,6 +6,7 @@ from ..engine import AnalysisResult
|
||||
from ..findings import Severity
|
||||
from ._common import (
|
||||
SEVERITY_LABEL, affected_line, evidence_line, artifact_line, sources_list,
|
||||
inventory_lines,
|
||||
)
|
||||
|
||||
|
||||
@@ -21,6 +22,11 @@ def render(result: AnalysisResult, extra: dict | None = None) -> str:
|
||||
out.append(f"Capture : {m.get('capture_path', '-')}")
|
||||
out.append(f"Packets : {m.get('packet_count', 0)} Duration: {m.get('duration_seconds', 0)}s")
|
||||
out.append(f"Findings: {m.get('finding_count', 0)}")
|
||||
if m.get("device_ip"):
|
||||
out.append(f"Device : {m['device_ip']} (device-related findings: {s.get('device_related', 0)}, "
|
||||
f"other hosts: {s.get('other_hosts', 0)})")
|
||||
if m.get("truncated"):
|
||||
out.append(f"WARNING : partial analysis - {m.get('truncation_reason')}")
|
||||
out.append("")
|
||||
|
||||
bysev = s.get("by_severity", {})
|
||||
@@ -62,6 +68,12 @@ def render(result: AnalysisResult, extra: dict | None = None) -> str:
|
||||
out.append(f" Finding ID : {f.finding_id}")
|
||||
out.append("")
|
||||
|
||||
inv_lines = inventory_lines(result.inventory, md=False)
|
||||
if inv_lines:
|
||||
out.append("-" * 70)
|
||||
out.extend(inv_lines)
|
||||
out.append("")
|
||||
|
||||
if extra:
|
||||
hashes = extra.get("hashes") or []
|
||||
urls = extra.get("urls") or []
|
||||
|
||||
Reference in New Issue
Block a user