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 → Source control in your Pensar Console workspace
-
Find the GitHub row
-
Expand the GitHub Enterprise Server collapsible
-
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 saving the configuration, the GitHub Enterprise Server card shows that the app is configured but not yet installed. You now need to install the GitHub App on your organization or repositories:
- In the GitHub Enterprise Server section (Settings → Integrations → Source control → GitHub row → GitHub Enterprise Server collapsible), click the Install GitHub App link
- This opens the Pensar app installation flow at
/integrations/github/enterprise, which redirects you to your Enterprise Server’s installation page - 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, attach repositories directly to your workspace:
- Go to Attack Surface → Repositories in Pensar Console
- Click Add repository
- Your GitHub Enterprise Server repositories appear in the picker — select one or more
- Click Attach & continue
Each repository you attach is connected to the workspace and recon / attack-surface analysis launches automatically — there is no separate project to create.
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 before storage and are never exposed in plain text
- 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@pensar.dev.