Protection
Protection port cutover
Operational checklist for moving the Superagent Security GitHub App into landing without user reinstall.
Use this checklist when moving the existing Superagent Security GitHub App traffic from the legacy brin-github service to landing.
Compatibility requirements
- Reuse the existing production GitHub App credentials as
SECURITY_GITHUB_APP_ID,SECURITY_GITHUB_APP_PRIVATE_KEY, andSECURITY_GITHUB_WEBHOOK_SECRET. - Keep the webhook path
/api/github/webhookon the new host, or proxy the old host/path to the new route during cutover. - Keep check names unchanged:
Security scanandContributor trust. - Keep labels unchanged:
pr:verified,pr:flagged,contributor:verified, andcontributor:flagged. - Keep comment markers and finding fingerprints unchanged so existing review threads and branch protection rules continue to work.
Cutover steps
- Deploy the Supabase migration that creates the
protection_*tables. - Configure the
SECURITY_*environment variables in thelandingdeployment. - Import legacy finding dismissals:
PROTECTION_SQLITE_DB_PATH=/data/brin.db npm run migrate:protection-dismissals- Backfill installations and repositories:
curl -X POST https://your-app-domain/api/protection/installations/sync \
-H "Authorization: Bearer $SECURITY_ADMIN_API_TOKEN"- Verify
/app/protection/repositoriesshows the expected installed repositories. - Route a staging repository webhook to
/api/github/webhookand compare check runs, labels, and comments with the legacy service. - Update the GitHub App webhook URL, or switch the old endpoint proxy, only after parity is confirmed.
- Keep the legacy service available until new PR events, check re-runs, and finding dismissals have been verified in production.
Rollback
Point the GitHub App webhook URL or proxy back to the legacy brin-github service. Existing GitHub installations remain valid because the app identity has not changed.