endorctl CLI exit codes
Learn about the exit codes that you may encounter while using the endorctl CLI.
The endorctl exit codes indicate whether the program completed successfully or encountered an error. This page documents the possible endorctl exit code values and the recommended next steps. When contacting support, provide the error code and the error message to help us debug the issue.
To get the exit code, run echo $? on the command line prompt.
| Value | Exit Code Name | Description |
|---|---|---|
| 2 | ENDORCTL_RC_ERROR | endorctl could not determine the exact cause of the error. |
| 3 | ENDORCTL_RC_INVALID_ARGS | The command received an invalid argument. This may occur due to an invalid parameter value, or an incorrect package format. |
| 4 | ENDORCTL_RC_ENDOR_AUTH_FAILURE | You don’t have the correct permissions for this operation. Check your Endor Labs token or API keys to make sure they are valid and include the necessary permissions. Provide these using the --token flag or through the environment variables ENDOR_TOKEN, or ENDOR_API_CREDENTIALS_KEY/SECRET. The environment variables are mutually exclusive: you cannot have both a token and API keys set at the same time. |
| 6 | ENDORCTL_RC_GITHUB_AUTH_FAILURE | You provided an empty or invalid GitHub token. Provide this token using the --scm-token flag or through the environment variable ENDOR_SCAN_SCM_TOKEN. You can skip the GitHub scan by not setting the --github flag. |
| 7 | ENDORCTL_RC_ANALYTICS_ERROR | There was an error analyzing the dependencies. |
| 8 | ENDORCTL_RC_FINDINGS_ERROR | There was an error generating findings based on the analytics output. |
| 9 | ENDORCTL_RC_NOTIFICATIONS_ERROR | There was an error processing a notification triggered by a notification policy. See the error log for details and verify that you configured the corresponding notification target correctly. |
| 10 | ENDORCTL_RC_GITHUB_API_ERROR | The GitHub API returned an error. This can occur due to GitHub rate-limiting or context deadline exceeded. Check the log message to see what object is causing the issue. |
| 11 | ENDORCTL_RC_GITHUB_PERMISSIONS_ERROR | This error occurs when you authenticate with GitHub but lack the required permissions for the operation. You can’t access the requested resource because of insufficient permissions. Check the GitHub token permissions, as well as the permissions and user accounts associated with the repository and/or organization and try again. |
| 12 | ENDORCTL_RC_GIT_ERROR | A Git operation has failed. Examples of Git operations are: cloning, opening, finding the root, finding the HEAD, finding the default branch, and more. Ensure you are scanning the correct Git repository and that it is properly set up for the scan. |
| 13 | ENDORCTL_RC_DEPENDENCY_RESOLUTION_ERROR | There was an error resolving the dependencies. |
| 14 | ENDORCTL_RC_DEPENDENCY_SCANNING_ERROR | There was an error processing the resolved dependencies. |
| 15 | ENDORCTL_RC_CALL_GRAPH_ERROR | There was an error generating the call graph. |
| 16 | ENDORCTL_RC_LINTER_ERROR | There was an error while running the linters used to analyze the source code. This can affect secret and vulnerability detection. |
| 17 | ENDORCTL_RC_BAD_POLICY_TYPE | endorctl detected an invalid policy. This is not a fatal error, but endorctl did not process the policy. See log for details. |
| 18 | ENDORCTL_RC_POLICY_ERROR | There was an error evaluating one or more policies. See log for details. |
| 20 | ENDORCTL_RC_INTERNAL_ERROR | There was an internal error within endorctl. See log for details. |
| 21 | ENDORCTL_RC_DEADLINE_EXCEEDED | The deadline expired before the operation could complete. |
| 22 | ENDORCTL_RC_NOT_FOUND | The requested resource was not found. |
| 23 | ENDORCTL_RC_ALREADY_EXISTS | An attempt to create an entity failed because a resource with the same key already exists. |
| 24 | ENDORCTL_RC_UNAUTHENTICATED | The request does not have valid authentication credentials for the operation. |
| 25 | ENDORCTL_RC_VULN_ERROR | There was an issue ingesting and processing vulnerability data. See log for details. |
| 26 | ENDORCTL_RC_INITIALIZATION_ERROR | There was an error initializing the project or the repository. This can happen if the project ingestion token is missing, the project URL is invalid, or authorization failed. See log for details. |
| 27 | ENDORCTL_RC_HOST_CHECK_FAILURE | The endorctl host-check failed. Host won’t be able to run endorctl scan successfully. See log for details. |
| 28 | ENDORCTL_RC_SBOM_IMPORT_ERROR | There was an error importing an SBOM. See log for details. |
| 29 | ENDORCTL_RC_PRE_COMMIT_CHECK_FAILURE | The pre-commit-checks command discovered one or more leaked secrets. See log for details. |
| 30 | ENDORCTL_RC_GH_ACTION_WORKFLOW_SCAN_FAILURE | There was an error scanning the GitHub action dependencies. See log for details. |
| 31 | ENDORCTL_RC_FILE_ANALYTICS_ERROR | There was an error reading files for analytics processing. See log for details. |
| 32 | ENDORCTL_RC_SIGNATURE_VERIFICATION_FAILURE | Signature verification failed. See log for details. |
| 33 | ENDORCTL_RC_LICENSE_ERROR | The requested operation requires additional licensing. See log for details. |
| 34 | ENDORCTL_RC_HUGGING_FACE_ERROR | There was an error running the HuggingFace scanner. |
| 35 | ENDORCTL_RC_SAST_ERROR | There was an error running the SAST scanner. |
| 36 | ENDORCTL_RC_ARTIFACT_OPERATION_FAILURE | An error occurred while performing an artifact operation. |
| 37 | ENDORCTL_RC_SEGMENTATION_ERROR | There was an error during file segmentation. |
| 38 | ENDORCTL_RC_TOOLCHAIN_ERROR | An error occurred during the process of generating toolchains. See log for details. |
| 39 | ENDORCTL_RC_SANDBOX_ERROR | An error occurred during endorctl sandbox execution, possibly due to setup or dependency issues. See log for details. |
| 40 | ENDORCTL_RC_RULE_SET_ERROR | An error occurred when importing rules. See logs for details. |
| 128 | ENDORCTL_RC_POLICY_VIOLATION | The scan violated one or more blocking admission policies. See log for details. |
| 129 | ENDORCTL_RC_POLICY_WARNING | The scan violated one or more warning admission policies. endorctl returns this code only when you set the --exit-on-policy-warning flag. |
| 133 | ENDORCTL_RC_EXPORTER_WARNING | A warning occurred while trying to export data via the configured exporter. Check your exporter configuration, scan profile setup, and integration status. |
| 135 | ENDORCTL_RC_DEPENDENCY_SETUP_WARNING | A non-fatal issue occurred while configuring the dependency resolution environment (for example, truststore setup for mTLS). The scan continued with a fallback configuration but may encounter issues resolving from certain repositories. |
Feedback
Was this page helpful?
Thanks for the feedback. Write to us at support@endor.ai to tell us more.
Thanks for the feedback. Write to us at support@endor.ai to tell us more.