MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / report_json

Function report_json

cli/main.py:1093–1112  ·  view source on GitHub ↗

Generate JSON security report.

(
    target: str = typer.Argument(..., help="Target to scan and report"),
    output: str = typer.Option("security_report.json", "--output", "-o"),
)

Source from the content-addressed store, hash-verified

1091 """Generate HTML security report."""
1092 setup_logging()
1093
1094 console.print(f"[bold]Generating Report:[/bold] {target}")
1095
1096 results = _collect_scan_results(
1097 target,
1098 ["dns", "whois", "headers", "tech", "ssl", "ports", "dirs"]
1099 )
1100
1101 from modules.ai import ReportGenerator, SecurityCopilot
1102 from modules.ai.reporter import ReportConfig
1103
1104 ai_analysis = None
1105 if with_ai:
1106 try:
1107 console.print("[dim]Running AI analysis...[/dim]")
1108 copilot = SecurityCopilot(provider=provider)
1109 copilot.load_scan_results(results)
1110 ai_analysis = run_async(copilot.analyze())
1111 except Exception as e:
1112 console.print(f"[yellow]AI analysis skipped: {e}[/yellow]")
1113
1114 config = ReportConfig(title=title)
1115 reporter = ReportGenerator()

Callers

nothing calls this directly

Calls 4

save_jsonMethod · 0.95
setup_loggingFunction · 0.90
ReportGeneratorClass · 0.90
_collect_scan_resultsFunction · 0.85

Tested by

no test coverage detected