# GitHub Integration

## Overview

DevArmor connects to your GitHub Enterprise instance through a dedicated agent that monitors pull requests, posts security review findings, and syncs Code Review results back to your repositories. For this communication to work, your GHE tenant must permit inbound and outbound traffic from DevArmor's IP address.

Most GitHub Enterprise deployments restrict network access to a set of known IPs. Adding DevArmor's IP to your allowlist ensures uninterrupted connectivity between the agent and your repositories.

## How It Works

1. Retrieve DevArmor's static IP address from the table below.
2. Add the IP to your GitHub Enterprise allowlist (Settings → IP Allow List).
3. DevArmor's agent begins communicating with your GHE tenant — no restart or additional configuration required.

```mermaid
sequenceDiagram
    participant Admin as GHE Admin
    participant GHE as GitHub Enterprise
    participant DA as DevArmor Agent
    Admin->>GHE: Add DevArmor IP to allowlist
    DA->>GHE: Connect to repositories
    GHE-->>DA: Permit traffic
    DA->>GHE: Post review findings to PRs
```

*DevArmor's agent connects to your GHE tenant after the IP is allowlisted. No additional authentication changes are needed.*

## Installation

Install the DevArmor GitHub App on your organization:

1. Navigate to [github.com/apps/devarmor](https://github.com/apps/devarmor).
2. Click **Install**.
3. Select the GitHub organization you want to connect to DevArmor.
4. Choose repository access — grant access to **All repositories** or select specific repositories for DevArmor to monitor.
5. Click **Install** to confirm.

Once installed, DevArmor receives webhook events from your repositories and can post Code Review findings directly to pull requests.

### GitHub Enterprise IP Allowlisting

DevArmor's GitHub agent requires network access to your GitHub Enterprise (GHE) tenant. This page covers how to allowlist DevArmor's IP address so the agent can communicate with your environment.

### DevArmor IP Address

| Environment | IP Address      |
| ----------- | --------------- |
| Production  | `52.12.139.131` |

### Prerequisites

* Admin access to your GitHub Enterprise instance
* DevArmor GitHub integration enabled in your DevArmor workspace

### Configuration

#### Adding the IP in GitHub Enterprise

1. Navigate to your GitHub Enterprise **Settings → IP Allow List**.
2. Click **Add IP address**.
3. Enter `52.12.139.131`.
4. Add a description (e.g., "DevArmor Agent").
5. Save the entry.

> **Note:** If your organization uses an additional network firewall or proxy in front of GHE, you may also need to allowlist this IP at the network level. Consult your infrastructure team if the agent fails to connect after updating the GHE allowlist.
