Auto-review on pull requests
Once the GitHub App is installed and the repository is allowlisted, the Security Reviewer reviews pull requests automatically.
When a review is queued
The webhook receives pull request events and decides whether to review.
- Reviewed actions: opened, reopened, ready for review, and synchronize.
- Draft pull requests are skipped.
- Allowlist: only repositories mapped to an organization in the config are reviewed.
- First open is always reviewed for an allowlisted repository, so a security change is never missed for lack of a keyword.
- On later pushes (synchronize) a review is queued when the title, body, or labels contain a security signal such as auth, token, webhook, or secret.
Each queued review is deduplicated by the head commit, so the same commit is not reviewed twice.
What it posts back
When the reviewer runs in execute mode, which means dry_run is set to false
in the config, it posts to the pull request:
- A comment with the verdict and the confirmed findings.
- A label:
security: reviewedorsecurity: flagged.
In dry-run mode, the default, nothing is posted. The report is still stored in the history and on disk, so you can see exactly what it would have said.
Signature verification
Every webhook call is verified with the GITHUB_APP_WEBHOOK_SECRET using an
HMAC-SHA256 signature. If no secret is configured, verification fails closed and
the call is rejected. This prevents anyone from triggering reviews by calling the
endpoint directly.
Reading private repositories
For private repositories, the webhook mints a short-lived installation token from the App credentials and uses it only to read the pull request. The token is never stored or logged.