GitHub Integration

Connect your GitHub repositories for automatic scans on every push.

🤖 Vibe Coding Prompts

Choose your path and copy the prompt to your AI assistant:

Block PRs with security issues

Read the Bugrit docs:
- GitHub Integration: https://bugrit.com/docs/integrations/github
- Scans API: https://bugrit.com/docs/api-reference/scans

Create a GitHub Action that scans PRs before merge:

1. Trigger on: pull_request to main branch
2. POST to /api/v1/scans with the PR branch
3. Poll until scan completes
4. Add PR comment with scan summary
5. FAIL if critical issues found

Use secrets.BUGRIT_API_KEY for auth.

✨Works with Claude, ChatGPT, Cursor, Copilot, Cody, and other AI coding assistants

💡 Why This Matters

Your code lives on GitHub. Connect once and every PR gets checked automatically. Security issues appear right where you review code.

  • →PR comments: Findings appear as comments on the exact lines with issues
  • →Branch protection: Block merges to main when critical issues are found
  • →Private repos: Securely connect private repositories
Manual Setup (3 steps)

1. Install the GitHub App

Go to Settings → Integrations and click "Connect GitHub".

2. Select Repositories

Choose which repositories the app can access.

3. Link to Application

In your application settings, select the GitHub repository to link.

Technical Reference

Automatic Scan Triggers

TriggerDescription
pushScan on every push to specified branches
pull_requestScan when PRs are opened or updated
releaseScan when a new release is published
scheduleRun scans on a schedule (daily, weekly)

API Example

curl -X POST https://bugrit.com/api/v1/scans \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "applicationId": "app-abc123",
    "sourceType": "github",
    "repoUrl": "https://github.com/yourorg/yourrepo",
    "branch": "feature/new-feature"
  }'

Permissions Required

PermissionAccessPurpose
ContentsReadClone repository for scanning
Pull requestsWritePost comments on PRs
ChecksWriteCreate check runs
StatusesWriteSet commit status