> ## 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.

# scan

> Use the scan command to perform endorctl scan.

Use the `scan` command to perform scans against a repository.

## Usage

Run the following command to perform a full scan including reachability analysis for the open source packages you build in a repository.

```bash theme={null}
endorctl scan
```

If your project contains multiple programming languages, you can specify them as a comma-separated list using the `--languages` flag.

```bash theme={null}
endorctl scan --languages=<languages-list>

```

Provide `<languages-list>` as a comma-separated list using the supported languages: `c#,go,java,javascript,kotlin,php,python,ruby,rust,scala,swift,typescript,swifturl`.

To scan for leaked secrets and monitor all results in the checked out version of your repository, run the following command.

```bash theme={null}
endorctl scan --secrets
```

Run the following command to perform a regular scan for leaked secrets including the dependencies.

```bash theme={null}
endorctl scan --secrets --dependencies
```

Run the following command to scan for leaked secrets in all branches of your repository.

```bash theme={null}
endorctl scan --secrets --git-logs
```

The above command performs a scan of the repository's Git logs using the following logic:

* If endorctl scans the repository's Git log history for the first time, it performs a full scan.
* endorctl also performs a full rescan if you change any of the rules in the namespace.
* In all other cases, endorctl runs an incremental scan based on the last scan time.

If the system invalidates detected secrets and you want to re-validate them, force a full rescan with the following command.

```bash theme={null}
endorctl scan --secrets --git-logs --force-rescan
```

To scan for misconfigurations in a GitHub repository such as [https://github.com/endorlabs/app-java-demo](https://github.com/endorlabs/app-java-demo), run the following commands.

```bash theme={null}
export ENDOR_SCAN_SCM_TOKEN=<insert-your-scm-token>
endorctl scan --github --repository-http-clone-url=https://github.com/endorlabs/app-java-demo
```

To run a scan as a test in a pull request without monitoring the version of your code over time, run the following command.

```bash theme={null}
endorctl scan --pr
```

To scan workflow files under `.github/workflows` and discover Actions used in your pipelines, run the following command.

```bash theme={null}
endorctl scan --ghactions
```

For CI integration options including the GitHub App and the Endor Labs GitHub Action, see [GitHub Actions scanning](https://docs.endorlabs.com/scan/github-actions.md).

The command performs regular dependency analysis on your repository.
It also discovers GitHub Actions workflows in your CI/CD pipeline and maps them as GitHub action dependencies in your package.

To scan binaries and artifacts, run the following command.

```bash theme={null}
endorctl scan --package --path --project-name
```

You must provide the path of your file using `--path` and specify a name for your project using `--project-name`.

To scan and discover AI/LLM models in your repository, run the following command.

```bash theme={null}
endorctl scan --ai-models --dependencies
```

To run a scan in dry run mode with local scanning and read-only access, run the following command. Dry run mode does not store scan results for monitoring and is best when used by developers running local scans.

```bash theme={null}
endorctl scan --dependencies --dry-run
```

You can also use `--dry-run` with `--secrets`, `--sast`, or `--ai-sast` flags. When you use `--dry-run` with `--ai-sast`, you must also set `--diff-scope` to scope the scan to changed files. Do not use `--dry-run` with container scanning.

## Options

The command `endorctl scan` uses the following flags and environment variables.

### AI model discovery flags



&#x20; \- Flag: \`ai-models\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_AI\_MODELS\`
&#x20; Type: boolean
&#x20; Description: Scan source code repository and discover usage of OSS AI models.

&#x20;&#x20;

### Bazel flags




&#x20; \- Flag: \`bazel-exclude-targets\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_EXCLUDE\_TARGETS\`
&#x20; Type: comma-separated string
&#x20; Description: Set this variable to exclude a list of exact Bazel target labels from a provided Bazel query. Target patterns such as \`//...\`, \`:all\`, or \`:\*\` are not supported.

&#x20; \- Flag: \`bazel-include-targets\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_INCLUDE\_TARGETS\`
&#x20; Type: comma-separated string
&#x20; Description: Set this variable to scan a list of exact Bazel target labels. endorctl scans only the specified list of targets. Target patterns such as \`//...\`, \`:all\`, or \`:\*\` are not supported. Use \`bazel-targets-query\` for pattern-based selection. If you do not specify \`bazel-include-targets\`, you must identify targets using \`bazel-targets-query\`. If you specify targets, endorctl ignores the results from \`bazel-targets-query\`.

&#x20; \- Flag: \`bazel-show-internal-targets\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_SHOW\_INTERNAL\_TARGETS\`
&#x20; Type: boolean
&#x20; Description: Show internal targets as py\_library, java\_library and go\_library as dependencies. Use \`--use-bazel\` with this flag.

&#x20; \- Flag: \`bazel-targets-query\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_TARGETS\_QUERY\`
&#x20; Type: string
&#x20; Description: Set this variable to query for a list of Bazel targets to include in a scan.

&#x20; \- Flag: \`bazel-vendor-manifest-path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_VENDOR\_MANIFEST\_PATH\`
&#x20; Type: string
&#x20; Description: Set this variable to specify the path of the \`go.mod\` file if you use Bazel with Gazelle in vendored mode for Go projects.

&#x20; \- Flag: \`bazel-workspace-path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_WORKSPACE\_PATH\`
&#x20; Type: string
&#x20; Description: Set this variable to specify the path of the Bazel workspace.

&#x20; \- Flag: \`use-bazel\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_USE\_BAZEL\`
&#x20; Type: boolean
&#x20; Description: Use Bazel to perform the endorctl scan.

&#x20; \- Flag: \`bazel-rc-path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_RC\_PATH\`
&#x20; Type: string
&#x20; Description: Specify custom paths for Bazel configuration files. Specify comma-separated paths relative to the repository root. If you provide multiple \`.bazelrc\` files that contain conflicting configuration options, the configuration in the last file listed takes precedence. See \[Bazel documentation]\(https\://bazel.build/run/bazelrc#bazelrc-file-locations) for details about \`.bazel.rc\` file locations.

&#x20; \- Flag: \`bazel-flags\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BAZEL\_FLAGS\`
&#x20; Type: string
&#x20; Description: Specify additional command-line flags to pass to Bazel when running a scan. Specify comma-separated key-value pairs in the format \`key=value\`. endorctl applies these flags to \`bazel build\`.

&#x20; \- Flag: \`use-bazel-aspects\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_USE\_BAZEL\_ASPECTS\`
&#x20; Type: boolean
&#x20; Description: Enable the Bazel Aspects Framework for the scan. Use with \`--use-bazel\`.


&#x20;&#x20;

### Pull request (CI) flags




&#x20; \- Flag: \`enable-pr-comments\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_ENABLE\_PR\_COMMENTS\`
&#x20; Type: boolean
&#x20; Description: Publish new findings as review comments. Set together with \`--scm-pr-id\`, \`--pr\`, and \`--scm-token\` (for GitHub and GitLab). Do not use with \`--pr-baseline\` since endorctl determines the baseline from the merge target of the PR. Note: You can continue to use \`--github-pr-id\` flag, but Endor Labs will deprecate and remove this flag in the future.

&#x20; \- Flag: \`scm-pr-id\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SCM\_PR\_ID\`
&#x20; Type: string
&#x20; Description: Set the PR or MR ID corresponding to the scan. You need to use this flag with \`--pr\` and \`--scm-token\`. Also set \`--enable-pr-comments\` to publish new findings as review comments on the pull or merge request.

&#x20; \- Flag: \`pr\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PR\`
&#x20; Type: boolean
&#x20; Description: Set if this is a PR scan. PR scans are not used for reporting or monitoring. Treat them as point-in-time policy and finding tests.

&#x20; \- Flag: \`pr-baseline\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PR\_BASELINE\`
&#x20; Type: string
&#x20; Description: Set to the Git reference that you are merging to, such as your default branch. Action policies only flag issues that do not exist in the baseline so that developers are only alerted to issues on the current changes. For example, \`--pr-baseline=main\`.

&#x20; \- Flag: \`pr-incremental\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PR\_INCREMENTAL\`
&#x20; Type: boolean
&#x20; Description: Only scan packages with dependencies that have changed compared to the baseline scan. Set together with \`--pr-baseline\` or \`--enable-pr-comments\`. Combine with \`--quick-scan\` to skip dependency resolution for languages and packages the pull request does not affect. See \[Skip unaffected packages during incremental PR scans]\(/scan/pr-scans/run-pr-scans-with-endorctl#skip-unaffected-packages-during-incremental-pr-scans).

&#x20; \- Flag: \`scm-token\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SCM\_TOKEN\`
&#x20; Type: string
&#x20; Description: Set the token used to authenticate with the SCM. The token takes priority over installation tokens.

&#x20; \- Flag: \`dry-run\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DRY\_RUN\`
&#x20; Type: boolean
&#x20; Description: Run the scan in dry run mode. When enabled, Endor Labs does not store scan results and needs only read-only access. Use this flag only with SCA (dependencies), SAST, AI SAST, or secrets scanning. When used with \`--ai-sast\`, you must also set \`--diff-scope\` to scope the scan to changed files.


&#x20;&#x20;

### GitHub configuration flags




&#x20; \- Flag: \`github\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_GITHUB\`
&#x20; Type: boolean
&#x20; Description: Fetch information from GitHub and generate findings for any GitHub misconfigurations (see also \[RSPM policies]\(/platform-administration/policies/finding-policies/managing-scm-configuration)).

&#x20; \- Flag: \`github-api-url\`
&#x20; Environment\_Variable: \`GITHUB\_API\_URL\`
&#x20; Type: string
&#x20; Description: Set the GitHub API URL used for API requests to GitHub Enterprise Cloud or GitHub Enterprise Server. Use this flag for self-hosted source control systems such as GitHub Enterprise Server. (default \`https\://api.github.com/\`)

&#x20; \- Flag: \`github-ca-path\`
&#x20; Environment\_Variable: \`GITHUB\_CA\_PATH\`
&#x20; Type: string
&#x20; Description: Set the path to the CA certificate used by GitHub Enterprise Server if your system does not trust it.

&#x20; \- Flag: \`scm-token\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SCM\_TOKEN\`
&#x20; Type: string
&#x20; Description: Set the token used to authenticate with the SCM.

&#x20; \- Flag: \`repository-http-clone-url\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_GITHUB\_REPOSITORY\_HTTP\_CLONE\_URL\`
&#x20; Type: string
&#x20; Description: Set the GitHub repository HTTP clone URL for \`--github\` scans.


&#x20;&#x20;

### Call graph flags




&#x20; \- Flag: \`build\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_BUILD\`
&#x20; Type: boolean
&#x20; Description: Enable the scan to build the project if needed.

&#x20; \- Flag: \`call-graph-languages\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_CALLGRAPH\_LANGUAGES\`
&#x20; Type: strings
&#x20; Description: Set programming languages for call graph generation. Supported languages are C#, Go, Java, JavaScript, Kotlin, Python, Rust, Scala, and TypeScript. By default, endorctl generates call graphs for all supported languages.

&#x20; \- Flag: \`disable-private-package-analysis\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DISABLE\_PRIVATE\_PACKAGE\_ANALYSIS\`
&#x20; Type: boolean
&#x20; Description: Disable the call graph analysis of private dependencies that are not part of the repository.

&#x20; \- Flag: \`quick-scan\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_QUICK\_SCAN\`
&#x20; Type: boolean
&#x20; Description: Perform a quick scan without call graph generation. In incremental PR scans, a quick scan also skips dependency resolution for languages and packages that the pull request does not affect. See \[Skip unaffected packages during incremental PR scans]\(/scan/pr-scans/run-pr-scans-with-endorctl#skip-unaffected-packages-during-incremental-pr-scans).


&#x20;&#x20;

### Policy flags




&#x20; \- Flag: \`exit-on-policy-warning\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_EXIT\_ON\_POLICY\_WARNING\`
&#x20; Type: boolean
&#x20; Description: Return a non-zero exit code if there are policy violation warnings.


&#x20;&#x20;

### Secrets scan flags




&#x20; \- Flag: \`force-rescan\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_FORCE\_RESCAN\`
&#x20; Type: boolean
&#x20; Description: Force a full rescan of the historical Git logs for all branches in the repository. Use with \`--secrets\`.

&#x20; \- Flag: \`git-logs\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_GIT\_LOGS\`
&#x20; Type: boolean
&#x20; Description: Audit the historical Git logs of the repository for all branches in the repository. Use with \`--secrets\`.

&#x20; \- Flag: \`local\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_LOCAL\`
&#x20; Type: boolean
&#x20; Description: Scan the local filesystem. Use with \`--secrets\`.

&#x20; \- Flag: \`start-commit\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_START\_COMMIT\`
&#x20; Type: string
&#x20; Description: The start commit of the Git logs of the repository to start scanning from. Use with \`--secrets\` and \`--end-commit\`.

&#x20; \- Flag: \`end-commit\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_END\_COMMIT\`
&#x20; Type: string
&#x20; Description: The end commit of the Git logs of the repository to end scanning at. Use with \`--secrets\` and \`--start-commit\`.

&#x20; \- Flag: \`pre-commit-checks\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PRE\_COMMIT\_CHECKS\`
&#x20; Type: boolean
&#x20; Description: Perform Git pre-commit checks on the changeset about to commit. Use with \`--secrets\`.

&#x20; \- Flag: \`secrets\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SECRETS\`
&#x20; Type: boolean
&#x20; Description: Scan source code repository and generate findings for leaked secrets. See also \`--git-logs\`, \`--pre-commit-checks\`, and \`--diff-scope\`.

&#x20; \- Flag: \`secret-rules-file\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SECRET\_RULES\_FILE\`
&#x20; Type: string
&#x20; Description: Path to a YAML file of secret rules to use instead of the built-in rules for \`--pre-commit-checks\` or \`--local\` scans. Use with \`--secrets\`. Generate the file with \`endorctl api list -r SecretRule -o yaml --list-all\`.

&#x20;&#x20;

### SAST scan flags




&#x20; \- Flag: \`sast\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SAST\`
&#x20; Type: boolean
&#x20; Description: Scan for weaknesses in your source code based on the enabled rules and generate results based on the configured finding policies. See also \`--disable-code-snippet-storage\`. See \[SAST scan]\(/scan/sast/run-a-sast-scan) for more information.

&#x20; \- Flag: \`disable-code-snippet-storage\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DISABLE\_CODE\_SNIPPET\_STORAGE\`
&#x20; Type: boolean
&#x20; Description: Do not store or display the source code related to a finding.

&#x20; \- Flag: \`ai-sast\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\`
&#x20; Type: boolean
&#x20; Description: Enable the AI SAST detection agent to identify security vulnerabilities beyond traditional rule-based detection. See \[AI SAST detection agent]\(/scan/ai-sast/detection-agent) for more information. Requires an Endor Code Pro license.

&#x20; \- Flag: \`ai-sast-rescan\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\_RESCAN\`
&#x20; Type: boolean
&#x20; Description: Run a full AI SAST detection scan instead of an incremental one, ignoring cached results. A full detection scan deletes stored findings that it does not detect again. See \[When rules take effect]\(/scan/ai-sast/ai-context#when-rules-take-effect). Use with \`--ai-sast\`.

&#x20; \- Flag: \`diff-scope\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DIFF\_SCOPE\`
&#x20; Type: string
&#x20; Description: Limit SAST, secrets, and AI SAST scans to changed files only. Set to \`local\` to scan files with local edits compared to \`HEAD\`, including staged, unstaged, and untracked changes. Set to \`baseline\` to scan files that differ between the current checkout and the repository's default branch. Set together with \`--sast\`, \`--secrets\`, or \`--ai-sast\`. Cannot be combined with PR scan flags or other scope-defining flags such as \`--pre-commit-checks\`, \`--local\`, \`--git-logs\`, or \`--force-rescan\`. Available in endorctl v1.7.1040 and later. See \[AI SAST diff scans]\(/scan/ai-sast#ai-sast-diff-scans) and \[Scan changed files only]\(/scan/secrets/scan-secrets#scan-changed-files-only).

&#x20; \- Flag: Not applicable
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SEMGREP\_VERBOSE\`
&#x20; Type: boolean
&#x20; Description: Enable verbose output for SAST scans to show detailed information about rule execution, file parsing status, and scan progress.

&#x20; \- Flag: Not applicable
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SEMGREP\_DEBUG\`
&#x20; Type: boolean
&#x20; Description: Enable debug output for SAST scans, which includes all verbose information plus additional debugging details to help troubleshoot scan issues.


&#x20;&#x20;

Do not use! Draft content. Development in progress.

The following AI SAST flags do not appear in `endorctl scan --help`. Use them for AI SAST rollouts, benchmarking, and advanced configurations.

&#x20;   \- Flag: \`ai-sast-include-test-files\`
&#x20;   Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\_INCLUDE\_TEST\_FILES\`
&#x20;   Type: boolean
&#x20;   Description: Include test files in AI SAST indexing and scanning. By default, AI SAST skips test files to reduce noise and cost. Use with \`--ai-sast\`.

&#x20;   \- Flag: \`ai-sast-llm-config-paths\`
&#x20;   Environment\_Variable: \`ENDOR\_SCAN\_AI\_SAST\_LLM\_CONFIG\_PATHS\`
&#x20;   Type: string slice
&#x20;   Description: Additional repo-relative paths to LLM configuration files such as \`CLAUDE.md\`, \`SKILL.md\`, or agent rules to index alongside the auto-discovered ones. Repeat the flag or pass a comma-separated list. Use with \`--ai-sast\`.

&#x20;  &#x20;

### Sandbox flags




&#x20; \- Flag: \`install-build-tools\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_INSTALL\_BUILD\_TOOLS\`
&#x20; Type: boolean
&#x20; Description: Install build tools in a self-contained sandbox.

&#x20; \- Flag: \`use-scan-profile\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_USE\_SCAN\_PROFILE\`
&#x20; Type: boolean
&#x20; Description: Use a scan profile to run a scan in a self-contained sandbox.


&#x20;&#x20;

### Miscellaneous flags



&#x20; \- Flag: \`as-default-branch\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_AS\_DEFAULT\_BRANCH\`
&#x20; Type: boolean
&#x20; Description: Set this as the default branch.


&#x20; \- Flag: \`dependencies\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DEPENDENCIES\`
&#x20; Type: boolean
&#x20; Description: Scan Git commits and generate findings for all dependencies.

&#x20; \- Flag: \`dry-run\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DRY\_RUN\`
&#x20; Type: boolean
&#x20; Description: Run the scan in dry run mode. When enabled, Endor Labs does not store scan results and needs only read-only access. Use this flag only with SCA (dependencies), SAST, AI SAST, or secrets scanning. When used with \`--ai-sast\`, you must also set \`--diff-scope\` to scope the scan to changed files.

&#x20; \- Flag: \`detached-ref-name\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_DETACHED\_REF\_NAME\`
&#x20; Type: string
&#x20; Description: Set the name of the Git reference to a user-provided name. For example, \`--detached-ref-name="\$CI\_DEFAULT\_BRANCH"\`. Use with CI environments that checkout commits, such as GitLab.

&#x20; \- Flag: \`exclude-path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_EXCLUDE\_PATH\`
&#x20; Type: string
&#x20; Description: Specify one or more file paths or directories to exclude from the scan using Glob style expressions. For example, \`--exclude-path="src/java/\*\*"\` excludes all files under \`src/java\`, including any subdirectories, while \`--exclude-path="src/java/\*"\` only excludes the files directly under \`src/java\`. Paths must be relative to the root of the repository. Use quotes to ensure that your shell does not expand wild cards.

&#x20; \- Flag: \`finding-tags\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_FINDING\_TAGS\`
&#x20; Type: string
&#x20; Description: Specify a list of user-defined tags to add to findings for objects in this scan scope. Use in combination with options such as \`--include-path\` or \`--exclude-path\`. Use finding tags to search and filter findings later.

&#x20; \- Flag: \`ghactions\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_GHACTIONS\`
&#x20; Type: boolean
&#x20; Description: Scan and discover GitHub action workflows in your CI/CD pipeline.

&#x20; \- Flag: \`include-path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_INCLUDE\_PATH\`
&#x20; Type: string
&#x20; Description: Limit the scan to the specified file paths or directories using Glob style expressions. For example, \`--include-path="src/java/\*\*"\` scans all the files under \`src/java\`, including any subdirectories, while \`--include-path="src/java/\*"\` only includes the files directly under \`src/java\`. Paths must be relative to the root of the repository. Use quotes to ensure that your shell does not expand wild cards.

&#x20; \- Flag: \`l\`, \`languages\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_LANGUAGES\`
&#x20; Type: string
&#x20; Description: Set programming languages to scan. Used to limit scanning to specific languages. \<p> If your project contains multiple programming languages, you can specify them as a comma-separated list as: \`c#,go,java,javascript,kotlin,php,python,ruby,rust,scala,swift,typescript,swifturl\`. \<p> See \`segment-match-languages\` to scan C and C++ projects.\</p>

&#x20; \- Flag: \`o\`, \`output-type\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SUMMARY\_OUTPUT\_TYPE\`
&#x20; Type: string
&#x20; Description: Set output format to \`json\`, \`yaml\`, \`table\`, \`summary\`, or \`table-verbose\`. Summary only displays policy violations (default: \`table\`).

&#x20; \- Flag: \`package\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PACKAGE\`
&#x20; Type: boolean
&#x20; Description: Scan binaries and artifacts. You must provide the path of your file using \`--path\` and specify a name for your project using \`--project-name\` parameters.

&#x20; \- Flag: \`p\`, \`path\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PATH\`
&#x20; Type: string
&#x20; Description: Set path to local repository to scan. For example, \`--path=/Users/endorlabs/github/myrepo\`.

&#x20; \- Flag: \`project-name\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PROJECT\_NAME\`
&#x20; Type: string
&#x20; Description: Give a name for the project while scanning binaries and artifacts. Use with the \`--package\` parameter.

&#x20; \- Flag: \`project-tags\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_PROJECT\_TAGS\`
&#x20; Type: string
&#x20; Description: Specify a list of user-defined tags to add to this project.

&#x20; \- Flag: \`registries\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_REGISTRIES\`
&#x20; Type: string
&#x20; Description: Registries to use along with public or namespace registries. Format - \`\\"user:password\@ecosystem://registry#priority\\"\`.

&#x20; \- Flag: \`s\`, \`sarif-file\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SUMMARY\_SARIF\_FILE\`
&#x20; Type: string
&#x20; Description: Set the file path for saving scan results in SARIF format. \<p> SARIF output includes vulnerability aliases, such as CVE IDs, GHSA IDs, and other OSV identifiers, for SCA findings.

&#x20; \- Flag: \`segment-match-languages\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_SEGMENT\_MATCH\_LANGUAGES\`
&#x20; Type: string
&#x20; Description:  Set programming languages to scan using segment-based analysis and to scan C/C++. Specify \`--segment-match-languages=c\` to scan C and C++. Using this flag clears the default scan languages. You can specify additional languages to scan using the \`--languages\` flag.

&#x20; \- Flag: \`tags\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_TAGS\`
&#x20; Type: string
&#x20; Description: Specify a list of user-defined tags to add to this scan. Use tags to search and filter scans later.

&#x20; \- Flag: \`use-local-repo-cache\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_USE\_LOCAL\_CACHE\`
&#x20; Type: boolean
&#x20; Description: Use the local cache for dependency resolution. \*Make sure that \`mvn install -U\` is successful and include \[\`mvn dependency\`]\(https\://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin) and \[\`mvn help\`]\(https\://mvnrepository.com/artifact/org.apache.maven.plugins/maven-help-plugin) plugins in the local m2 cache. For Gradle complete \`gradle assemble --refresh-dependencies\`.\*

&#x20; \- Flag: \`uuid\`
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_UUID\`
&#x20; Type: string
&#x20; Description: Scan the specified project UUID.

&#x20; \- Flag: Not applicable
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_EMBEDDINGS\`
&#x20; Type: boolean
&#x20; Description: Controls the use of code segment embeddings during a scan. Set to \`false\` to turn off embeddings for a specific scan, or \`true\` to turn them on. This setting overrides the system-wide configuration. See \[Enable code segment embeddings]\(/scan/sca/c#enable-code-segment-embeddings) for more information.

&#x20; \- Flag: Not applicable
&#x20; Environment\_Variable: \`ENDOR\_SCAN\_ENABLE\_CONAN\`
&#x20; Type: boolean
&#x20; Description: Enable Conan package manager scanning. Conan scanning is disabled by default, and there is no \`endorctl\` flag to enable it. See \[Scan C/C++ projects with Conan]\(/scan/sca/c#scan-c/c++-projects-with-conan) for more information.


&#x20;&#x20;


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