Skip to main content

Checkmarx SCA Resolver Configuration Arguments

Most Checkmarx SCA Resolver configuration parameters can be submitted either as command line arguments or by editing the configuration.yml file.

Notice

Certain parameters must be submitted via the config file. Therefore, it is mandatory to include the configuration.yml file (which is included in the Checkmarx SCA Resolver download) in the same folder as the ScaResolver binary.

Note

The info provided on this page relates to running Resolver as a standalone tool. If you are running Resolver via an external platform such as the Checkmarx One CLI tool or plugins, or the CxSAST/CxSCA CLI tool or plugins, then only Offline arguments can be used. In addition, the mandatory arguments differ for different platforms. See the relevant SAST/SCA Integrations documentation for details.

Configuration.yml file Specifications

The configuration file must be located in the same folder as the ScaResolver binary.

The configuration file has the format of KeyName: Value.

The file must follow the yaml file format specification.

Configuration.ini file Specifications (Deprecated)

The configuration file must be located in the same folder as the ScaResolver binary.

The configuration file has the format of KeyName=Value.

A new line separates between key-value pairs.

Warning

This format for configuration files has been deprecated since the release of version 1.14. Once version 2.0 is released (scheduled for end of February) this format won't be supported. Please make sure to migrate the configuration files in all of your environments to the yaml format by that time.

Configuration Arguments - Tables and Samples

Config

Argument Name

Config file key

Description

Used in mode

Default value

Scan Path

-s| --scan-path

N/A

Path to a target directory to scan.

Online, Offline

-

Project Name

-n| --project-name

ProjectName

To scan an existing SCA Project, enter the Project name. Alternatively, you can enter a new Project name in order to create a new Project in SCA.

All

-

Account

-a| --account

Account

Your SCA account a name.

Online, Upload

-

Username1]

-u| --username

Username

Your username for the SCA account.

Online, Upload

-

Password1]

-p| --password

Password

The password for your SCA user account.

Tip

An Environment Variable can be used for the password. This is preferable to including a password in clear text in the config file.

Online, Upload

-

Provider name1]

--sso-provider

SsoProviderName

The name of your SSO provider. For more info see SAML Authentication for Checkmarx SCA Resolver

Online, Upload

-

Server URL2]

--server-url

ServerUrl

The URL of the SCA API server.

Online, Upload

https://api-sca.checkmarx.net

Authentication Server URL2

--authentication-server-url

AuthenticationServerUrl

The URL of the SCA Access Control server.

Online, Upload

https://platform.checkmarx.net

Logs Directory3]

N/A

LogsDirectory

The default name assigned the logs directory.

logs

SCA Application URL3]

--sca-app-url

ScaAppUrl

The URL of the SCA web application.

Online, Upload

https://sca.checkmarx.net

Path to save ScaResolver results

-r|--resolver-result-path

ResolverResultPath

Specify the path to the directory/file where the resolver results will be saved (for future upload).

Offline

-

Path to read ScaResolver results

-r|--resolver-result-path

ResolverResultPath

Specify the path to the file of the saved resolver results that you are uploading.

Upload

-

1] Authentication is done either using your Checkmarx SCA credentials, or via your SSO provider. Therefore, you are required to submit either -u| --username and -p| --password or --sso-provider but not both.

2] The default values for Server URL and Authentication Server URL are preconfigured in the config file, making it unnecessary to submit these arguments in the CLI.

3] The default value for Logs Directory is preconfigured in the config file. There is no argument for adjusting this value in the CLI.

Samples using mandatory arguments:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -n MyApp -a Checkmarx -u jack -p "demo123!"

Config

Argument Name

Config file key

Description

Used in mode

Default value

Add tags to project

--project-tags

N/A

Comma separated tags to be assigned to the project. Tags can be simple string or key:value.

Online/Upload

None

Add tags to scan

--scan-tags

N/A

Comma separated tags to be assigned per scan. Tags can be simple string or key:value.

Online/Upload

None

Break on manifest failure

--break-on-manifest-failure

BreakOnManifestFailure

When this flag is used, the scan will fail and error code 9 will be returned when resolution fails for one or more of the manifest files.

Online/Offline

False

Bypass exit code

--bypass-exitcode

BypassExitCode

If set as “true”, exit code will be overridden and set as 0, enabling it to pass through the CI/CD pipeline.

All

False

Change configuration file

-c| --config-path

N/A

Changes the cofig file used for the scan.

All

Configuration.ini

Disable default exclusions

--override-default-excludes

OverrideDefaultExcludes

When this is set, the only folders and files that are excluded are those specified in the --excludes flag.

Offline, Online

false

Disable manifest upload

--no-upload-manifest

N/A

When this argument is set, the manifest files are not uploaded to Checkmarx SCA Cloud.

Tip

Preventing manifest upload doesn’t interfere with the effectiveness of the scan, but it may limit Checkmarx SCA’s ability to suggest precise mitigation actions.

Online

False (i.e., manifest files are uploaded)

Excludes

-e| --excludes

ExcludePatterns

Specify file and folder patterns to be excluded from the zip file that will be scanned.

See examples below.

Tip

Using this argument adds to the list of exclusions, it does not override the default exclusions.

Online, Offline

Default excluded folders:

node_modules,

bower_components,

.git,

vendor,

Carthage

Extensions to be extracted

--extract-archives

N/A

Submit comma separated archives extensions to be extracted.

Tip

When you use the argument to add custom file types, that overrides the default types. If you want these types to be extracted, you must include them in the comma separated list.

Online, Offline

“.zip, .ear, .war”

Extraction depth level

--extract-depth

N/A

The depth level of file extraction.

Tip

Increasing the depth level increases the accuracy of the results, but it also significantly increase the scan time.

Tip

This flag is relevant only for packages identified by unpacking archive files (e.g., .jars, .wars etc.), not for those identified via manifest files.

Online, Offline

1

Gradle Dev Scopes

--gradle-dev-scopes

N/A

Gradle user defined dev dependencies scopes.

Online, Offline

None

Gradle Excluded Submodules

--gradle-ignore-modules

N/A

Ignore Gradle sub-modules.

Online, Offline

None

Gradle Exclude Scopes

--gradle-exclude-scopes

N/A

Gradle dependencies excluded scopes.

Online, Offline

None

Gradle Include Modules

--gradle-include-modules

N/A

Gradle include only desired project submodules.

Online/Offline

None

Gradle Include Scopes

--gradle-include-scopes

N/A

Gradle dependencies included scopes.

Online, Offline

None

Gradle Plugin Scopes

--gradle-plugin-scopes

N/A

Gradle user defined plugin scopes.

Online, Offline

None

Ignore Dev Dependencies

--ignore-dev-dependencies

IgnoreDevDependencies

Ignores dev dependencies in the pre-scan stage.

Online, Offline

False

Images to scan

--images

N/A

Specify the container images to be scanned as a comma separated list.

Tip

When this flag is used, the --scan-containers flag is also required.

Online/Offline

None

Ivy report target

--ivy-report-target

N/A

Specify the target name for the target for writing reports when resolving dependencies in Ivy.

Tip

If this flag is used, the “Path to save Ivy reports” flag must also be set.

Online, Offline

False

Log Level

--log-level

LogLevel

This value sets the lowest threshold for log messages.

Enter one of the following enum values:

Verbose, Debug, Information, Warning, Error, Fatal

All

Information

Maximum attempts to check scan status

N/A

ScanReportMaxRetries

The maximum number of requests sent to check the status of the scan.

All

2147483647

Path to nuget CLI executable

--nugetcli-path

NugetCliPat

Specify the path to nuget CLI executable to be used.

Online, Offline

False

Path to project’s manifest

--manifests-path

ManifestsPath

When this argument is set, the manifest file in the specified path is uploaded to Checkmarx SCA Cloud.

Upload

When this flag isn’t used, no manifest file is uploaded.

Path to save Ivy reports

--ivy-report-files-dir

N/A

Specify the todir for writing reports when resolving dependencies in Ivy.

Tip

If this flag is used, the “Ivy report target” flag must also be set.

Online, Offline

False

Project Teams

-t| --project-teams

N/A

Comma separated list of teams to assign to a newly created project. If the project exists, this is ignored.

The full team hierarchy should be given, e.g: /CxServer/Team01/Team01a

Team path should be prefixed by forward slash: /

Online, Upload

Project will be accessible to all users

Proxy

--proxies

N/A

The proxy to be used for making internet requests. You can enter comma separated proxies for HTTP and HTTPS. You can also include authentication credentials for HTTPS. See You

Online/Offline

None

Python version

--python-version

PythonVersion

Specify the Python version to be used for package resolution.

Enter one of the following enum values:

V2 or V3

Online, Offline

V3

Run containers scan

--scan-containers

N/A

Scan the Dockerfiles in your project to identify the container images used in your project. See Container Scans

Online/Offline

False

Save resolved dependency output

--save-evidence-path

N/A

Saves evidence of the resolved dependencies, which is helpful for troubleshooting. You need to specify the path to the directory where you want the output to be saved.

Online

None

Severity Threshold

--severity-threshold

SeverityThreshold

The vulnerability severity level from which

to return an error exit code. Enter one of the following enum values: Low, Medium, High or None (do not test)

Online, Upload

None

Time between scan report requests

N/A

ScanReportWaitForFinishDelayInSeconds

Time in seconds before resending request for the scan’s risk-report.

Online, Upload

5

Use Syft

--use-syft

N/A

Should use Syft for images packages resolution.

Online/Offline

False

Version

-v| --version

N/A

Prints the version to console output.

All

-

Version of pipdeptree

N/A

PipDepTreeVersion

Specify the version of pipdeptree to be used for packager resolution.

Online/Offline

None

Version of pipdeptree

N/A

PipDepTreeVersion

Specify which version of pipdeptree should be used.

Online/Offline

None

Samples using some optional arguments:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --log-level Debug --save-evidence-path ./evidences.json --extract-archives zip,ear --extract-depth 3 --gradle-exclude-scopes api,testCompile

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -a Checkmarx -u jack -p “demo123!” --log-level Debug --save-evidence-path ./evidences.json --extract-archives zip,ear --extract-depth 3 --gradle-exclude-scopes api,testCompile

Sample of folder exclusions:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' -e '*project2*,*project 3*'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -a Checkmarx -u jack -p “demo123!” -e "*project2*,*project 3*"

Sample of file exclusions:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' -e '*.ext1,*file name.ext2'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -a Checkmarx -u jack -p “demo123!” -e "*.ext1,*file name.ext2"

Sample of tags:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --project-tags "Dev" --scan-tags "version:0.2"-e '*.ext1,*file name.ext2'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -a Checkmarx -u jack -p “demo123!” --project-tags "Dev" --scan-tags "version:0.2"

Notice

The custom parameters enable you to add additional parameters to the scan command. They do not override the package manager flag commands that are built into the Checkmarx SCA Resolver.

Config

Argument Name

Config file key

Description

Used in mode

Gradle Custom Parameters

--gradle-parameters

None

Parameters to be appended to Gradle package manager directly

Online, Offline

Bower Custom Parameters

--bower-parameters

None

Parameters to be appended to bower package manager directly

Online, Offline

Composer Custom Parameters

--composer-parameters

None

Parameters to be appended to composer package manager directly

Online, Offline

Lerna Custom Parameters

--lerna-parameters

None

Parameters to be appended to lerna package manager directly

Online, Offline

NPM Custom Parameters

--npm-parameters

None

Parameters to be appended to npm package manager directly

Online, Offline

Nuget Custom Parameters

--nuget-parameters

None

Parameters to be appended to nuget package manager directly

Online, Offline

Pip Custom Parameters

--pip-parameters

None

Parameters to be appended to pip package manager directly

Online, Offline

Sbt Custom Parameters

--sbt-parameters

None

Parameters to be appended to sbt package manager directly

Online, Offline

Yarn Custom Parameters

--yarn-parameters

None

Parameters to be appended to yarn package manager directly

Online, Offline

Maven Custom Parameters

--maven-parameters

None

Parameters to be appended to maven package manager directly

Online, Offline

Ivy Custom Parameters

--ivy-parameters

None

Parameters to be appended to Ivy package manager directly

Online, Offline

CocoaPods Custom Parameters

--cocoapods-parameters

None

Parameters to be appended to CocoaPods package manager directly

Online, Offline

Notice

All custom parameters are not mandatory.

Sample using custom arguments:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --gradle-parameters='-pUSERNAME=abc -pPASSWORD=cba'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -n MyApp -a Checkmarx -u jack -p “demo123!” --gradle-parameters="-pUSERNAME=abc -pPASSWORD=cba"

Config

Argument Name

Config file key

Description

Enums

Used in mode

Default value

Report Path

--report-path

None

Specify the path to the location where the Report will be saved.

-

Online, Upload

reports

Report Type

--report-type

None

You can use this flag to generate a report. There are two types of reports:

  • Risk Report - A comprehensive report of the risks identified by Checkmarx SCA.

  • CycloneDx - A Software Bill of Materials (SBOM) report using the CycloneDx format.

  • Risk

  • CycloneDx

  • None

Online, Upload

None

Report Content

--report-content

None

Specify the type of content that will be included in the report.

  • All

  • Packages

  • Vulnerabilities

  • Licenses

Online, Upload

All

Report Extension

--report-extension

None

Specify the file type of report.

Note: You can specify multiple (comma separated) extension types in order to generate files of each type.

Note: CycloneDx reports must be in Json or Xml format.

  • Json

  • Xml

  • Csv (saved as zip with multiple Csv files)

  • Pdf

Online, Upload

Json

Risk Report sample:

Linux/MacOS

./ScaResolver -s /Users/DemoUser/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --report-extension Pdf,Json,Csv --report-type Risk

Windows

./ScaResolver.exe -s C:\Users\DemoUser\MyApp -n MyApp -a Checkmarx -u jack -p "demo123!" --report-extension Pdf,Json,Csv --report-type Risk

You can generate an SBOM Report in json or xml format when running a scan using Checkmarx SCA Resolver (version 1.5.52+).

SBOM Report sample:

Linux/MacOS

./ScaResolver -s /Users/DemoUser/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --report-extension Xml,Json --report-type CycloneDx

Windows

./ScaResolver.exe -s C:\Users\DemoUser\MyApp -n MyApp -a Checkmarx -u jack -p "demo123!" --report-extension Xml,Json --report-type CycloneDx

To run a scan using the Exploitable Path feature, in addition to the regular mandatory arguments, you also need to add the following arguments, see Exploitable Path (BETA).

Note

Attributes marked as Mandatory in this table, are mandatory only when running an Exploitable Path scan. When running an Exploitable Path scan in Upload mode, you can either include the attributes that specify the account and Project info or the path to the result file.

Config

Argument Name

Config file key

Description

Mandatory

Used in

Default value

SAST Authentication server username

--cxuser

SastUserName

Your username for the SAST Authentication server

YES

All

-

SAST Authentication server password

--cxpassword

SastPassword

Your password for the SAST Authentication server

YES

All

-

SAST Project ID

--cxprojectid

SastProjectId

The ProjectId of the Project that you created in SAST for running the SCA Exploitable Path feature.

Either the Project ID or the Project name is mandatory.

All

-

SAST Project name

--cxprojectname

SastProjectName

The Project name of the Project that you created in SAST for running the SCA Exploitable Path feature.

Either the Project ID or the Project name is mandatory.

All

-

SAST Server endpoint

--cxserver

SastServer

Your CxServer endpoint.

e.g., https://checkmarxServer/

YES

All

-

Path to save SAST results

--sast-result-path

SastResultPath

Specify the path to the directory/file where the SAST results will be saved (for future upload).

YES (for Offline mode)

Offline

false

Path to read SAST results

--sast-result-path

SastResultPath

Specify the path to the file of the saved SAST results that you are uploading.

For Upload mode, either this attribute with the path to the result file or info about the account and Project is mandatory.

Upload

false

Time period to check for SAST results

N/A

OldResultsThresholdMinutes

The time period for which SAST results will be checked. If multiple results exist, the most recent will be used.

Note: there is no CLI argument for this parameter, so it must be set in the config file.

NO

All

144000

Timeout for sending request to SAST

N/A

EngineResultsReceiveTimeOutMinutes

Maximum time to wait to send the request to the SAST engine.

NO

All

2 min.

Timeout for receiving response from SAST

N/A

EngineResultsReceiveTimeOutMinutes

Maximum time to wait to receive the results from the SAST engine.

NO

All

15 min.

Sample using Exploitable Path:

Linux/MacOS

./ScaResolver -s /home/jack/src/MyApp -n MyApp -a Checkmarx -u jack -p 'demo123!' --cxuser bob --cxpassword 'demoabc!' --cxprojectname DemoCxProject --cxserver 'https://checkmarxServer'

Windows

./ScaResolver.exe -s C:\home\jack\src\MyApp -a Checkmarx -u jack -p "demo123!" --cxuser bob --cxpassword "demoabc!" --cxprojectname DemoCxProject --cxserver "https://checkmarxServer"