Skip to main content
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.
If your project contains multiple programming languages, you can specify them as a comma-separated list using the --languages flag.
Provide <languages-list> as a comma-separated list using the supported languages: c,c#,cpp,go,gosu,java,javascript,kotlin,php,python,ruby,rust,scala,swift,typescript. To scan for leaked secrets and monitor all results in the checked out version of your repository, run the following command.
Run the following command to perform a regular scan for leaked secrets including the dependencies.
Run the following command to scan for leaked secrets in all branches of your repository.
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.
To scan for misconfigurations in a GitHub repository such as https://github.com/endorlabs/app-java-demo, run the following commands.
To run a scan as a test in a pull request without monitoring the version of your code over time, run the following command.
To scan workflow files under .github/workflows and discover Actions used in your pipelines, run the following command.
For CI integration options including the GitHub App and the Endor Labs GitHub Action, see GitHub Actions scanning. 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.
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.
To run a scan in dry run mode with local scanning and read-only access, run the following command. Dry run mode is best for developers running local scans.
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. Endor Labs does not store dry run results. endorctl keeps the results in memory and discards them when the scan ends, so they don’t appear in the Endor Labs user interface or the API. Dry run scans also don’t send notifications or export data to data exporters. To keep the results of a dry run, write them to a local file. Set --output-type to json or yaml and redirect the output, or set --sarif-file. Use a separate file for each run so you can compare the results after all the runs complete.
To store the results in Endor Labs and view them in the Endor Labs user interface, run the scan without --dry-run.

Options

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

AI model discovery flags

Bazel flags

Pull request (CI) flags

GitHub configuration flags

Call graph flags

Policy flags

Secrets scan flags

SAST scan flags

Sandbox flags

Miscellaneous flags