GitHub Enterprise Server
GitHub Enterprise Server Integration
Pensar Console supports integration with self-hosted GitHub Enterprise Server instances, allowing you to scan and secure repositories hosted on your own infrastructure.
Prerequisites
Before configuring the GitHub Enterprise Server integration, you’ll need:
- Administrator access to your GitHub Enterprise Server instance
- A GitHub App created on your Enterprise Server
- The following credentials from your GitHub App:
- App ID
- Client ID
- Client Secret
- Private Key (PEM format)
Creating a GitHub App
To create a GitHub App on your GitHub Enterprise Server:
-
Navigate to your GitHub Enterprise Server’s settings
-
Go to Developer Settings → GitHub Apps → New GitHub App
-
Fill in the Basic information:
- GitHub App name:
Pensar(or your preferred name) - Homepage URL:
https://console.pensar.dev
- GitHub App name:
-
Configure Post installation settings:
- Setup URL:
https://console.pensar.dev/integrations/github/enterprise/redirect - ✅ Check Redirect on update - This ensures users are redirected when the installation is modified
- Setup URL:
The Setup URL uses the dedicated Enterprise redirect endpoint to ensure the installation is correctly saved to your Enterprise Server configuration.
-
Configure Webhook (optional):
- Uncheck Active if you don’t need webhooks, or
- Set Webhook URL to your preferred endpoint if you want to receive events
-
Set the following Repository permissions:
- Contents: Read & Write
- Pull requests: Read & Write
- Checks: Read & Write
- Actions: Read & Write
-
Under Where can this GitHub App be installed?, select the appropriate option for your organization
-
Click Create GitHub App
-
After creation, note down these values from the app settings page:
- App ID - displayed at the top of the page
- Client ID - displayed below the App ID
- Click Generate a new client secret and save it securely
- Scroll to Private keys and click Generate a private key - download the PEM file
Configuring in Pensar Console
-
Navigate to Settings → Integrations in your Pensar Console workspace
-
Expand the GitHub section
-
Scroll down to GitHub Enterprise Server
-
Enter your configuration:
- Server Hostname: Your GitHub Enterprise Server hostname (e.g.,
github.yourcompany.com) - App ID: The App ID from your GitHub App
- Client ID: The Client ID from your GitHub App
- Client Secret: The Client Secret you generated
- Private Key: Paste the contents of the PEM file
- Server Hostname: Your GitHub Enterprise Server hostname (e.g.,
-
Click Save Configuration
The Client Secret and Private Key are encrypted before being stored and are never exposed in plain text.
Installing the App
After configuring the integration, you need to install the GitHub App on your organization or repositories:
- Navigate to Integrations → GitHub in Pensar Console (or click the link from Settings)
- Select the Enterprise Server tab
- Click Install Enterprise App
- A popup will open to the Pensar app installation page on your Enterprise Server
- Select the organization or user account where you want to install the app
- Choose to install on all repositories or select specific ones
- Click Install
- You’ll be automatically redirected back to Pensar Console and the installation will be saved
The installation process uses the same flow as GitHub Cloud. Make sure your GitHub App’s Setup URL is set to https://console.pensar.dev/integrations/github/enterprise/redirect and Redirect on update is enabled.
Adding Repositories
After the app is installed:
- Go to Projects → New Project in Pensar Console
- Your GitHub Enterprise Server repositories will appear in the repository list
- Select a repository and configure your project settings
- Start scanning!
Troubleshooting
Connection Issues
If you’re experiencing connection issues:
- Verify your GitHub Enterprise Server is accessible from the internet (or configure appropriate network access)
- Ensure the hostname is correct and doesn’t include
https:// - Check that your GitHub App credentials are correct
Permission Errors
If you see permission errors when scanning:
- Verify the GitHub App has the required permissions listed above
- Ensure the app is installed on the repository you’re trying to scan
- Check that the installation hasn’t been suspended
Certificate Issues
If you’re using a self-signed certificate:
Contact Pensar support to discuss options for connecting to GitHub Enterprise Servers with custom certificates.
Security Considerations
- All sensitive credentials (Private Key, Client Secret) are encrypted using AES-256-GCM before storage
- Communication with your GitHub Enterprise Server uses HTTPS
- Access tokens are short-lived and refreshed automatically
Need Help?
If you encounter issues setting up your GitHub Enterprise Server integration, please contact our support team at team@pensarai.com.