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

Function scan_nuclei

cli/main.py:467–483  ·  view source on GitHub ↗

Run Nuclei vulnerability scanner.

(
    target: str = typer.Argument(..., help="Target URL"),
    severity: Optional[str] = typer.Option(None, "--severity", "-s", help="Severity filter (comma-separated)"),
    tags: Optional[str] = typer.Option(None, "--tags", "-t", help="Template tags (comma-separated)"),
    verbose: bool = typer.Option(False, "--verbose", "-v"),
)

Source from the content-addressed store, hash-verified

465 scanner = SSLAnalyzer()
466 result = run_async(scanner.run(Target.from_string(target)))
467 display_result(result)
468
469
470@scan_app.command("nuclei")
471def scan_nuclei(
472 target: str = typer.Argument(..., help="Target URL"),
473 severity: str | None = typer.Option(None, "--severity", "-s", help="Severity filter (comma-separated)"),
474 tags: str | None = typer.Option(None, "--tags", "-t", help="Template tags (comma-separated)"),
475 verbose: bool = typer.Option(False, "--verbose", "-v"),
476):
477 """Run Nuclei vulnerability scanner."""
478 setup_logging(debug=verbose)
479 from modules.webscanner import NucleiScanner
480
481 console.print(f"[bold]Nuclei Scan:[/bold] {target}")
482 sev_list = severity.split(",") if severity else None
483 tag_list = tags.split(",") if tags else None
484
485 scanner = NucleiScanner(severity=sev_list, tags=tag_list)
486 result = run_async(scanner.run(Target.from_string(target)))

Callers

nothing calls this directly

Calls 6

runMethod · 0.95
setup_loggingFunction · 0.90
NucleiScannerClass · 0.90
run_asyncFunction · 0.85
display_resultFunction · 0.85
from_stringMethod · 0.80

Tested by

no test coverage detected