Skip to main content

Integrating Semgrep into source code management (SCM) tools

Semgrep App's Team tier supports repositories hosted on both GitHub Enterprise (GHE) and GitLab Self Managed (GLSM) plans. Create multiple integrations in different self-hosted or custom servers.

Prerequisitesโ€‹

You need the following permissions to integrate Semgrep into GHE or GLSM servers:

  • Permission to create a personal access token (PAT) for the repository to scan Semgrep on. This PAT is used to enable Semgrep App to create pull request (PR) or merge request (MR) comments for findings that can be autofixed.
  • Permission to add CI/CD secrets into your GitHub or GitLab environments.

Integrating Semgrep into GitHub Enterprise or GitLab Self Managedโ€‹

Integrate Semgrep into these custom source code management (SCM) tools by following the steps below:

  1. Sign in to Semgrep App.
  2. Click Settings > Create new parent organization.

Screenshot of settings for parent organization

  1. Enter the name of your parent organization.
  2. Sign out, then sign in again to enable SCM management.
  3. Click Settings > SCM management > Configure new SCM.

Screenshot of SCM configuration tab

  1. Select your SCM provider.

  2. For GitHub Enterprise, follow these steps:

    1. Create a personal access token (PAT) by following the steps outlined in this guide to creating a PAT.
    2. Enter the personal access token generated into the Access Token field.
    3. Enter your GHE base URL into the SCM Base URL.
  3. For GitLab Self Managed, follow these steps:

    1. Create a personal access token (PAT) by following the steps outlined in this guide to creating a PAT.
    2. Enter the personal access token generated into the Access Token field.
    3. Enter your GLSM base URL into the SCM Base URL field.
  4. Ensure that your SCM integration successfully detects repositories by following the steps below:

    1. Click Projects > Setup New Project.
    2. Select your CI provider.
    3. Semgrep App detects repositories from your SCM integration.
  5. Add a new repository by following the steps in Adding a project.

Additional referencesโ€‹


Find what you needed in this doc? Join the Slack group to ask the maintainers and the community if you need help.