Skip to main content
Skip table of contents

Mend CLI Exit Codes

Here are the possible exit codes for Mend CLI and their meaning:

Exit Code

Meaning

Relevant scan type

1

An invalid configuration parameter was passed when executing Mend CLI command. Check for typos in the parameters.

Code (SAST)
Dependencies (SCA)
Containers (Images)

2

Unable to access the update or license details from the Mend server URL. Check for internet connection.

Code (SAST)
Dependencies (SCA)
Containers (Images)

3

You will not see this as long as the connection is valid, but it's thrown if the license required to run the engines is invalid

Code (SAST)

4

Unable to detect a supported language within the project based on the file extensions provided.

Code (SAST)

5

CLI and Code analysis engine use sockets for inter-process communication. This exit code is returned if there is an issue with that communication (e.g. could not open a port to listen on)

Code (SAST)

6

There is an error starting the engine, either because the file has been somehow removed between the update and the run, the file is corrupted, or any other reason that prevents the run of the executable

Code (SAST)

7

Could not create a cache subdirectory in the same location as the Mend CLI. Check that the Mend CLI permissions include “create”.

Code (SAST)

8

CLI failed to update the code analysis engines and there are no cached engines to fall back to

Code (SAST)

9

Scan findings trigger policy violations that were defined for this project.

Code (SAST)
Dependencies (SCA)
Containers (Images)

10

A scanning engine stalled or failed.

Code (SAST)
Dependencies (SCA)
Containers (Images)

11

The provided target directory is invalid or not accessible

Code (SAST)

12

Version misalignment - Version of Mend CLI is not compatible with sub-module. Run “mend update”.

Code (SAST)
Dependencies (SCA)
Containers (Images)

13

Error encountered when exporting scan results: Check that the selected file format is supported for the selected scan type, and that the target path is writable. Other issues could be an illegal combination of CLI flags (e.g. mend code --export-result --offline).

Code (SAST)
Dependencies (SCA)
Containers (Images)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.