PR Security Check
PR Security Check reviews your Terraform, CloudFormation, and IAM policy changes before merge. When a pull request touches security-sensitive files, Flare analyzes the diff with AI and posts findings as a PR comment with severity scores, plain-English explanations, and specific fix suggestions.PR Security Check uses a Flare API key, not a connector. Anyone with a GitHub repo can use it — no cloud connection required.
How it works
- A pull request is opened or updated with changes to infrastructure files
- The GitHub Action identifies security-relevant files (
.tf, CloudFormation, IAM policies, etc.) - The diff is sent to Flare’s API for AI-powered review
- Findings are posted as a PR comment
- The workflow fails if findings meet your configured severity threshold
What Flare looks for
Setting up
1. Generate an API key
- Go to Settings at tryflare.ai/settings
- Click Create API key
- Copy the key immediately — it is only shown once
- Add it as a GitHub repository secret named
FLARE_API_KEY
2. Add the workflow
Create.github/workflows/flare.yml in your repository:
Configuration
Inputs
Outputs
Fail-on threshold
Thefail-on input controls when the workflow fails:
Custom file patterns
Override the default patterns to review additional file types:Default file patterns
The action reviews these files by default:
If no changed files match these patterns, the action exits cleanly without calling the API.
PR comment
When findings are detected, a comment is posted on the PR with a severity summary and per-finding details:Priority truncation
For large PRs, Flare prioritizes the most security-relevant files:- Critical: IAM directories, policy files, role files
- High: Sentinel policies, firewall rules, network configs
- Medium: General Terraform and CloudFormation
- Low: Kubernetes and Helm manifests
files_truncated count so you know if files were skipped.
Rate limits
PR checks share the Flare daily analysis limit (10/day on the free tier). When the limit is reached, the action posts a warning but does not fail the workflow — your PR is not blocked by exhausted quota.Revoking a key
Go to Settings at tryflare.ai/settings and click Revoke on the key. Any workflows using that key will receive401 Unauthorized on the next run.
Combining with deploy webhooks
PR Security Check and deploy webhooks serve different moments:
Use both for complete coverage: catch issues in the code review, then verify the deploy didn’t introduce unexpected changes.