Generate executive summary for leadership.
(
target: str = typer.Argument(..., help="Target to analyze"),
provider: str = typer.Option("anthropic", "--provider", "-p", help="LLM provider"),
model: Optional[str] = typer.Option(None, "--model", "-m", help="Model name"),
base_url: Optional[str] = typer.Option(None, "--base-url", "-b", help="Base URL"),
)
| 751 | console.print(Panel(response, title="[bold magenta]AI Response[/bold magenta]", border_style="magenta")) |
| 752 | |
| 753 | except ValueError as e: |
| 754 | console.print(f"[red]Configuration error: {e}[/red]") |
| 755 | except Exception as e: |
| 756 | console.print(f"[red]Error: {e}[/red]") |
| 757 | if "ollama" in provider.lower(): |
| 758 | console.print("[dim]Make sure Ollama is running: ollama serve[/dim]") |
| 759 | |
| 760 | |
| 761 | @ai_app.command("executive") |
| 762 | def ai_executive( |
| 763 | target: str = typer.Argument(..., help="Target to analyze"), |
| 764 | provider: str = typer.Option("anthropic", "--provider", "-p", help="LLM provider"), |
| 765 | model: str | None = typer.Option(None, "--model", "-m", help="Model name"), |
| 766 | base_url: str | None = typer.Option(None, "--base-url", "-b", help="Base URL"), |
| 767 | ): |
| 768 | """Generate executive summary for leadership.""" |
| 769 | setup_logging() |
| 770 | |
| 771 | console.print(f"[bold]Executive Summary:[/bold] {target}") |
| 772 | |
| 773 | results = _collect_scan_results(target, ["dns", "headers", "tech", "ssl", "ports"]) |
| 774 | |
| 775 | try: |
| 776 | from modules.ai import SecurityCopilot |
| 777 | |
| 778 | copilot = SecurityCopilot(provider=provider, model=model, base_url=base_url) |
| 779 | copilot.load_scan_results(results) |
| 780 | |
| 781 | summary = run_async(copilot.get_executive_summary()) |
| 782 | console.print() |
nothing calls this directly
no test coverage detected