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

Function report_html

cli/main.py:1055–1089  ·  view source on GitHub ↗

Generate HTML security report.

(
    target: str = typer.Argument(..., help="Target to scan and report"),
    output: str = typer.Option("security_report.html", "--output", "-o", help="Output file path"),
    title: str = typer.Option("Security Assessment Report", "--title", "-t"),
    with_ai: bool = typer.Option(False, "--ai", help="Include AI analysis"),
    provider: str = typer.Option("anthropic", "--provider", "-p"),
)

Source from the content-addressed store, hash-verified

1053 applied += 1
1054 break
1055
1056 elif choice == "s":
1057 follow_up = typer.prompt(" Follow-up question")
1058 console.print(f" [dim]Asking {model or 'LLM'}...[/dim]")
1059 try:
1060 from modules.ai import SecurityCopilot
1061 cp = SecurityCopilot(provider=provider, model=model, base_url=base_url)
1062 resp = run_async(cp.ask(
1063 f"Ubuntu 24.04. Finding: {finding.title}. Question: {follow_up}"
1064 ))
1065 console.print(f"\n [cyan]{resp}[/cyan]\n")
1066 except Exception as exc:
1067 console.print(f" [red]{exc}[/red]")
1068 else:
1069 console.print(" [dim]Use y / n / e / s / q[/dim]")
1070
1071 console.print()
1072
1073 # ── Summary ───────────────────────────────────────────────────────────────
1074 console.rule()
1075 console.print("\n [bold]Remediation summary[/bold]")
1076 console.print(f" [green]Applied : {applied}[/green]")
1077 console.print(f" [yellow]Skipped : {skipped}[/yellow]")
1078 console.print(f"\n [dim]Re-run audit to verify: secsuite ai remediate {target} --dry-run[/dim]\n")
1079
1080
1081# ============== Report Commands ==============
1082
1083@report_app.command("html")
1084def report_html(
1085 target: str = typer.Argument(..., help="Target to scan and report"),
1086 output: str = typer.Option("security_report.html", "--output", "-o", help="Output file path"),
1087 title: str = typer.Option("Security Assessment Report", "--title", "-t"),
1088 with_ai: bool = typer.Option(False, "--ai", help="Include AI analysis"),
1089 provider: str = typer.Option("anthropic", "--provider", "-p"),
1090):
1091 """Generate HTML security report."""
1092 setup_logging()

Callers

nothing calls this directly

Calls 9

load_scan_resultsMethod · 0.95
analyzeMethod · 0.95
save_htmlMethod · 0.95
setup_loggingFunction · 0.90
SecurityCopilotClass · 0.90
ReportConfigClass · 0.90
ReportGeneratorClass · 0.90
_collect_scan_resultsFunction · 0.85
run_asyncFunction · 0.85

Tested by

no test coverage detected