Skip to main content

GitLab Cloud

Overview

Checkmarx One supports GitLab integration, enabling automated scanning of your GitLab projects whenever the code is updated. Checkmarx One’s GitLab integration listens for GitLab commit events and uses a webhook to trigger Checkmarx scans when a push, or a pull request occurs. Once a scan is completed, the results can be viewed in Checkmarx One.

In addition, for pull requests, a comment is created in GitLab, which includes a scan summary, list of vulnerabilities and a link to view the scan results in Checkmarx One.

Notice

This integration supports both public and private repos.

The integration is done on a per project basis, with a specific Checkmarx One Project corresponding to a specific GitLab repo.

Notice

You can select several repos to create multiple integrations in a bulk action.

Prerequisites

  • The source code for your project is hosted on a GitLab repo.

  • You have a Checkmarx One account and have credentials to log in to your account.

  • The GitLab user has Maintainer or Owner privileges for this Project, see GitLab

Initiating a Scan

To integrate your GitLab organization with Checkmarx One, perform the following:

  1. In the Applications and Projects home page click New Project → Import Project

    6428491810.png
  2. Select Cloud-hosted > GitLab

    GitLab_Cloud_Select.png
  3. Upon initial log in, approve GitLab account authorization request via Checkmarx One.

    Click Authorize

    6428491822.png
  4. Sign in to GitLab using one of the following options:

    6428491828.png
  5. Select the GitLab User/Organization or Group (for the requested repository) and click Select Organization

    Click Back to return to the Select Service screen.

    GitLab_Select_Organization.png
  6. Select the Repository inside the GitLab organization and click Next

    Click Back to return to the Select Organization screen.

    Note

    • A separate Checkmarx One Project will be created for each repo that you import.

    • There can’t be more than one Checkmarx One Project per repo. Therefore, once a Project has been created for a repo, that repo is greyed out in the Import dialog.

    GitLab_Select_Repo.png
  7. In the Repositories Settings screen, perform the following and click Next

    Click Back to return to the Select Repositories screen.

    1. Select the scanners for All/Specific repositories.

    2. Select which Protected Branches to scan for each Repository.

    3. It is possible to specify the Groups to which you would like to assign the Project.

    4. You can also add Tags to the Project. Tags can be added as a simple strings or as key:value pairs.

      GitLab_Repo_Settings.png
  8. Select which Protected Branches to scan for each Repository and click Next

    Click Back to return to the Repositories Settings screen.

    GitLab_Select_Branches.png
  9. In the Advanced Options screen it is possible to select Scanning the default branch upon the creation of the Project

    Click Create Project

    Click Back to return to the Select Branches screen.

    GitLab_Advanced_Options.png
  10. The Project is successfully created in the Applications and Projects home page, and the scan is initiated.

    6428491864.png

    Note

    In order to update the scanners see Imported Project Settings

Updating Project Settings

See Imported Project Settings