> For the complete documentation index, see [llms.txt](https://docs.nullify.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nullify.ai/enterprise-tier/github-self-hosted-app.md).

# Self-Hosted GitHub App

Nullify is currently available as a GitHub App that can be installed across select repositories or all current and future repositories, allowing for organization-wide coverage in one click.

Please reach out to our team to assist with your org setup.

## Install Nullify

### Setting up your GitHub application

See [creating a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) for general guidance on setting up GitHub Apps.

1. Go to `https://github.com/organizations/<insert-your-org-name>/settings/apps/new`
2. **GitHub App name:** Enter the name of your application.
3. **Homepage URL:** Enter `https://nullify.ai`

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-76fc1410da9cf4a5e2f7bc37dc6e9b7484aef92e%2Fapp-name-field-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-6c9b1080dec67b54f01fe77b91c577e0d13efd98%2Fapp-name-field.png?alt=media" alt="GitHub App name field"></picture><figcaption><p>GitHub App name</p></figcaption></figure>

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-1458bd6888d4a437346c6e37dcb3b1325b9f6665%2Fapp-homepage-url-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-0db2d9f12b22e691f53457b71c21cc7184efb1ed%2Fapp-homepage-url.png?alt=media" alt="Homepage URL field"></picture><figcaption><p>Homepage URL</p></figcaption></figure>

**Identifying and authorizing users:**

4. Add the **Redirect URI** provided to you by Nullify. Older GitHub Enterprise Server versions call this field **Callback URL**.
5. Enable **Request user authorization (OAuth) during installation**

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-0e3d6ee4b6efc3a0f883f2c6a59aedfe906d48cf%2Fapp-redirect-uri-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-ac7b8cad46c81998ab3e01a2bf20f323f5a9ff40%2Fapp-redirect-uri.png?alt=media" alt="Redirect URI and OAuth during installation settings"></picture><figcaption><p>Redirect URI</p></figcaption></figure>

**Webhook:**

6. Add the **Webhook URL**. It is of the form `https://api.<your-organization>.nullify.ai/core/github/webhook`.
7. Add the webhook **Secret** (provided to you by Nullify — you do not generate this yourself)
8. Enable **SSL verification**

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-0662766560abbc0ab5f96787bd80582c1eea9276%2Fapp-webhook-url-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-2a1813dbe82fa1d5e42b3fc496d62aeadc1e7228%2Fapp-webhook-url.png?alt=media" alt="Webhook URL and secret fields"></picture><figcaption><p>Webhook URL</p></figcaption></figure>

**Display Information:**

9. Upload the Nullify symbol PNG (`symbol-onyx.png`) from the [brand kit](https://docs.nullify.ai/more-info/brand-kit.md) as the logo. GitHub App logos must be PNG, JPG or GIF, so do not use the SVG. Set **Badge background color** to `#ffffff`.

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-e15156f425d8d9fe44340f6ef67cb98a46fccee3%2Fapp-logo-setting-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-b88937db26318ef19d29b28407d65869be8a7a60%2Fapp-logo-setting.png?alt=media" alt="Nullify logo added to GitHub App display information"></picture><figcaption><p>Nullify logo added to GitHub App display information</p></figcaption></figure>

10. Grant access to the following **Repository** **permissions**:

| **Permission**                                   | **Access**   | **Explanation**                                                                     |
| ------------------------------------------------ | ------------ | ----------------------------------------------------------------------------------- |
| Actions                                          | Read-only    | Read required for the autofix workflow to fix failing CI jobs                       |
| Checks                                           | Read & write | Write required to create and modify Check Runs                                      |
| Contents                                         | Read & write | Write required for the autofix engine to read code and commit fixes to fix branches |
| Issues                                           | Read & write | Write required to create and modify Issues                                          |
| <p><strong>GitHub.com:</strong> Metadata<br></p> | Read-only    | This setting is automatically set by GitHub                                         |
| Commit statuses                                  | Read-only    | Required to receive CI build status events from any provider                        |
| Pull Requests                                    | Read & write | Write required to create and modify Pull Requests                                   |
| Workflows                                        | Read & write | Write required only for fixes that change GitHub Actions workflow files             |

11. Grant access to the following **Organization** **permissions**:

| **Permission** | **Access** | **Explanation** |
| -------------- | ---------- | --------------- |
| Members        | Read       | Read teams      |

12. Subscribe to the following **Events**:

| **Event Type**              | **Subscription** |
| --------------------------- | ---------------- |
| Commit comment              | Required         |
| Pull Request                | Required         |
| Push                        | Required         |
| Check Run                   | Required         |
| Check suite                 | Required         |
| Issues                      | Required         |
| Issue Comment               | Required         |
| Pull Request Review         | Required         |
| Pull Request Review Comment | Required         |
| Pull Request Review Thread  | Required         |
| Repository                  | Required         |
| Status                      | Required         |

13. In the "Where can this GitHub App be installed?" section, select **Only on this account**. Then select **Create GitHub App**.

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-bb6addb08208498cabab23ce276a14eb1d344c96%2Fapp-install-location-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-e81e65996efef0418fab404dc2e78d620733e8be%2Fapp-install-location.png?alt=media" alt="Where can this GitHub App be installed, with Only on this account selected"></picture><figcaption><p>Installation target</p></figcaption></figure>

14. Navigate to the **Developer settings** of your new App. In **General**, get the App ID and Client ID.

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-997f8b887e8fc04273948a0c25659dd47b9f951b%2Fapp-developer-settings-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-758067dceea61cc7be71d985efdbd44e870c76bc%2Fapp-developer-settings.png?alt=media" alt="Developer settings menu with GitHub Apps selected"></picture><figcaption><p>GitHub App - Developer settings</p></figcaption></figure>

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-8dcfcf595da0887b31f7eacd0c6d1d17056ec2dd%2Fapp-id-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-a4f6bf16e98129d4159b11e6405b3590eb9c4482%2Fapp-id.png?alt=media" alt="App ID and Client ID in the GitHub App&#x27;s General settings"></picture><figcaption><p>App ID &#x26; Client ID</p></figcaption></figure>

15. In **Credentials**, open **Client secrets** and select **New secret**.

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-5db748e7a5a011586a479e6385aaa69757662acd%2Fapp-client-secret-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-e3492fba860961666a81679f620d31355c877fc1%2Fapp-client-secret.png?alt=media" alt="Client secrets tab in the GitHub App&#x27;s Credentials settings"></picture><figcaption><p>Client secrets</p></figcaption></figure>

16. In **Credentials**, open **Key pairs** and select **New key** to generate a private key:

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-b2f3e4c2c1994b5ec04518e595b1a167a0bd72f8%2Fapp-private-key-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-e917fe0e6959dab868b7bebce177ec6a4c862d63%2Fapp-private-key.png?alt=media" alt="Key pairs tab in the GitHub App&#x27;s Credentials settings"></picture><figcaption><p>Private key</p></figcaption></figure>

Older GitHub Enterprise Server versions show client secrets and private keys under **General** instead of **Credentials**.

17. Send the App ID, Client ID, Client Secret and Private Key to Nullify. This can be done via a password manager.
18. Wait for your stack to be provisioned.
19. In **Install App**, install the App in your organization:

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-6c98629646b59070841357625557a1ea73349bd8%2Finstall-app-button-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-caaa084e998ac969b45f97ae948c09f70460e5d4%2Finstall-app-button.png?alt=media" alt="Install App page with an Install button for the organization"></picture><figcaption><p>Install App</p></figcaption></figure>

20. In **Repository access**, select the repositories you would like to install Nullify:

<figure><picture><source srcset="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-836c60e5ad2fadf25e893a1b09ce2e63f7392af7%2Frepo-access-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-8523f9952c37ecae621ca897fb56dddc82f4279f%2Frepo-access.png?alt=media" alt="Repository access choice and requested permissions on the install page"></picture><figcaption><p>Repository access</p></figcaption></figure>

## GitHub Enterprise Server

Nullify supports a deployment configured for a customer GitHub Enterprise Server hostname. Supply the GHES base URL to Nullify during installation so App API, REST/GraphQL, repository cloning, and sign-in use the same host. Register and install the app on that server rather than on github.com, and use the callback/webhook values supplied for your Nullify deployment. Verify network access and the app health check before enrolling repositories.
