This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

toolchains

Use the toolchains command to detect the tools in your repository and create a scan profile.

This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Use the toolchains command to detect the tools in your repository and create a scan profile.

Use the endorctl toolchains command to detect the current tools used in your repository. You can also create a scan profile.

Note
Toolchain commands are not supported on Windows.
  • Use the help argument to see the options associated with toolchains command.

    endorctl toolchains --help
    

Use endorctl detect to identify the tools currently used in your repository. The following arguments can help you refine your scan:

  • Use the -p argument to define the local filesystem path to the repository you want to scan.

    endorctl toolchains detect -p <path_to_repository>
    
  • Use the --exclude-path argument to exclude specific file paths or directories.

    endorctl toolchains detect -p <path_to_repository> --exclude-path 'python/**'
    
  • Use the --include-path argument to limit the scan to a specific file path or directory.

    endorctl toolchains detect -p <path_to_repository> --include-path 'development/**'
    

Use endorctl generate to create a scan profile. See Configure build tools for more details.

  • Use the profile-name argument to assign a name to your profile. This command creates a .endorctl/scanprofile.yaml file with the tools in the repository.

    endorctl toolchains generate -p <path_to_repository>  --profile-name <profile-name>
    
  • Use the output-type argument to specify the format of the output file.

    endorctl toolchains generate -p <path_to_repository> --profile-name <profile-name> --output-type <output-type>
    
  • Use the --output-path argument to set the location where the output file will be saved.

    endorctl toolchains generate -p <path_to_repository> --profile-name <profile-name> --output-type json --output-path <output-path>
    
  • Use the --create-profile argument to create and save the scan profile using the specified options.

    endorctl toolchains generate -p <path_to_repository> --profile-name <profile-name> --create-profile
    

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

Flag Environment Variable Type Description
p, path ENDOR_TOOLCHAINS_PATH string Set the path on the local filesystem to the repository to scan. Default is ..
arch ENDOR_TOOLCHAINS_ARCH string Set the toolchain architecture (amd64 or arm64).
os ENDOR_TOOLCHAINS_OS string Set the toolchain operating system (linux or darwin).
exclude-path ENDOR_TOOLCHAINS_EXCLUDE_PATH string Specify one or more file paths or directories to exclude from the scan using Glob style expressions. For example, src/java/** excludes all files 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.
include-path ENDOR_TOOLCHAINS_INCLUDE_PATH string Limit the scan to the specified file paths or directories using Glob style expressions. For example, src/java/** includes all files 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.