Why GitHub Apps?
GitHub App vs Traditional OAuth
We chose GitHub Apps over traditional OAuth for significantly better security and user control. Here's why it matters for your code.
| Feature |
GitHub App (CursorGuard)
| Traditional OAuth |
|---|---|---|
| Permission Scope | Granular, per-repository selection | Broad access to all repositories |
| Token Lifetime | 1 hour (auto-renewed) | Long-lived (until revoked) |
| Organization Control | Admins can manage centrally | Individual user grants |
| Write Access | Read-only by default | Often requires write access |
| Token Storage | Generated on-demand, never stored | Must be stored securely |
How It Works
Connect in 5 Simple Steps
The entire connection process takes less than 60 seconds. Here's exactly what happens.
Click Connect GitHub
From your CursorGuard dashboard, click the "Connect GitHub" button to start the integration process.
Select Repositories
On GitHub, choose which repositories to grant access. You can select all repos or pick specific ones.
Install the App
Confirm the installation. GitHub sends a secure webhook to our API with your installation details.
Sync Your Repos
Back in CursorGuard, click "Sync Repos" to import your repository list. This fetches metadata only.
Start Scanning
Select any repo and trigger a security scan. Your code is cloned, scanned, and immediately deleted.
Minimal Permissions
Only What We Need, Nothing More
We follow the principle of least privilege. Here's exactly what our GitHub App can and cannot access.
Permissions Granted
To clone and scan your code for vulnerabilities
To display repo name, branches, stars, and language
Never Requested
We never modify, commit, or push to your repositories
No access to your team members or org structure
No access to your issues, PRs, or discussions
No access to your CI/CD workflows or secrets
Token Security
Short-Lived Installation Tokens
Unlike OAuth tokens that live forever, installation tokens expire automatically. Here's how the lifecycle works.
Generate
When a scan is triggered, our API generates an installation token using our GitHub App credentials (JWT signed with private key).
Use
The token authenticates API calls to GitHub: cloning repos, listing branches, fetching metadata. Scoped only to your selected repositories.
Expire
Tokens automatically expire after 1 hour. We never store them. If needed again, a fresh token is generated on-demand.
Why This Matters
Even if a token were somehow intercepted, it would expire within an hour and only have access to the specific repositories you selected. This drastically limits the attack surface compared to long-lived OAuth tokens.
Real-Time Events
Webhook Integration
GitHub sends us real-time notifications when important events happen. We verify every webhook cryptographically to prevent spoofing.
installation.created Fired when a user installs our GitHub App. We store the installation ID to generate tokens later.
installation.deleted Fired when a user uninstalls the app. We remove the installation and associated repos from our database.
installation.suspend Fired when an organization admin suspends the installation. We mark it as suspended to prevent scans.
push Fired on every git push. We check if the branch is watched and trigger an automated scan if enabled.
Repository Management
What We Store (And Don't)
When you sync your repositories, we only fetch metadata needed for the dashboard. Your source code is never stored permanently.
Stored in Database
- Repository name and URL
- Default branch name
- GitHub stats (stars, forks, language)
- Last scan timestamp
- Branch watch settings
- Vulnerability findings (metadata only)
Never Stored
- Your source code
- GitHub access tokens
- File contents
- Commit history
- Environment variables / secrets
- Git blame / contributor info
Your Code, Protected
Complete Code Isolation
Every scan runs in a completely isolated environment. Your code never touches our servers permanently and is never accessible to other scans.
Dedicated Docker Containers
Each scan runs in its own isolated Docker container with no access to other scans or system resources.
Temporary Cloning
Your code is cloned to a temporary directory, scanned, and immediately deleted. Nothing persists.
Network Isolation
Containers can only reach GitHub (for cloning) and our AI service (for analysis). No other network access.
Metadata Only Storage
We only store vulnerability metadata: file paths, line numbers, severity. Your actual code is never persisted.
Scan Lifecycle
Automated Security
CI/CD Integration
Set up automatic scanning on every push to your main branch. Perfect for catching vulnerabilities introduced by AI coding assistants like Cursor, Copilot, or Lovable.
Branch Watching
Configure which branch to monitor (e.g., main, develop). Pushes to other branches are ignored.
Cooldown Protection
Set a cooldown period (default 60 min) to prevent scan spam from rapid successive pushes.
Instant Feedback
Vulnerabilities are detected within minutes of pushing, catching issues before they reach production.
Push Event Flow
Developer pushes code
Verify signature, check branch watch
Clone, analyze, report findings
View in dashboard or get notified
Common Questions
Frequently Asked Questions
Everything you need to know about our GitHub integration.
Can CursorGuard modify my code?
How long do you store my source code?
What happens if I uninstall the GitHub App?
Can I control which repositories CursorGuard can access?
Do you have access to my private repositories?
What if a token is intercepted?
How do you verify webhook authenticity?
Connect Your GitHub in 60 Seconds
Experience seamless, secure scanning with our GitHub App integration. Get started with 3 free scans per month. No credit card required.