...
The Mend Command Line Interface (WS CLI) is a tool that enables you to detect the security vulnerabilities and compliance data related to the open-source components within your development projects using a command-line shell. With a minimal configuration, the WS CLI enables you to start scanning your projects in your favorite terminal program:
...
macOS amd64
Linux amd64
Windows amd64
Installing
...
the CLI
Linux
Run the following command:
Code Block |
---|
sudo curl "http://downloads.Mendsoftwarewhitesourcesoftware.com/ws-cli/master/latest/ws-cli-linux-amd64/ws" -o "/usr/local/bin/ws" && sudo chmod +x "/usr/local/bin/ws" |
...
Code Block |
---|
sudo curl "http://downloads.Mendsoftwarewhitesourcesoftware.com/ws-cli/master/latest/ws-cli-darwin-amd64/ws" -o "/usr/local/bin/ws" && sudo chmod +x "/usr/local/bin/ws" |
...
Create a designated directory for the WS CLI, for example C:\Mend\cli
and run the following command:
Code Block |
---|
curl "http://downloads.Mendsoftwarewhitesourcesoftware.com/ws-cli/master/latest/ws-cli-windows-amd64/ws.exe" -o "C:\Mend\cli\ws.exe" |
...
Installing step by step
In order to install the WS CLI, download the relevant binary for your system:
...
Verifying the Installation
To verify the WS CLI installation, simply type ws
:
Code Block |
---|
$ ws __ __ ___ _ _ _ ____ _ ___ | \/ | ___ _ __ __| | / ___| | |_ _| | ____|\/| |/ _ \ '_ \ / ___ | \| \| / / |__ (_) |_ ___/ ___| ___ _ _ _ __ ___ ___ / ___| | |_ _| \ \ /\ / /| '_ \| | __/ _ \___ \ / _ \| | | | '__/ __/ _ \ | | | | | | \ V V / | | | | | || __/___) | (_) | |_| | | | (_| __/| | | | | | | | __/ | | | (_| | | |___| |___ | | \_/\_/ |_| |_ |_|\__\_|__|____/ \___/ \__,_|_| \___\_,__| \____|_____|___| Usage: ws [command] Available Commands: clear Delete stored information completion Generate autocompletion script configure Configure MendCli parameters help Show help scan Run a scan status Check Mend status version Display version and build details Flags: -h, --help Show help for command --no-colors Disable colored output Use "ws [command] --help" for more information about a command. |
...
Run the
ws configure
command to choose the Mend URL and set the access token (User Key):
Code Block |
---|
$ws configure Mend URL selection: 1. https://saas-eu.Mendsoftwarewhitesourcesoftware.com 2. https://saas-eu.Mendsoftwarewhitesourcesoftware.com 3. https://app.Mendsoftwarewhitesourcesoftware.com 4. https://app-eu.Mendsoftwarewhitesourcesoftware.com 5. https://essentials-saas.Mendsoftwarewhitesourcesoftware.com 6. other Please select your choice [1]: User Key []: 123456e9e62d447a82caef5879a5f39349b87a21ab94420f87a5d07d7c654321 API Key []: Automatic Download [yes]: |
...
In order to display the list of the supported WS CLI commands, type ws
or ws help
and a short description of any of the available commands will be displayed.
...
The ws configure
command enables the setting of the WS CLI.
This is an interactive command that enables you to set the Mend URL, User Key, API Key, and the Automic Download settings.
Mend URL- Mend server URL. By choosing a number between 1 to 5 you can set one of the available URLs. The default value 1 corresponds to the https://saas-eu.Mendsoftwarewhitesourcesoftware.com URL. By choosing number 6, you can set your own hosted Mend address by specifying the URL in the following format:
https://<URL>
User Key - Mend access token, the only mandatory parameter.
API Key - Mend organization token. This is an optional parameter: if not provided, the organization will be set automatically.
Automatic Download - determines if additional components will be downloaded automatically or the user will be prompted beforehand.
...
The ws help
command displays a short description of the available WS CLI commands.
In order to get more detailed information on each of the available commands, the following syntax should be used: ws [command] help
...
The ws version
command displays information on the WS CLI version and build.
Advanced
...
Currently, only organizational administrators and auditors (read-only administratoradministrators) have permission to perform scans with the WS CLI tool.