Toolchain priority in monitoring scans
Endor Labs SCM integrations continuously monitor your projects for security and operational risks. Each app monitors the projects in your organization and runs a scan once every 24 hours. The SCM apps check the toolchain specifications in the following order:- The scan workflow, if present.
- The toolchain configuration set through the endorctl API.
- The toolchain configuration set in the
scanprofile.yamlfile. - The toolchains that auto detection finds in your manifest files.
- The system default toolchains.
Configure build tools for endorctl scans
After installing and initializing endorctl, run the endorctl scan with the--install-build-tools flag. endorctl downloads any missing toolchains and installs them in an isolated sandbox, so language-specific scans and dependency resolution run correctly.
-
For the first time, run the endorctl scan to create a project with Endor Labs.
-
Run the following command to automatically download and install build tools as part of your scan.
- Scan workflow configured through the endorctl API
- Toolchain profile configured through the endorctl API
- Toolchain profile configured in the
scanprofile.yamlfile - Toolchains found by auto detection
- System default toolchains
Scan with a preconfigured build environment
If your build tools are already installed in your scan environment, use--use-scan-profile to apply the project’s scan profile configuration without downloading and installing tools in a new sandbox. Endor Labs fetches the scan profile associated with the project and applies its automated scan parameters with the tools already available on the machine. These parameters include custom paths, environment variables, and any custom scripts.
This approach is useful when you have a container or CI runner with the required tools already installed and you want the scan profile to control scan behavior.
Before you run the scan:
- Verify that the project already exists in Endor Labs. If it does not, run
endorctl scanfirst to create it. - Configure a scan profile for the project. See Configure scan profile through the Endor Labs user interface, through the API, or through a YAML file.
- Verify that the required build tools are installed on the machine.
You can’t use
--use-scan-profile and --install-build-tools at the same time. Use --install-build-tools if you want to download and install build tools rather than using pre-installed ones.System default toolchain versions
If you don’t provide a toolchain profile, endorctl installs the default toolchains in the sandbox when you runendorctl scan with the --install-build-tools flag. See Toolchain support matrix for details on default versions.
Toolchain support matrix
The following table outlines the toolchain profile support details across different languages and platforms..NET 5 and earlier versions are not supported for auto detection or manual configuration.
Node.js version selection
See Node.js version selection in auto detection to learn how Endor Labs maps the Node.js version a project requests to an installed release. When a scan profile pins an official nodejs.org release, Endor Labs selects the Node.js version to install by the following rules:- A pin older than the newest supported release in its major version installs that newest release. For example, a pin to
24.8.0installs24.22.1. - A pin to Node.js 20 or earlier, or to Node.js 21 or 23, installs the default Node.js version.
- A pin to Node.js 25 installs the newest supported Node.js 26 release.
- A pin equal to or newer than the newest supported release in its major version installs as configured.
- A pin above every supported major version, such as Node.js 27 or later, installs as configured.
- On macOS AMD64, which has no default toolchain versions, a pin that would otherwise get the default installs as configured.
engines field or rush.json nodeSupportedVersionRange. Endor Labs turns off engine checks across npm (--engine-strict=false), pnpm (--config.engine-strict=false), Yarn 1 (--ignore-engines), Rush (RUSH_ALLOW_UNSUPPORTED_NODEJS=true), and Lerna (npm_config_engine_strict=false, YARN_IGNORE_ENGINES=true). An engines mismatch produces a warning instead of stopping the scan.
Endor Labs installs pnpm 7 to 11 as an npm package that runs on the installed Node.js. This applies when the pnpm version downloads from the official pnpm GitHub releases and the installed Node.js version is 22.13 or later. Otherwise pnpm installs as a standalone binary, as do pnpm 12 and later. A pnpm version pinned in a scan profile keeps its version either way. pnpm 6 can’t run on a supported Node.js version, so Endor Labs installs the default pnpm version in place of a pinned or detected pnpm 6.
Pin Python package manager versions
Endor Labs installs the Python package managers as pip packages in the scan sandbox, so they do not appear as separate toolchains. If you do not pin a version, the sandbox uses the default versions listed in the toolchain support matrix. Endor Labs also installssetuptools, wheel, and click 8.1.8.
To use a different version, pin the package under the Python toolchain in your scan profile. A version you pin replaces the Endor Labs default. Packages you leave out keep their defaults. This works for any package that publishes a wheel, so you can pin a package manager plugin that your build needs as well. Endor Labs installs pip packages with --only-binary=all, so a package that ships only a source distribution fails to install.
Set pip_packages under python_tool_chain. Each key is the pip package name, and name is the version to install. Enter the key in lowercase, exactly as it appears on PyPI. Endor Labs matches keys exactly, so Poetry does not replace the poetry default.
The python_tool_chain block must also carry a complete version for the Python runtime, with name, urls, sha256_sum, and relative_tool_chain_path. Endor Labs does not fill the runtime version in for you when you set pip_packages, and a version without urls fails validation with python toolchain urls cannot be empty. Use a full patch version such as 3.12.11, not 3.12.
pip_packages. Pin Poetry the same way, using a poetry key. The python_tool_chain.poetry_version field in the API schema is deprecated, and Endor Labs does not use it. Endor Labs installs Poetry 1.7.0 by default, so check that your build works with the version you pin before you move to a different major version.
Use the same python_tool_chain block under toolchain_profile when you create a scan profile through the API. See Configure scan profile through the Endor Labs API to create the profile and associate it with a project.
To pin a version without supplying the runtime details yourself, use the Endor Labs user interface. It fills in the urls and sha256_sum for the runtime version you select. See Pin a Python package manager version to follow the procedure.
Pin a Conan version
When Conan scanning is enabled, Endor Labs installs Conan2.28.0 by default in the scan sandbox as a Python pip package. To pin a different Conan 2.x release in a ToolchainProfile or API ScanProfile, set conan_version under c_tool_chain. Endor Labs rejects Conan 1.x versions. Because Conan installs through pip, conan_version takes only name and needs no download URL or checksum:
Sandbox certificate trust bundle
During sandboxed scans (including hosted scans,--install-build-tools, and --use-scan-profile), Endor Labs builds a per-scan certificate authority (CA) bundle and removes it when the scan finishes. The bundle excludes the distrusted emSign ECC Root CA - G3 and AAA Certificate Services roots and includes any custom CA certificates configured for the sandbox.
Endor Labs configures scan tools to use this per-scan bundle instead of bundled or host default certificate stores:
- PEM bundle variables: Points
SSL_CERT_FILE,PIP_CERT,REQUESTS_CA_BUNDLE,CURL_CA_BUNDLE, andNODE_EXTRA_CA_CERTSat the per-scan PEM file, and setsSSL_CERT_DIRto an empty directory. In virtual environments that endorctl creates, it also replacespip’s bundledcertifistore. - Node.js and JVM options: Appends
--use-openssl-catoNODE_OPTIONS(unless a Node CA flag is already set) and pointsMAVEN_OPTS,GRADLE_OPTS,SBT_OPTS, andCOURSIER_OPTSat the per-scan PKCS#12 trust store. - Host trust variables with
--use-scan-profile: With--use-scan-profile, trust variables such asSSL_CERT_FILEthat point at standard host CA bundle paths (for example,/etc/ssl/certs/ca-certificates.crt) aren’t passed into the sandbox. Tools use the filtered per-scan CA bundle instead. Custom CA bundle paths outside standard system store paths are preserved.
Configure automated scan parameters
Automated scan parameters are endorctl parameters and environment variables that you define in a scan profile. They apply to projects linked to that profile and help customize scan behavior during cloud scans. You can define the following parameters in your scan profile:-
included_paths: List of paths to include in the scan. -
excluded_paths: List of paths to exclude from the scan. Excluded paths don’t apply to secrets scanning. Secrets detection always scans the full repository. To filter or suppress secret findings, use policies or a.gitleaksignorefile instead. -
languages: List of languages to scan. If empty, Endor Labs uses the default values. -
call_graph_languages: List of languages to use for generating call graphs. If empty, Endor Labs uses the default values. -
segment_match_languages: List of languages to scan using segment-based analysis. If you don’t also setlanguages, this clears the default language list. -
additional_environment_variables: Additional environment variables to set during the scan. Endor Labs passes only variables that start withENDOR_, and ignores some of those too. See Environment variables not supported in scan profiles and Global flags and environment variables to learn more. -
enable_automated_pr_scans: Enables automatic scanning of pull request changes. -
enable_pr_comments: Enables adding scan results as comments in pull requests. -
enable_sast_scan: Enables SAST during the scanning process. -
disable_code_snippet_storage: Disables the storage of code snippets.
bazel_configuration to configure Bazel scans. See Bazel flags to learn more about these settings. bazel_configuration takes the following sub-fields:
-
bazel_show_internal_targets: Includes internal build targets in the dependency analysis. -
bazel_workspace_path: Path to the Bazel workspace. -
bazel_include_targets: Bazel targets to include in the scan. -
bazel_exclude_targets: Bazel targets to exclude from the scan. -
bazel_targets_query: Bazel query that selects the targets to scan.
kind: AutomatedScanParameters.
Environment variables not supported in scan profiles
Endor Labs doesn’t support and ignores the following environment variables if you set them in a scan profile:ENDOR_API, ENDOR_API_CREDENTIALS_KEY, ENDOR_API_CREDENTIALS_SECRET, ENDOR_AWS_CREDENTIALS_ROLE_ARN, ENDOR_AZURE_CREDENTIALS_MANAGED_IDENTITY_ENABLE, ENDOR_BYPASS_HOST_CHECK, ENDOR_CONFIG_PATH, ENDOR_GCP_CREDENTIALS_SERVICE_ACCOUNT, ENDOR_GITHUB_ACTION_TOKEN_ENABLE, ENDOR_INTERNAL_CLUSTER_API, ENDOR_JVM_ENDOR_TOKEN, ENDOR_NAMESPACE, ENDOR_OSS_API, ENDOR_SCAN_ENABLE_PR_COMMENTS, ENDOR_SCAN_EXCLUDE_PATH, ENDOR_SCAN_GITHUB_API_URL, ENDOR_SCAN_GITHUB_REPOSITORY_HTTP_CLONE_URL, ENDOR_SCAN_GOOGLE_BUCKET, ENDOR_SCAN_INCLUDE_PATH, ENDOR_SCAN_INSECURE_SANDBOX, ENDOR_SCAN_LANGUAGES, ENDOR_SCAN_MCP, ENDOR_SCAN_PATH, ENDOR_SCAN_PROVISIONING_RESULT_UUID, ENDOR_SCAN_PR_UUID, ENDOR_SCAN_SANDBOX_DEBUG, ENDOR_SCAN_SCAN_REQUEST_UUID, ENDOR_SCAN_SCAN_RESULT_UUID, ENDOR_SCAN_SEGMENT_MATCH_LANGUAGES, ENDOR_SCAN_USE_SCAN_PROFILE, ENDOR_SCAN_UUID, ENDOR_TOKEN, and ENDOR_UI.
Endor Labs also ignores any other ENDOR_ variable that doesn’t configure the scan or a toolchain, and ignores entries with empty values. The scan logs a warning naming each ignored variable without its value. Warnings are grouped by missing ENDOR_ prefix, reserved variable name, or empty value.