analyze_code_scanning
Get open CodeQL code scanning alerts for a GitHub repository, with severity, file locations, and vulnerability explanations. Optionally trigger a scan and wait for updated results.
Instructions
Get open Code Scanning alerts (CodeQL) for a GitHub repository. Returns per alert: alert_number, rule_id, severity, rule_description, message_text (explains WHY the code is vulnerable), file path with start/end line, created_at, html_url. Use message_text to understand the specific vulnerability. Set trigger_scan=true to auto-discover and trigger the CodeQL workflow, poll for completion, then return fresh alerts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | GitHub repository name | |
| owner | Yes | GitHub repository owner | |
| trigger_scan | No | If true, triggers CodeQL workflow then polls for results before returning alerts | |
| poll_timeout_seconds | No | Max seconds to wait for CodeQL scan completion (default 300) | |
| poll_interval_seconds | No | Seconds between poll attempts (default 15) |