Command Line Interface (CLI)¶
Installation¶
The solidpoint-cli service can be installed using the following instructions.
Importaint
All commands in the instructions are run by a user with the administrator permissions.
-
Add a repository. When adding it, you must enter a secret token to gain access.
-
Install the CLI using the package manager.
-
If multi-user mode is used, authenticate using the following command. Authentication is not required for single-user mode.
Environment variables¶
The solidpoint-cli service interacts with the environment variables listed in the table below. No default value is set for these variables, the values are set using the solidpoint-cli auth login command.
| Environment variable | Description |
|---|---|
SOLIDPOINT_BASE_URL |
The URL of the server part to connect to. By default, it is suggested to use https://cloud.solidpoint.net |
SOLIDPOINT_TOKEN |
A personal access token that is created in the dashboard. It is used for authentication |
Authentication¶
Authentication check is performed for every user command.
- If authentication is not required, command execution proceeds;
- If authentication is required, the
logincommand is automatically invoked in interactive mode. After successful authentication, the main command execution proceeds.
Example¶
❯ ./build/solidpoint-cli user list
You are not logged in. Redirecting to login...
SolidPoint instance URL: > http://localhost:8085
Email: > admin@solidpoint.local
Password:
User (admin@solidpoint.local) was successfully logged in
Re-running command...
Users:
[
...
]
Usage¶
The solidpoint-cli utility can be used as follows:
The following commands are available:
| Command | Description |
|---|---|
auth |
Authentication Management |
help |
Help for any command |
scan |
Manage scans |
scanner |
Manage scanners |
status |
CLI current status |
target |
Manage targets |
user |
Manage users |
The following flags are available:
-h,--help— help for thesolidpoint-cliutility.
auth command¶
The auth command allows to manage authentication. It can be used as follows:
The following commands are available:
| Command | Desсription |
|---|---|
login |
Logs in to the system. |
logout |
Logs out of the system. |
register |
Registers the user in the system. |
The following commands are available:
-h,--help— help for theauthcommand.
login command¶
The login command is used to log in to the system.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-b, --base-url |
string | SolidPoint instance URL |
-e, --email |
string | User email |
-h, --help |
- | Help for the login command |
-i |
- | Interactive mode |
-p, --password |
string | User password |
Examples of usage¶
-
Login in the interactive mode:
-
Login without interactive mode:
logout command¶
The logout command is used to log out of the system.
Usage¶
Flags¶
-h,--help— help for thelogoutcommand.
register command¶
The register command is used to register the user in the system.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-c, --company |
string | User company name |
-e, --email |
string | User email |
-h, --help |
- | Help for the register command |
-i, --interactive |
- | Interactive mode |
-n, --name string |
string | User name |
-o, --occupation string |
string | User occupation |
-p, --password |
string | User password |
-t, --tenant string |
string | Tenant name |
Example of usage¶
-
Register in the interactive mode:
-
Register without interactive mode:
help command¶
The help command provides help for any application command. It can be used as follows:
The following flags are available:
-h,--help— help for thehelpcommand.
scan command¶
The scan command allows to manage scans. It can be used as follows:
The following commands are available:
| Command | Desсription |
|---|---|
cancel |
Terminates the scan. |
new |
Starts a new scan. |
new-ci |
Starts a new scan for continuous integration. |
show-app-auth |
Provides information about the scanned application's authentication. |
status |
Displays the scan status. |
The following flags are available:
-h,--help— help for thescancommand.
cancel command¶
The cancel command terminates the scan.
Usage¶
Flags¶
-h,--help— help for thecancelcommand.
new command¶
The new command starts a new scan.
Usage¶
Flags¶
| Flags | Type | Desсription |
|---|---|---|
-h, --help |
- | Help for the new command |
-m, --module |
strings | Scanning module |
-i, --targetID |
uint32 | Target ID |
-u, --url |
string | The URL of the application being scanned |
Examples of usage¶
-
Start scanning using the
-iflag:
-
Start scanning using the
-uflag:
-
Start scanning with the specified modules:
new-ci command¶
The new-ci command starts a new scan for continuous integration. The scan status is broadcasted in real time. The command terminates with a non-zero return code if at least one issue has been found.
Usage¶
Flags¶
| Flags | Type | Desсription |
|---|---|---|
-h, --help |
- | Help for the new-ci command |
-m, --module |
strings | Scanning module |
-s, --severity |
string | Severity level of the issue. If the specified value is detected, scan will be completed with an error. Valid values: info, low, medium, high, critical. |
-i, --targetID |
uint32 | Target ID |
-u, --url |
string | The URL of the scanned application |
Examples of usage¶
-
Start scanning using the
-iflag:
-
Start scanning using the
-uflag:
-
Start scanning with a specified severity level value:
-
Start scanning for continuous integration with the specified modules:
show-app-auth command¶
The show-app-auth command shows information about the scanned application's authentication.
Usage¶
Flags¶
-h,--help— help for theshow-app-authcommand.
Examples of usage¶
-
Request for authentication information (
scan_id= 1):
status command¶
The status command displays the scan status.
Usage¶
Flags¶
-d,--detailed— detailed description of issues.-h,--help— help for thestatuscommand.
Examples of usage¶
-
Request for scan status (
scan_id= 1):
scanner command¶
The scanner command allows to manage scanners. It can be used as follows:
The following commands are available:
| Command | Description |
|---|---|
new |
Creates new scanner |
info |
Shows information about scanner (parameters and modules) |
enable |
Enables scanner |
disable |
Disables scanner |
The following flags are available:
-h,--help— help for thescannercommand.
new command¶
The new command creates a new scanner.
Usage¶
Flags¶
| Flag | Type | Description |
|---|---|---|
-a, --address |
string | Specifies the address of the scanner |
-n, --name |
string | Specifies the name of the scanner |
-i, --interactive |
- | Allows to use the command interactively |
-h, --help |
- | Help for the new command |
info command¶
The info command shows information about the scanner (parameters and modules).
Usage¶
Flags¶
-h,--help— help for theinfocommand.
enable command¶
The enable command enables the scanner.
Usage¶
Flags¶
-h,--help— help for theenablecommand.
disable command¶
The disable command disables the scanner.
Usage¶
Flags¶
-h,--help— help for thedisablecommand.
status command¶
The status command displays the current status of the CLI. It can be used as follows:
The following flags are available:
-h,--help— help for thescancommand.
target command¶
The target command allows to manage targets. It can be used as follows:
The following commands are available:
| Command | Desсription |
|---|---|
clear-app-auth |
Deletes the authentication data of the target application. |
new |
Creates a new target. |
show-app-auth |
Shows information about the target application's authentication. |
update |
Updates a target or targets. |
The following flags are available:
-h,--help— help for thetargetcommand.
clear-app-auth command¶
The clear-app-auth command deletes the authentication data for the target application.
Usage¶
Flags¶
-h,--help— help for theclear-app-authcommand.
Examples of usage¶
-
Delete authentication data for the target application with
target_id= 1 :
new command¶
The new command creates a new target.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-d, --description |
string | Target description |
-h, --help |
- | Help for the new command |
-i, --interactive |
- | Interactive mode |
-n, --name |
string | Target name |
-u, --url |
string | Target URL |
Examples of usage¶
-
Create target in the interactive mode:
-
Create target without interactive mode:
show-app-auth command¶
The show-app-auth command shows information about the target application's authentication.
Usage¶
Flags¶
-h,--help— help for theshow-app-authcommand.
Examples of usage¶
-
Get information about the authentication of the target application with
target_id= 1:
update command¶
The update command updates the target or targets.
Usage¶
Commands¶
| Command | Description |
|---|---|
app-auth |
Updates the target application's authentication |
auth-checker |
Updates configuration of authentication check mechanism |
browser-auth-refresher |
Updates configuration of authentication refresh mechanism using a browser script |
regexp-auth-refresher |
Updates configuration of authentication refresh mechanism using an HTTP request |
app-auth command¶
The app-auth command updates the authentication data of the target application.
Usage¶
Use the following commands and the corresponding flags to select the desired authentication type and parameters for the app-auth command:
| Command | Desсription | Flags |
|---|---|---|
cookies |
Updates authentication using cookies of the target application. The number of host names and cookies must be equal, an empty hostname means that the cookie contains the name of the target host. To pass a path it must be specified by the hostname: test.test + /test = test.test/test parameter. By default, this command rewrites all cookies. To add cookies, use the -a (--add) flag. The -r (--rewrite) flag rewrites all application authentication data using cookies only |
-a, --add — add -v, --cookie string — cookie -h, --help — help for cookies -n, --hostname string — host name -r, --rewrite — rewrite |
headers |
Updates authentication using headers. The number of nodes and headers must be equal, an empty node means that the host node will be specified in the header. To pass a path, it must be specified by the host: test.test + /test = test.test/test OR test.test:5000 + /test = test.test:5000/test parameter. By default, this command rewrites all authentication headers of the target application. To add headers, use the -a (--add) flag. The -r (--rewrite) flag rewrites all application authentication data using headers only |
-a, --add — add -v, --header string — header -h, --help — help for headers -n, --hostname string — host name -r, --rewrite — rewrite |
http-basic-auth |
Updates authentication using basic HTTP authentication. To add basic HTTP authentication, use the -a (--add) flag. The -r (--rewrite) flag rewrites all application authentication data using basic HTTP authentication only |
-a, --add — add -h, --help — help for http-basic-auth -r, --rewrite — rewrite |
tls |
By default, this command rewrites the authentication of all target applications over the TLS protocol. To add TLS application authentication, use the -a (--add) flag. The -r (--rewrite) flag rewrites all application authentication data using only TLS application authentication |
-a, --add — add; -c, --certificate string — certificate file; -h, --help — help for tls; -k, --key string — the key file -r, --rewrite — rewrite |
Flags¶
-h,--help— help for theapp-authcommand.
Examples of usage¶
-
ewrite or add cookies to authenticate the target application:
-
Add a cookie to authenticate the target application:
-
Rewrite or add a cookie to authenticate the target application with the host name:
-
Rewrite or add a cookie to authenticate the target application, specifying the host and path:
-
Rewrite or add a cookie to authenticate the target application with multiple hosts and paths:
-
Overwrite the authentication data of the target application using only cookies:
-
Rewrite or add authentication headers for the target application:
-
Add authentication headers for the target application:
-
Add authentication headers for the target application using host:
-
Add authentication headers for the target application specifying the node and path:
-
Add authentication headers for the target application specifying multiple nodes and paths:
-
Rewrite the authentication data of the target application using only headers:
-
Rewrite or add basic HTTP authentication of the target application:
-
Add basic HTTP authentication of the target application:
-
Rewrite the authentication data of the target application using only basic HTTP authentication:
-
Rewrite or add TLS authentication of the target application:
-
Add TLS authentication of the target application:
-
Rewrite the authentication data of the target application using TLS only:
auth-checker command¶
the auth-checker command updates the configuration of the authentication check mechanism.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-c, --config |
string | JSON configuration |
-e, --enabled |
boolean | Enables authentication check mechanism |
-f, --file |
string | Path to configuration file |
-h, --help |
- | Help for auth-checker command |
-r, --rewrite |
string | Overwrites configuration data, ignoring any existing values, or completely removes them |
Examples of usage¶
-
Update the authentication check mechanism configuration using a JSON object:
-
Update the authentication check mechanism configuration using a JSON file:
-
Enable authentication check:
-
Disable authentication check:
-
Update the authentication check mechanism configuration and enable authentication check:
-
Delete the authentication check mechanism configuration:
browser-auth-refresher command¶
Updates the configuration of the authentication refresh mechanism using a browser script.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-c, --config |
string | JSON configuration |
-e, --enabled |
boolean | Enables the authentication refresh mechanism using a browser script |
-f, --file |
string | Path to configuration file |
-h, --help |
- | Help for browser-auth-refresher |
-r, --rewrite |
string | Overwrites configuration data, ignoring any existing values, or deletes them entirely |
Examples of usage¶
-
Update the configuration of the authentication refresh mechanism using a browser script with a JSON object:
-
Update the configuration of the authentication refresh mechanism using a browser script with a JSON file:
-
Enable authentication refresh:
-
Disable authentication refresh:
-
Update the configuration of the authentication refresh mechanism using a browser script and enable authentication refresh.:
-
Delete the configuration of the authentication refresh mechanism using a browser script:
regexp-auth-refresher command¶
Updates the configuration of the authentication refresh mechanism using an HTTP request.
Usage¶
Flags¶
| Flags | Type | Description |
|---|---|---|
-c, --config |
string | JSON configuration |
-e, --enabled |
boolean | Enables the authentication refresh mechanism using an HTTP request |
-f, --file |
string | Path to configuration file |
-h, --help |
- | Help for regexp-auth-refresher command |
-r, --rewrite |
string | Overwrites configuration data, ignoring any existing values, or deletes them entirely |
Examples of usage¶
-
Update the configuration of the authentication refresh mechanism using an HTTP request with a JSON object:
-
Update the configuration of the authentication refresh mechanism using an HTTP request with a JSON file:
-
Enable authentication refresh:
-
Disable authentication refresh:
-
Update the configuration of the authentication refresh mechanism using an HTTP request and enable authentication refresh:
-
Delete the configuration of the authentication refresh mechanism using an HTTP request and enable authentication refresh:
user command¶
The user command allows to manage users. It can be used as follows:
The following commands are available:
| Command | Desсription |
|---|---|
activate |
Activates a single user |
activate-all |
Activates all users |
list |
Displays a list of users |
The following flags are available:
-h,--help— help for theusercommand.
activate command¶
Usage¶
Flags¶
| Flags | Type | Desсription |
|---|---|---|
-h, --help |
- | Help for the activate command |
-i, --interactive |
- | Interactive input |
-r, --role |
string | Assigns users a role from the list: user (default), admin, superAdmin |
-t, --tenant |
string | Tenant ID or name (may be empty for the default tenant) |
-u, --user |
string | User's ID or email |
Examples of usage¶
-
Interactive input:
-
User activation by ID:
-
User activation by email:
-
Activation of a user by ID in a certain tenant with a certain role (tenant —
test, role —admin):
-
Activation of a user by email in a certain tenant with a certain role (tenant —
test, role —admin):
activate-all command¶
All users in all tenants will be activated if the tenant is not specified or is empty. If the tenant does not have a name by default and it is necessary to activate all users in it, the ID should be specified.
All users in a particular tenant will be activated if the tenant is specified or is not empty.
Usage¶
Flags¶
| Flags | Desсription |
|---|---|
-h, --help |
Help for the activate-all command |
-i, --interactive |
Interactive input |
-r, --role string |
Assigns users a role from the list: user (default), admin, superAdmin |
-t, --tenant string |
Tenant ID or name (may be empty for the default tenant) |
Examples of usage¶
-
Interactive input:
-
Activation of all users in all tenants:
-
Activation of all users in the tenant by default:
-
Activation of all users in a certain tenant (tenant —
test):
-
Activation of all users in a certain tenant with a certain role (tenant —
test, role —user):
list command¶
Usage¶
Flags¶
| Flags | Desсription |
|---|---|
-h, --help |
Help for the list command |
-r, --role string |
User role from the list: user, admin, superAdmin, unknown |
-t, --tenant string |
Tenant's ID or name |
Examples of usage¶
-
List of all users in all tenants:
-
A list of all users with a defined role (role —
unknown):
-
A list of all users in a certain tenant (tenant —
test):
-
A list of all users in a certain tenant with a certain role (tenant —
test, role —unknown):