> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Global flags and environment variables

> Use global flags and environment variables to customize and configure endorctl. Includes an interactive wizard that generates export commands for your shell.

Every command-line flag has a corresponding environment variable that you can set instead of the flag, either directly in your environment or in a dedicated configuration file.

See `config-path` description in [Global flags](#global-flags) and [Set environment variables](#set-endorctl-environment-variables) for details.

To set a command-line flag on the endorctl scan command you can specify the flag with a leading `--` for full flag names or a leading `-` for short flag aliases. If applicable, place input arguments after the flag and separate them with either a blank space or a `=` character. For example, to set the `output-type` specify `--output-type json` or `-o=json`. If the input argument is a list, use a `,` character to separate list elements, for example `--languages=go,python`.

## Global flags

The following global flags apply to any `endorctl` command. Each flag has a corresponding environment variable that you can use in place of the flag.



&#x20; \- Flag: \`api\`
&#x20; Environment\_Variable: \`ENDOR\_API\`
&#x20; Type: string
&#x20; Description: Set the API URL for the Endor Labs Application (default \`https\://api.endorlabs.com\`). For EU tenants, set to \`https\://api.eu.endorlabs.com\`.

&#x20; \- Flag: \`api-key\`
&#x20; Environment\_Variable: \`ENDOR\_API\_CREDENTIALS\_KEY\`
&#x20; Type: string
&#x20; Description: Set the API key used to authenticate with Endor Labs.

&#x20; \- Flag: \`api-secret\`
&#x20; Environment\_Variable: \`ENDOR\_API\_CREDENTIALS\_SECRET\`
&#x20; Type: string
&#x20; Description: Set the secret corresponding to the API key used to authenticate with Endor Labs.

&#x20; \- Flag: \`aws-role-arn\`
&#x20; Environment\_Variable: \`ENDOR\_AWS\_CREDENTIALS\_ROLE\_ARN\`
&#x20; Type: string
&#x20; Description: Set the target role ARN for AWS based authentication. Set this flag to enable AWS authentication. See our \[AWS Keyless Authentication Docs]\(/setup-deployment/ci-cd/keyless-authentication) for details.

&#x20; \- Flag: \`bypass-host-check\`
&#x20; Environment\_Variable: \`ENDOR\_BYPASS\_HOST\_CHECK\`
&#x20; Type: boolean
&#x20; Description: Bypass the check that verifies that the host machine is correctly set up to use endorctl.

&#x20; \- Flag: \`config-path\`
&#x20; Environment\_Variable: \`ENDOR\_CONFIG\_PATH\`
&#x20; Type: string
&#x20; Description: Set the local file system path to the Endor Labs config directory containing your Endor Labs environment variables. By default, set to \`\$HOME/.endorctl/config.yaml\`.

&#x20; \- Flag: \`enable-azure-managed-identity\`
&#x20; Environment\_Variable: \`ENDOR\_AZURE\_CREDENTIALS\_MANAGED\_IDENTITY\_ENABLE\`
&#x20; Type: boolean
&#x20; Description: Enable keyless authentication using Azure VM managed identity system tokens.

&#x20; \- Flag: \`enable-github-action-token\`
&#x20; Environment\_Variable: \`ENDOR\_GITHUB\_ACTION\_TOKEN\_ENABLE\`
&#x20; Type: boolean
&#x20; Description: Enable keyless authentication using GitHub Action OIDC tokens. See the \[GitHub documentation on configuring OpenID Connect in cloud providers]\(https\://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers) for details.

&#x20; \- Flag: \`gcp-service-account\`
&#x20; Environment\_Variable: \`ENDOR\_GCP\_CREDENTIALS\_SERVICE\_ACCOUNT\`
&#x20; Type: string
&#x20; Description: Set the target service account for GCP based authentication. Set this flag to enable GCP authentication.

&#x20; \- Flag: \`log-level\`
&#x20; Environment\_Variable: \`ENDOR\_LOG\_LEVEL\`
&#x20; Type: string
&#x20; Description: Set the log level. Set to \`debug\` for debug logs. See also the \`--verbose\` flag.

&#x20; \- Flag: \`namespace\`
&#x20; Environment\_Variable: \`ENDOR\_NAMESPACE\`
&#x20; Type: string
&#x20; Description: Set to the namespace of the project that you are working with.

&#x20; \- Flag: \`token\`
&#x20; Environment\_Variable: \`ENDOR\_TOKEN\`
&#x20; Type: string
&#x20; Description: Set the authentication token used to authenticate with Endor Labs.

&#x20; \- Flag: \`verbose\`
&#x20; Environment\_Variable: \`ENDOR\_LOG\_VERBOSE\`
&#x20; Type: boolean
&#x20; Description: Enable verbose logging.

&#x20; \- Flag: \`version\`
&#x20; Environment\_Variable: Not applicable
&#x20; Description: Display the \`endorctl\` client version.

&#x20;&#x20;

> [!NOTE]
>
> If you use Endor Labs with an EU tenant, use `https://api.eu.endorlabs.com` instead of `https://api.endorlabs.com`.

## Environment variables that affect scan behavior

The following environment variables configure scan behavior. They do not have corresponding command-line flags. Set them in your environment, in the scan profile, or in the [config file](#set-endorctl-environment-variables) before running `endorctl`. You can set them in a scan profile with `additional_environment_variables` so they apply automatically to every scan that uses that profile. See [Configure automated scan parameters](https://docs.endorlabs.com/scan/scan-profiles/build-tools.md#configure-automated-scan-parameters) for details.



&#x20; \- Environment\_Variable: \`ENDOR\_GRADLE\_ADDITIONAL\_PARAMETERS\`
&#x20; Type: Comma-separated string with key-value pairs
&#x20; Description: Set additional Gradle properties for dependency resolution in monitoring scans. endorctl adds parameters to \`gradle.properties\`. For example \`ENDOR\_GRADLE\_ADDITIONAL\_PARAMETERS=org.gradle.jvmargs=-Xmx4096m,org.gradle.caching=true\`.

&#x20; \- Environment\_Variable: \`ENDOR\_JS\_ENABLE\_TSSERVER\`
&#x20; Type: boolean
&#x20; Description: Set to \`true\` to view call graphs for JavaScript/TypeScript projects.

&#x20; \- Environment\_Variable: \`ENDOR\_JS\_PACKAGE\_MANAGER\`
&#x20; Type: string
&#x20; Description: Set to \`npm\`, \`yarn\`, \`pnpm\`, or \`lerna\` to override auto detection and force \`endorctl\` to use a specific JavaScript package manager.

&#x20; \- Environment\_Variable: \`ENDOR\_JS\_TSSERVER\_TIMEOUT\`
&#x20; Type: integer (default:15)
&#x20; Description: Set the timeout in seconds for \`tsserver\` responses when generating JavaScript/TypeScript call graphs. The default timeout is 15 seconds. Increase this value if call graph generation times out for large or complex projects.

&#x20; \- Environment\_Variable: \`ENDOR\_MAVEN\_ADDITIONAL\_PARAMETERS\`
&#x20; Type: Comma-separated string
&#x20; Description: Set additional JVM options for Maven dependency resolution in monitoring scans. endorctl appends parameters to \`MAVEN\_OPTS\`. \<p> For example \`ENDOR\_MAVEN\_ADDITIONAL\_PARAMETERS=-Xmx4096m,-DskipTests=true\`.

&#x20; \- Environment\_Variable: \`ENDOR\_MVN\_USE\_WRAPPER\`
&#x20; Type: boolean (default: unset)
&#x20; Description: Set to \`true\` to prefer the Maven wrapper in your project root, or \`false\` to always run the \`mvn\` installation on your \`PATH\`. A \`true\` value still falls back to \`mvn\` when the wrapper is missing or is not executable. Setting either value turns off Maven toolchain selection, so a Maven version that your scan profile provisions no longer applies. When unset, Endor Labs prefers the wrapper and keeps toolchain selection. See \[Use the Maven wrapper]\(/scan/sca/java#use-the-maven-wrapper).

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\_REFRESH\`
&#x20; Type: boolean (default: true)
&#x20; Description: Set to \`false\` to stop re-evaluating stored AI SAST findings during scans of the default branch. See \[Refresh of findings]\(/scan/ai-sast/detection-agent#refresh-of-findings).

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\_REFRESH\_INTERVAL\`
&#x20; Type: duration (default: 720h)
&#x20; Description: Set how long a stored AI SAST finding can go without a re-evaluation, for example \`168h\`. Code or guidance changes trigger a re-evaluation regardless of this interval. Has no effect when \`ENDOR\_SCAN\_AI\_SAST\_REFRESH\` is \`false\`.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_ENABLE\_PRECOMPUTED\_CALLGRAPHS\`
&#x20; Type: boolean
&#x20; Description: Enable pre-computed reachability analysis to analyze your application based on analysis of how your direct dependencies interact with the software they rely on. This provides faster analysis and serves as a fallback when traditional reachability analysis fails. Supported all languages that support reachability except for Go and Ruby.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_GIT\_LFS\`
&#x20; Type: boolean
&#x20; Description: Set to \`true\` to fetch and scan Git LFS content when Endor Labs clones the repository. You can also configure it in a scan profile under \*\*additional\_environment\_variables\*\*.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_GO\_VERSION\`
&#x20; Type: string
&#x20; Description: Set the Go version used for Go standard library vulnerability scanning. See \[Go standard library vulnerability scanning]\(/scan/sca/golang#go-standard-library-vulnerability-scanning).

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_INCREMENTAL\_DEP\_RES\`
&#x20; Type: boolean
&#x20; Description: Set to \`false\` to turn off package-level dependency resolution skipping in incremental PR scans. Endor Labs enables this skipping by default for JVM, JavaScript, Python, Go, .NET, Swift, Ruby, PHP, and Rust projects when you set \`--pr-incremental\` and \`--quick-scan\`. See \[Skip unaffected packages during incremental PR scans]\(/scan/pr-scans/run-pr-scans-with-endorctl#skip-unaffected-packages-during-incremental-pr-scans) for the endorctl version per language or ecosystem.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_MAVEN\_PREPOP\_CACHE\`
&#x20; Type: boolean
&#x20; Description: Enable pre-population of Maven local cache for large monorepos to speed up dependency resolution by running \`mvn dependency:collect\` in parallel before scanning modules. Recommended for projects with 100 or more \`pom.xml\` files and applies only to GitHub App or other hosted scans.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_REMEDIATION\_ACTION\`
&#x20; Type: boolean
&#x20; Description: Runs remediation actions, such as \[Remediation PRs]\(/risk-remediation/automated-pull-requests), for the remediation policies that match a project. The default is \`true\`. Set to \`false\` in a scan profile under \*\*additional\_environment\_variables\*\* to turn off remediation actions for the projects that use the profile.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_RUBY\_CALL\_GRAPH\`
&#x20; Type: boolean
&#x20; Description: Set to \`true\` to generate call graphs for Ruby projects. This setting is enabled by default for automated scans. See \[Call graphs for Ruby]\(/scan/sca/ruby#call-graphs).

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_SAST\_TIMEOUT\`
&#x20; Type: duration (default: 180m)
&#x20; Description: Set how long the SAST scanner can run before it stops and reports an error, for example \`240m\`. Set to \`0\` to remove the limit.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_SHALLOW\_CLONE\`
&#x20; Type: boolean
&#x20; Description: Enables shallow clone when Endor Labs clones the repository during CI and monitoring scans. Endor Labs downloads only recent commits instead of the full history, making scans run faster. You can also configure it in a scan profile under \*\*additional\_environment\_variables\*\*.

&#x20; \- Environment\_Variable: \`ENDOR\_SCAN\_USE\_GOMOD\_VERSION\`
&#x20; Type: boolean
&#x20; Description: Set to \`true\` to use the Go version from the project's \`go.mod\` for Go standard library vulnerability scanning instead of detecting the system Go. See \[Go standard library vulnerability scanning]\(/scan/sca/golang#go-standard-library-vulnerability-scanning).

&#x20;&#x20;

## Set `endorctl` environment variables

Select your operating system and shell to generate the correct command.

### Shell Command Generator

Select your operating system and shell to generate the correct export command for your environment.

Operating system

<fieldset aria-labelledby="evw-os-label" />

Select your operating system.

Shell

Select the shell you use in your terminal.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.