GitHub

GitHub Integration

Pensar Console integrates with GitHub to scan and secure your repositories. The integration uses a GitHub App to provide secure access to your code without requiring personal access tokens.

Prerequisites

Before connecting GitHub, ensure you have:

  1. A GitHub account with access to the repositories you want to scan
  2. Organization owner or admin access (if installing on an organization)

Connecting GitHub

From Workspace Settings

  1. Navigate to SettingsIntegrations in your Pensar Console workspace
  2. Expand the GitHub section
  3. Click Install another GitHub account (or Install GitHub if this is your first connection)
  4. A popup window will open to GitHub’s app installation page
  5. Select the organization or user account where you want to install the app
  6. Choose to install on all repositories or select specific repositories
  7. Click Install
  8. You’ll be automatically redirected back to Pensar Console

Direct Installation

You can also install the Pensar GitHub App directly from GitHub:

  1. Visit github.com/apps/pensarapp
  2. Click Install
  3. Select the organization or user account where you want to install the app
  4. Choose your repository access preferences
  5. Click Install

From Onboarding

When creating a new workspace, you’ll be prompted to connect GitHub during the onboarding process. Simply follow the same steps above.

You can connect multiple GitHub accounts or organizations to the same workspace. This is useful if your code is spread across different GitHub organizations.

Permissions

The Pensar GitHub App requests the following permissions:

PermissionAccess LevelPurpose
ContentsRead & WriteRead repository code for scanning, create auto-remediation commits
Pull requestsRead & WriteCreate and manage pull requests for security fixes
ChecksRead & WriteReport scan status and results on pull requests
ActionsRead & WriteIntegrate with GitHub Actions workflows

Adding Repositories

After the app is installed:

  1. Go to ProjectsNew Project in Pensar Console
  2. Your GitHub repositories will appear in the repository list
  3. Select a repository and configure your project settings
  4. Click Create Project to start scanning

Managing Installations

Viewing Connected Accounts

  1. Navigate to SettingsIntegrations
  2. Expand the GitHub section
  3. You’ll see all connected GitHub accounts and organizations

Adding More Accounts

Click Install another GitHub account to connect additional GitHub organizations or user accounts.

Modifying Repository Access

To change which repositories Pensar can access:

  1. Go to your GitHub organization or account settings
  2. Navigate to Installed GitHub Apps
  3. Find Pensar and click Configure
  4. Update the repository access settings
  5. The changes will be reflected in Pensar Console automatically

Removing an Installation

To disconnect a GitHub account:

  1. Go to your GitHub organization or account settings
  2. Navigate to Installed GitHub Apps
  3. Find Pensar and click Configure
  4. Scroll down and click Uninstall

Removing a GitHub installation will prevent Pensar from scanning repositories in that account. Any projects using those repositories will no longer be able to perform scans.

Troubleshooting

Installation Pending Approval

If you see “Installation pending approval”, it means you requested to install the app on an organization where you’re not an admin. An organization owner will need to approve the installation.

Repositories Not Appearing

If your repositories don’t appear in the project creation list:

  1. Verify the GitHub App is installed on the correct organization
  2. Check that the app has access to the specific repository
  3. Ensure you have at least read access to the repository on GitHub

Permission Errors

If you see permission errors when scanning:

  1. Verify the GitHub App has the required permissions listed above
  2. Ensure the app is installed on the repository you’re trying to scan
  3. Check that the installation hasn’t been suspended

Need Help?

If you encounter issues setting up your GitHub integration, please contact our support team at team@pensarai.com.