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"),
)
| 1144 | console.print(f"[green]Report saved to: {path}[/green]") |
| 1145 | |
| 1146 | |
| 1147 | @report_app.command("remediation") |
| 1148 | def 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]") |
nothing calls this directly
no test coverage detected