ShipSecure

GitHub

Configure a GitHub App for Radar

GitHub Apps are how Radar authenticates with the GitHub API to read PR diffs and post review comments. Each self-hosted instance needs its own GitHub App.

Create the App

Go to github.com/settings/apps/new.

For an organization, go to https://github.com/organizations/<YOUR_ORG>/settings/apps/new.

Fill in the form:

FieldValue
GitHub App nameSomething unique, e.g. Radar Security (yourcompany)
Homepage URLYour domain or https://github.com/shipsecure-labs/radar
Webhook URLhttps://your-domain.com/github/webhook
Webhook secretGenerate one: openssl rand -hex 32
Webhook activeChecked

Set Repository permissions:

PermissionAccess
ContentsRead-only
Pull requestsRead & Write

Leave all other permissions as "No access".

Under Subscribe to events, check Pull request.

Click Create GitHub App.

Get your credentials

On the app settings page, note the App ID (numeric value near the top).

Scroll to Private keys and click Generate a private key. A .pem file will download.

Convert it to a single-line format for your .env:

awk 'NF {sub(/\r/, ""); printf "%s\\n", $0}' your-app-name.*.private-key.pem

Click Install App in the left sidebar, select your account/organization, and choose which repositories to install on.

Environment variables

GITHUB_APP_ID=123456
GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...\n-----END RSA PRIVATE KEY-----\n"
GITHUB_WEBHOOK_SECRET=your-webhook-secret

The GITHUB_PRIVATE_KEY must be in PEM format. Replace actual newlines with \n when using a .env file.

On this page