- Checkmarx Documentation
- Checkmarx One
- Checkmarx One CLI Tool
- Checkmarx One CLI Commands
- configure
configure
The configure
command is used for Managing Checkmarx One scan configurations.
The configure
command can be used by itself or with a sub-command. When used by itself, it initiates a series of prompts which ask you to submit the authentication parameters.
Usage
./cx configure [command] [flags]
Help
- --help, -h
Help for the configure command.
Configure Commands
configure
can be used with the following commands:
configure (prompt)
The configure
command initiates a series of prompts for configuring the CLI authentication credentials. The configurations are saved in a config file in the user's home directory under a subdirectory named ($HOME/.checkmarx).
Notice
If you would like to set additional configuration parameters that are not related to authentication, then you need to use the configure set
command.
Required Parameters
The following parameters are required for authentication, depending on the method being used. When the CLI prompts for values that aren't required for your authentication method, you can just hit ENTER.
cx_apikey
Notice
The CLI automatically extracts all relevant account info (Base URL, Auth URL, Tenant name) from the API Key. You can use arguments to submit these values explicitly, overriding the extracted values. However, this is generally not recommended.
cx_base_uri
cx_base_auth_uri
cx_tenant
cx_client_id
cx_client_secret
CLI Authentication Parameters
The configure command prompts for the following authentication parameters
AST Base URI - The base URL of your Checkmarx One environment.
US Environment - https://ast.checkmarx.net
US2 Environment - https://us.ast.checkmarx.net
EU Environment - https://eu.ast.checkmarx.net
EU2 Environment - https://eu-2.ast.checkmarx.net
DEU Environment - https://deu.ast.checkmarx.net
Australia & New Zealand – https://anz.ast.checkmarx.net
India - https://ind.ast.checkmarx.net
Singapore - https://sng.ast.checkmarx.net
UAE - https://mea.ast.checkmarx.net
Israel - https://gov-il.ast.checkmarx.net
AST Base Auth URI - The base URI of the authentication server for you Checkmarx One environment.
US Environment - https://iam.checkmarx.net
US2 Environment - https://us.iam.checkmarx.net
EU Environment - https://eu.iam.checkmarx.net
EU2 Environment - https://eu-2.iam.checkmarx.net
DEU Environment - https://deu.iam.checkmarx.net
Australia & New Zealand – https://anz.iam.checkmarx.net
India - https://ind.iam.checkmarx.net
Singapore - https://sng.iam.checkmarx.net
UAE - https://mea.iam.checkmarx.net
AST Tenant - The name of you Checkmarx One tenant account.
Do you want to use API Key authentication? - Specify your authentication method. Y = API Key, N = OAuth client
AST API Key - Your Checkmarx One API Key. See Generating an API Key
Checkmarx One Client ID - Your Checkmarx One OAuth client ID. See Creating an OAuth Client for Checkmarx One Integrations
Client Secret - Your Checkmarx One OAuth secret.
Usage Example
C:\ast-cli_2.0.55_windows_x64>cx configure Setup guide: https://checkmarx.com/resource/documents/en/34965-68621-checkmarx-one-cli-quick-start-guide.html AST Base URI [https://eu.ast.checkmarx.net/]: https://ast.checkmarx.net/ AST Base Auth URI (IAM) [https://eu.iam.checkmarx.net/]: https://iam.checkmarx.net/ AST Tenant [ast_integration_tenant_eu]: myTenant Do you want to use API Key authentication? (Y/N): n Checkmarx One Client ID []: myOAuthClient Client Secret []: myOAuthSecretuser@laptop:/ast$ ./cx.exe configure Setup guide: https://checkmarx.atlassian.net/wiki/x/mIKctw
configure set
The configure set
command is used for setting configuration properties. For each parameter (property) that you would like to set, you need to specify the property name and the value that you would like to assign to that property.
Usage
./cx configure set --prop-name <property name> --prop-value <property value>
Flags
- ---help, -h
Help for the configure command.
- --prop-name <string>
Name of property set.
- --prop-value <string>
Value of property set.
Properties
The following is a list of properties that can be set. Certain authentication properties are required, depending on your authentication method (API Key or OAuth client), see Configuring the Checkmarx One CLI.
- cx_apikey
An API Key to login to the Checkmarx One server.
- cx_base_auth_uri
The URL of the Checkmarx One User Management server.
- cx_base_uri
The URL of the Checkmarx One server.
- cx_client_id
The client ID that is used for client authentication.
- cx_client_secret
The client secret that is used for client authentication.
- cx_http_proxy
An alternative method for specifying an optional proxy server. This enables users to designate a specialized proxy for use with Checkmarx One that doesn't affect the proxy used for other applications. When this is used it overrides the value of
http_proxy
.- cx_ignore_proxy
Set this environment variable as
true
in order to ignore any proxies configured in your system, so that all Checkmarx One CLI commands run directly from your local machine. Alternatively, this can be done by using the global flag--ignore-proxy
.- cx_tenant
The customer's tenant name.
- http_proxy
An optional proxy server configuration.
- sca-resolver
The path to a correctly configured SCA resolver executable.
Examples
Setting the cx_base_uri Property
# Setting the Checkmarx One server URI user@laptop:~/ast-cli$ ./cx configure set --prop-name cx_base_uri --prop-value https://eu.ast.checkmarx.net/ Setting property [ cx_base_uri ] to value [ https://eu.ast.checkmarx.net/ ]
configure show
The configure show
command is used for retreiving the configuration properties for the current profile.
Usage
./cx configure show [flags]
Flags
- ---help, -h
Help for the configure command.
Examples
Presenting all the Configuration Parameters Values
ophir@OphirS-Laptop:~/ast-cli$ ./cx configure show Current Effective Configuration BaseURI: https://eu.ast.checkmarx.net/ BaseAuthURIKey: https://eu.iam.checkmarx.net/ Checkmarx One Tenant: MyTenant Client ID: MyClientID Client Secret: ******cert APIKey: Proxy: