Skip to main content

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

Glossary
--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.

API Key
  • 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.

OAuth Client
  • 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

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

Glossary
---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.

Glossary
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

Glossary
---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: