> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codethreat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Checks Integration

> CodeThreat status checks on GitHub pull requests

CodeThreat appears as a required check on GitHub pull requests to gate insecure code.

## How GitHub Checks Work

CodeThreat posts a check status on every pull request:

* ✅ **Success**: No Critical/High severity violations
* ❌ **Failed**: Security issues requiring attention
* ⏳ **Pending**: Scan in progress

## Require Checks Before Merge

Prevent merging vulnerable code with branch protection:

<Steps>
  <Step title="Open Branch Settings">
    Repository → **Settings** → **Branches** → Select branch (e.g., `main`)
  </Step>

  <Step title="Require Status Checks">
    Enable **Require status checks to pass before merging**
  </Step>

  <Step title="Select CodeThreat">
    Search for and select **CodeThreat Security Scan**
  </Step>

  <Step title="Save">
    Click **Save changes**
  </Step>
</Steps>

<Check>
  Pull requests with failing security checks cannot be merged.
</Check>

## Configure Pass/Fail Criteria

**Repository Settings** → **Pull Requests** → **Pass Criteria**

Choose what causes checks to fail:

* Fail on Critical violations
* Fail on High violations
* Fail on Medium violations
* Fail on Low violations

<Tip>
  Start by failing only on Critical violations, then progressively tighten criteria as your security posture improves.
</Tip>

## What's Next?

<CardGroup cols={2}>
  <Card title="PR Scanning" icon="magnifying-glass" href="/scanning/pr-scanning">
    Configure PR security scanning
  </Card>

  <Card title="Automated Scanning" icon="repeat" href="/scanning/automated-scanning">
    Set up automation
  </Card>
</CardGroup>
