Add the required status check in GitHub
1
Open branch protection rules
In your GitHub repository, go to Settings → Branches.
2
Edit the rule
Under Branch protection rules, click Edit on your default branch rule (or Add rule if none exists).
3
Enable required status checks
Enable Require status checks to pass before merging.
4
Add BattleTest check
In the search field, type
battletest/security-review and select it from the results.5
Save
Click Save changes.
- the review hasn’t completed yet, or
- the review encountered an internal error (
failure), or - the review completed with a risk score of 40 or higher — the “request changes” verdict (
action_required).
success and merge normally. This means requiring the check gates the PRs that warrant changes without blocking on trivial findings. See Risk score for what drives the score.
Adjust the blocking threshold
The check blocks at risk score 40 and above, matching the verdict shown in the PR comment. A configurable per-repo threshold (for example, block only on CRITICAL findings) is on the roadmap — contact wale@battletest.dev if you need a custom threshold today. If you want the review visible but never blocking, simply don’t add it as a required status check — the comment and check still appear on every PR.Require review on all branches
By default, BattleTest only reviews PRs targeting your default branch. To require the check on feature branches:1
Update branch filters
Go to BattleTest Settings → PR Review → Branch filters and switch to All branches. Save.
2
Add GitHub branch protection rules
Add branch protection rules in GitHub for those branches as well.
Re-trigger a review that didn’t run
If a PR was opened before the GitHub App was installed, or if the webhook delivery failed, the review won’t have run. Re-trigger it by:- Pushing any new commit to the PR branch, or
- Closing and reopening the PR