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

Function ai_executive

cli/main.py:753–779  ·  view source on GitHub ↗

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"),
)

Source from the content-addressed store, hash-verified

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")
762def 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()

Callers

nothing calls this directly

Calls 6

load_scan_resultsMethod · 0.95
get_executive_summaryMethod · 0.95
setup_loggingFunction · 0.90
SecurityCopilotClass · 0.90
_collect_scan_resultsFunction · 0.85
run_asyncFunction · 0.85

Tested by

no test coverage detected