Overview
Mend for GitHub.com offers several parameters to configure your SCA scans, checks, and issues.
Getting It Done
Configuration at the local repository level is done via the .whitesource file. To set up your configuration file for SCA scans, see the Parameters section provided in this documentation. Below is an example of fine-tuning an SCA scan within a repository’s .whitesource file:
{
"scanSettings": {
"configMode": "AUTO",
"enableLicenseViolations": true,
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff",
"useMendCheckNames": true
},
"issueSettings": {
"minSeverityLevel": "LOW",
"issueType": "DEPENDENCY"
},
"remediateSettings": {
"workflowRules": {
"enabled": true
}
}
}
Note: For global configuration, parameters are set via the repo-config.json file. See our Set up a global configuration for Mend for GitHub.com documentation for more information.
Reference
Parameters
Scan Settings (scanSettings)
|
Parameter |
Type |
Description |
|---|---|---|
|
baseBranches |
Array |
Optional. Default Value: Example usage:
This will set both Note:
|
|
configMode |
String |
Optional. Default Value:
Note: whitesource.config can be provided both in global config and in the repo itself. If it is provided in both places and there are parameters that are set on both levels - repo level will take precedence. |
|
cloneSubmodules |
Boolean |
Optional. Default Value: Notes:
|
|
configExternalURL |
String |
Required only if configMode is set to The following protocols are supported: ' For example: ' Notes:
|
|
enableLicenseViolations |
Boolean |
Optional. Default Value: Notes:
|
|
enableSCA |
Boolean |
Optional. Default Value:
Note: Does not impact the behavior of SAST scans. |
|
exploitability |
Boolean |
Optional. Default Value: Additional information about exploitability is available in the designated Public Exploits page. |
|
javaVersion |
String |
Optional. Default Value: Available values: Note:
|
|
projectToken |
String |
Optional. Default Value: N/A. Adds the ability to map a GitHub repository to an existing Mend project. The value used needs to be the Mend project token. Note: Not supported in the repo-config.json file for Global Configuration. |
|
releaseBranches |
Array |
Optional. Default Value: N/A. Upon receiving a valid push to branches matching the releaseBranches value(s), the repository integration will trigger a scan on these branches, creating a check run with the scan results. A project within the Mend UI will also be created for each unique release branch, based on the branch's name. Example:
Notes:
|
|
repoNameSync |
Boolean |
Optional. Default Value: |
|
scanDependabotPR |
Boolean |
Optional. Default Value:
|
|
skipScanningStage |
Object |
Optional. Default Value: The available parameters are:
All package managers for which a pre-step is available can be specified, e.g., Usage example:
|
|
uaConfigMergeSetting |
String |
Optional. Default Value: Note: All other UA settings are always overridden on a local level. |
Check Run Settings (checkRunSettings)
Note: Mend for GitHub.com utilizes the GitHub Checks API that provides checks in commits and pull requests on any repository branch.
|
Parameter |
Type |
Description |
|---|---|---|
|
displayMode |
String |
Optional. Default Value:
Note: |
|
vulnerableCheckRunConclusionLevel |
String |
Optional. Default Value:
Note: If using a global configuration, see also global-config.json General Parameters. |
|
licenseCheckRunConclusionLevel |
String |
Optional. Default Value:
Note:
|
|
showWsInfo |
Boolean |
Optional. Default Value: Mend information is only displayed if the commit originated from a base branch. If the commit exists in multiple branches, the Mend information displayed will only represent the origin base branch (i.e. where the The following hidden JSON object will also be added inside the Check Run when this parameter is set to
|
|
useMendCheckNames |
Boolean |
Optional. Default Value:
Note: When a .whitesource file is created, the value of useMendCheckNames is |
|
strictMode |
String |
Optional. Default Value:
Note: For strictMode to work, the vulnerableCheckRunConclusionLevel and licenseCheckRunConclusionLevel parameters must be set to |
|
strictModeInfo |
Boolean |
Optional. Default Value:
|
|
strictModeCustomMessage |
String |
Optional. Default Value: Usage example:
Note:
|
|
failOnVulnerabilityMinCvss |
Float |
Optional. Default Value:
Usage example:
Note:
|
|
failOnVulnerabilityMinSeverity |
String |
Optional. Default Value:
Usage example:
Note:
|
|
pushLicenseCheck |
Boolean |
Optional. Default Value:
The CSV file includes the following columns:
Notes:
|
Release Branch Settings (releaseBranchSettings)
Notes:
-
From version 23.10.2 (November 6th, 2023), Release Branch Settings now allows separate scan settings for release branches. It can control independent configuration of failure rules, strict mode, and more, just for scans of release branches.
-
Release Branches must be enabled and defined in order to apply these settings
-
(Specifically for Release Branches) In all cases if the parameter inside
releaseBranchSettings.checkRunSettingsis different fromcheckRunSettings→ the former takes precedence.
|
Parameter |
Type |
Description |
|---|---|---|
|
checkRunSettings.failOnLicenseViolation |
Boolean |
Optional. Default Value:
|
|
checkRunSettings.showWsInfo |
Boolean |
Optional. Default Value: Mend information is only displayed if the commit originated from a base branch. If the commit exists in multiple branches, the Mend information displayed will only represent the origin base branch (i.e. where the The following hidden JSON object will also be added inside the Check Run when this parameter is set to
|
|
checkRunSettings.strictMode |
String |
Optional. Default Value:
Note: For strictMode to work, the vulnerableCheckRunConclusionLevel and licenseCheckRunConclusionLevel parameters must be set to |
|
checkRunSettings.failOnVulnerabilityMinCvss |
Float |
Optional. Default Value:
Usage example:
Note:
|
|
checkRunSettings.failOnVulnerabilityMinSeverity |
String |
Optional. Default Value:
Usage example:
Note:
|
An example of how to configure Release Branch Settings within the .whitesource file:
"releaseBranchSettings" : {
"checkRunSettings": {
"showWsInfo" : true,
"failOnLicenseViolation" : false,
"strictMode" : "none"
}
}
Issue Settings (issueSettings)
Note: From version 22.12.1 (January 2nd, 2022), you must trigger a new scan on the repository to see the Critical label for vulnerabilities for existing issues created by our repo integration. Without a new scan, even after the upgrade, the repo will continue to only show (High, Medium, Low) for existing Issues. For more information on the Critical setting, visit our documentation here.
|
Parameter |
Type |
Description |
|---|---|---|
|
minSeverityLevel |
String |
Optional. Default Value:
Note:
|
|
minVulnerabilityScore |
String |
Optional. Default Value: Note:
|
|
maxVulnerabilityScore |
String |
Optional. Default Value: Note:
|
|
displayLicenseViolations |
Boolean |
Optional. Default Value: Note: displayLicenseViolations is relevant only if enableLicenseViolations ( |
|
issueType |
String |
Optional. Default Value:
|
|
customLabels |
Array |
Optional. Default Value: N/A. Define labels that will be added to the GitHub Issues created after the scan. Usage example:
Following labels are not available for the use:
|
|
assignees |
Array |
Optional. Default Value: N/A. Define users that will be assigned to the GitHub Issues created after the scan. Usage example:
Note: Only users who are Collaborators with access to the repository and push permission can be added, |
Remediate Settings (remediateSettings)
|
Parameter |
Type |
Description |
|---|---|---|
|
enableRenovate |
Boolean |
Optional. Default Value
|
|
workflowRules |
Object |
Required. Default Value:
This parameter is used to specify the rules that regulate when to open remediation pull requests. Usage example:
|
|
workflowRules.enabled |
Boolean |
Required. Default Value: Note: Workflow rules can also be set in the Mend SCA application in the Admin → Integration Workflow Rules. But if this parameter is set to |
|
workflowRules.minVulnerabilitySeverity |
String |
Optional. Default Value: For example, if you set it to If Note: If this parameter is used together with minVulnerabilityScore and maxVulnerabilityScore, then only minVulnerabilitySeverity will have affect. |
|
workflowRules.minVulnerabilityScore |
Float |
Optional. Default Value: For more information on CVSS 3 Scores, click here. Note: If this parameter is used together with minVulnerabilitySeverity, it will not have any effect. |
|
workflowRules.maxVulnerabilityScore |
Float |
Optional. Default Value: For more information on CVSS 3 Scores, click here. Note: If this parameter is used together with minVulnerabilitySeverity, it will not have any effect. |
For more detailed configuration instructions, please refer to our Troubleshooting and Best Practices article “How to Configure Scan Settings in Mend Repository Integration?”.
Languages
Refer to the Mend Languages page in order to find out if your language and its extensions are supported.
Note: For information on scanning private dependencies, visit our Configure Mend for GitHub.com to resolve your private dependencies documentation.
Below are specific scenarios of language configurations for Mend for GitHub.com:
Python Support
The default Python version supported is 3.7.12. If you have a Python project with a version that is not compatible with the default, you can choose one of the following: 2.7.18, 3.6.15, 3.9.9, or 3.11. For this you will need to perform the following procedure:
-
Add a .whitesource configuration file to your repository. Alternatively, you can apply this globally across your repositories by using the Global Repo Configuration.
-
Use the configMode parameter and set it to either
LOCALorEXTERNAL. -
In the whitesource.config file, add the following:
python.invokePipAsModule=true python.path=python3.9 python.installVirtualenv=true
Note: For python.path, use one of the following values: 2.7, 3.6, 3.7, 3.8, 3.9, or 3.11.
R Support
The default CRAN Mirror URL used by the integration is https://cloud.r-project.org/ . If you need to change the CRAN Mirror URL, do as follows:
-
Add a .whitesource configuration file to your repository. Alternatively, you can apply this globally across your repositories by using the Global Repo Configuration.
-
Use the configMode parameter and set it to either LOCAL or EXTERNAL.
-
In the whitesource.config file, add the following parameter: r.cranMirrorUrl=<INSERT_URL_HERE>.
Supported Dependency Files
The following dependency files are supported for Mend for GitHub.com SCA scans:
-
bower.json
-
build.gradle
-
build.gradle.kts
-
build.sbt
-
conanfile.py
-
conanfile.txt
-
cargo.toml
-
composer.json
-
dependencies.scala
-
environment.yml
-
Gemfile.lock
-
glide.lock
-
go.mod
-
Godeps.lock
-
gogradle.lock
-
Gopkg.lock
-
gradle.lockfile
-
gradle.properties
-
libs.gradle
-
libs.versions.toml
-
package-lock.json
-
package.json
-
paket.dependencies
-
packages.config
-
packages.lock.json
-
packrat.lock
-
Pipfile
-
pipfile.lock
-
pnpm-lock.yaml
-
Podfile
-
poetry.lock
-
pom.xml
-
pubspec.yaml
-
pyproject.toml
-
requirements.txt
-
settings.gradle
-
setup.cfg
-
setup.py
-
vendor.conf
-
versions.kt
-
yarn.lock
-
Any metafile with one of the following extensions:
-
asp
-
aspx
-
config
-
csproj
-
do
-
gitmodules
-
htm
-
html
-
jsp
-
shtml
-
tf
-
xhtml
-
-
Cargo.lock