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

Function api_scan

cli/main.py:1146–1168  ·  view source on GitHub ↗

Scan API endpoints for vulnerabilities.

(
    spec_url: str = typer.Argument(..., help="URL to OpenAPI/Swagger spec"),
    auth_token: Optional[str] = typer.Option(None, "--token", "-t", help="Auth token"),
)

Source from the content-addressed store, hash-verified

1144 console.print(f"[green]Report saved to: {path}[/green]")
1145
1146
1147@report_app.command("remediation")
1148def report_remediation(
1149 finding: str = typer.Argument(..., help="Finding title to get remediation for"),
1150):
1151 """Get remediation guidance for a specific finding."""
1152 from core.models import Finding, Severity
1153 from modules.ai import RemediationEngine
1154
1155 engine = RemediationEngine()
1156
1157 # Create a dummy finding to match
1158 dummy = Finding(
1159 title=finding,
1160 description=finding,
1161 severity=Severity.MEDIUM,
1162 source="user",
1163 )
1164
1165 guide = engine.get_remediation(dummy)
1166
1167 if guide:
1168 formatted = engine.format_remediation(guide)
1169 console.print(Panel(formatted, title=f"[bold]Remediation: {guide.title}[/bold]"))
1170 else:
1171 console.print(f"[yellow]No specific remediation guide found for: {finding}[/yellow]")

Callers

nothing calls this directly

Calls 3

setup_loggingFunction · 0.90
run_asyncFunction · 0.85
runFunction · 0.85

Tested by

no test coverage detected