Single Tenant Flow
Checkmarx One supports integration with GitHub, GitLab, Bitbucket & Azure DevOps in a single tenant environment, enabling automated scanning of your projects whenever the code is updated. Checkmarx One’s integration listens for the code repository 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 the code repository, which includes a scan summary, list of vulnerabilities and a link to view the scan results in Checkmarx One.
Single tenant environment integration supports cloud based code repositories as well as self-hosted ones. The integration flow is the same for both.
Notice
This integration supports both public and private git based repos.
Notice
You can select several repos to create multiple integrations in a bulk action.
Prerequisites
The source code for your project is hosted on of the supported code repositories.
You have an Checkmarx One account and have credentials to log in to your account.
Important
Creating new import configurations or editing existing configurations requires
update-tenant-params
permission. Importing new Projects using an existing configuration requirescreate-project
permission.The code repository user has admin privileges for this repository.
You have your code repository Client ID & Client Secret.
GitHub - See Retrieving GitHub Client ID & Client Secret.
GitLab - See Retrieving GitLab Application ID & Application Secret.
Bitbucket - See Retrieving Bitbucket Username & Token.
Azure DevOps - See Retrieving Azure DevOps Username & Token.
Setting up the Integration and Initiating a Scan
Note
The procedure below reflects GitHub integration.
To see all the code repositories Domain Names & API Domain Names see Code Repository URLs.
To integrate your code repository organization with Checkmarx One, perform the following:
In the Applications and Projects home page, click on New > New Project - Code Repository Integration.
The Import From window opens.
Select the code repository (For example: GitHub).
Configure the following fields and click Next:
Domain Name or IP Address - Code repository domain.
For example: https://github.com
Domain Name: Cloud based code repositories.
IP Address: Self-hosted code repositories.
API Domain Name or IP Address - Code repository API domain.
For example: https://api.github.com
API Domain: Cloud based code repositories.
IP Address: Self-hosted code repositories.
Client ID - See Prerequisites for retrieving the relevant code repository Client ID.
Client Secret - See Prerequisites for retrieving the relevant code repository Client secret.
Select the code repository User/Organization or Group (for the requested repository) and click Select Organization.
In the Organization Settings screen you can decide whether to enable the "Monitor new repositories creation" feature.
For more information about the feature see Monitor New Repositories.
Select the Repository inside the code repository organization and click Next.
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.
In the Repositories Settings screen, perform the following and then click Next.
Permissions:
Scan Trigger: Push, Pull request - Automatically trigger a scan when a push event or pull request is done in your SCM. (Default: On)
Pull Request Decoration - Automatically send the scan results summary to the SCM. (Default: On)
SCA Auto Pull Request - Automatically send PRs to your SCM with recommended changes in the manifest file, in order to replace the vulnerable package versions. (Default: Off)
Scanners: Select the scanners for All/Specific repositories. At lease 1 scanner must be selected for each repository.
Protected Branches: Select which Protected Branches to scan for each repository.
Note
For additional information about Protected Branches see About Protected Branches
Add SSH key.
Assign Groups: Specify the Groups to which you would like to assign the project.
Assign Tags: Add Tags to the Project. Tags can be added as a simple strings or as key:value pairs.
Set Criticality Level: Manually set the project criticality level.
Select which Protected Branches to scan for each Repository and click Next.
Note
For additional information about Protected Branches see About Protected Branches
In the Advanced Options screen it is possible to select Scanning the default branch upon the creation of the Project.
Click Create Project.
The project is successfully created in the Applications and Projects home page, and the scan is initiated.
Note
In order to update the scanners see Imported Project Settings
Updating Project Settings
Code Repository URLs
The table below presents all the options for URL of the supported code repositories.
Code Repository | URL |
---|---|
GitHub Cloud | https://github.com |
GitHub Self-hosted | For example: https://github.example.com |
GitLab Cloud | https://gitlab.com |
GitLab Self-hosted | For example: https://gitlab.example.com |
Azure DevOps Cloud | https://dev.azure.com |
Azure DevOps Self-hosted | For example: https://azure.example.com |
Bitbucket Cloud | Not supported |
Bitbucket Self-hosted | For example: https://bitbucket.example.com |