> ## 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.

# AI Pull Request Reviews

> Intelligent security analysis of pull requests

Get AI-powered security feedback directly in your pull requests to prevent vulnerabilities before they're merged.

## What AI PR Reviews Provide

<CardGroup cols={2}>
  <Card title="Security Analysis" icon="shield-check">
    Identify security issues in code changes
  </Card>

  <Card title="Contextual Suggestions" icon="lightbulb">
    AI-generated fix recommendations
  </Card>

  <Card title="Priority Ratings" icon="arrow-up">
    Critical, High, Medium, Low priorities
  </Card>

  <Card title="Confidence Scores" icon="percent">
    How certain the AI is about each finding
  </Card>
</CardGroup>

***

## Enable AI PR Reviews

<Steps>
  <Step title="Open Repository Settings">
    **Repository Settings** → **Pull Requests**
  </Step>

  <Step title="Enable AI PR Reviews">
    Toggle **AI PR Reviews** to enabled
  </Step>

  <Step title="Configure Options">
    Set preferences:

    * Post PR comments
    * Summary comment
    * Suggestion threshold
  </Step>

  <Step title="Save Configuration">
    Click **Save** to activate
  </Step>
</Steps>

***

## How It Works

The AI autonomously reviews every PR for security:

1. **Understands What Changed**: Analyzes code intent and architecture impact
2. **Analyzes Security Impact**: Traces how changes affect security
3. **Thinks Across Files**: Sees connections across multiple files
4. **Provides Specific Fixes**: Code examples tailored to your framework
5. **Rates Priority and Confidence**: Clear guidance on urgency

### Why Agentic PR Reviews Matter

**Traditional PR scanning**: Runs rules on changed lines, reports findings

**Agentic PR reviews**: AI actively investigates code changes, understands architectural impact, provides contextual feedback

***

## PR Review Components

### Summary Comment

Posted at PR level with overall security status:

* Security status (Success/Warning/Failed)
* Summary of issues found
* Priority breakdown
* Links to detailed analysis

### Inline Comments

Posted on specific lines with vulnerabilities:

* Issue description
* Security impact
* Fix recommendations
* Code examples
* Priority and confidence scores

### GitHub Check Status

AI review appears as a check:

* ✅ **Success**: No Critical/High security issues
* ❌ **Failed**: Security concerns requiring attention
* ⏳ **Pending**: AI analysis in progress

***

## Configuration

Configure PR review behavior:

* **Post PR comments**: Add inline security feedback
* **Summary comment**: Overall security assessment
* **Suggestion threshold**: Minimum priority to comment
* **Block merge on failure**: Prevent merging PRs with Critical/High violations

***

## Best Practices

* Enable AI PR reviews for all repositories
* Review AI suggestions promptly
* Provide feedback to improve AI accuracy
* Use threshold settings to reduce noise
* Combine with automated scanning for comprehensive coverage

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Automated Scanning" icon="repeat" href="/scanning/automated-scanning">
    Set up automatic PR scanning
  </Card>

  <Card title="GitHub Checks" icon="check" href="/pull-requests/github-checks">
    Configure GitHub check status
  </Card>
</CardGroup>
