Test SIEM connection.
(
provider: str = typer.Argument(..., help="SIEM provider (splunk/elasticsearch/syslog/webhook)"),
url: str = typer.Option(..., "--url", "-u", help="SIEM endpoint URL"),
token: Optional[str] = typer.Option(None, "--token", "-t", help="Auth token"),
)
| 1221 | result = await fuzzer.fuzz_api(api) |
| 1222 | |
| 1223 | display_result(result) |
| 1224 | console.print(f"[dim]Sent {result.data.get('requests_sent', 0)} requests[/dim]") |
| 1225 | |
| 1226 | run_async(run()) |
| 1227 | |
| 1228 | |
| 1229 | @apisec_app.command("auth-test") |
| 1230 | def api_auth_test( |
| 1231 | spec_url: str = typer.Argument(..., help="URL to OpenAPI/Swagger spec"), |
| 1232 | ): |
| 1233 | """Test API authentication security.""" |
| 1234 | setup_logging() |
| 1235 | |
| 1236 | console.print(f"[bold]API Auth Testing:[/bold] {spec_url}") |
| 1237 | |
| 1238 | async def run(): |
| 1239 | from modules.apisec import APIAuthTester, OpenAPIParser |
| 1240 | |
| 1241 | parser = OpenAPIParser() |
| 1242 | api = await parser.parse_url(spec_url) |
| 1243 | |
| 1244 | tester = APIAuthTester() |
| 1245 | result = await tester.test_api_auth(api) |
| 1246 | |
| 1247 | display_result(result) |
| 1248 | |
| 1249 | run_async(run()) |
| 1250 | |
| 1251 | |
| 1252 | # ============== SIEM Commands ============== |
| 1253 | |
| 1254 | @siem_app.command("test") |
nothing calls this directly
no test coverage detected