Skip to Content
IntegrationsGitHub

GitHub Integration

CodeStax integrates deeply with GitHub for repository scanning, PR reviews, and webhook automation.

Connecting GitHub

During Signup

Click Continue with GitHub on the signup page. This authorizes CodeStax with the required permissions and connects your GitHub account automatically.

After Signup

  1. Go to Settings on the dashboard
  2. Navigate to Integrations or API Keys tab
  3. Click Connect GitHub
  4. Authorize the CodeStax app on GitHub

Permissions

CodeStax requests the following GitHub scopes:

ScopePurpose
read:userRead your GitHub profile information
user:emailAccess your email for notifications
repoRead repository contents, create webhooks, post PR comments

Features

Repository Import

Once connected, you can import any repository you have access to (personal and organization repos). CodeStax fetches your repository list and lets you select which ones to import.

Automated PR Reviews

When you open or update a pull request, GitHub sends a webhook to CodeStax, which:

  1. Analyzes the PR diff for security issues
  2. Scores the PR risk level (0-100)
  3. Records findings in your dashboard

Webhook Events

CodeStax listens for these GitHub webhook events:

EventTriggerAction
pull_request.openedNew PR createdTrigger PR review
pull_request.synchronizeNew commits pushed to PRRe-trigger review
pull_request.reopenedClosed PR reopenedTrigger PR review
pushCode pushed to branchTrigger auto-scan (if enabled)

Webhook Security

All GitHub webhooks are verified using HMAC SHA-256 signatures. CodeStax checks the X-Hub-Signature-256 header to ensure the request originates from GitHub.

Authentication for Scans

When scanning GitHub repositories, CodeStax uses your stored OAuth token to:

  • Clone private repositories securely
  • Access repository contents without requiring SSH keys
  • Refresh tokens automatically when they expire