Generate JSON security report.
(
target: str = typer.Argument(..., help="Target to scan and report"),
output: str = typer.Option("security_report.json", "--output", "-o"),
)
| 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() |
nothing calls this directly
no test coverage detected