- AWS ECR
- Azure ACR
- Docker Hub
- GitHub Container Registry (GHCR)
- JFrog Artifactory
- Quay
endorctl container registry commands to list and scan images stored in your registry.
-
List images from a registry: Use
endorctl container registry listto preview which images match your filters before scanning. This lets you verify the scope and adjust filtering parameters such as--include,--exclude,--recent, and--limit. You can also save the results as a scan plan for the scan step. -
Scan images from a registry: Use
endorctl container registry scanto enumerate and scan container images from a registry in a single step. You can also provide a saved scan plan from the list command instead of enumerating the registry again.
List command
The list command connects to your registry, enumerates container images based on your configured filters, and prints a summary with a table of image paths. You can also save the results as a scan plan to reuse with the scan command.include, exclude, recent, and limit to narrow down the images returned. If you provide a namespace and API credentials, the saved plan automatically excludes already scanned images, so it is ready to scan only new or updated images.
Filters are applied in the following order:
- include
- exclude
- recent
- limit
endorctl container registry list command with the following flags.
Scan command
The scan command runs Endor Labs container scans on a set of images. You can pass a saved scan plan from the list command or enumerate the registry with the same filter flags as list. The command pulls each image if needed, runs the scan, and by default removes pulled images after scanning. The--namespace and API credentials are required. Images that are already scanned are automatically skipped.
-
Scan using a saved scan plan:
-
Scan using a registry type. When you do not use
--scan-plan, pass--registry-type.
endorctl container registry scan command with the following flags.
Supported container registries
Theendorctl container registry list and endorctl container registry scan commands support the following container registries. Use the Registry_type value for --registry-type and the Registry_host value for --registry.
You must specify the registry host with
--registry when you use Azure ACR or JFrog registries.For Quay registries, set --registry only for self-hosted instances. You must also specify --registry-namespace with the Quay user or organization name to enumerate repositories.Output format
The list and scan commands both produce output that includes summary lines and, when there are image rows, a table. The scan command shows this when--show-scan-plan is enabled.
If any image rows remain after filters, the command prints a table with the following columns:
Scan plan output
The scan plan is a JSON file written by theendorctl container registry list command with --save-as-plan and read by the scan command with --scan-plan. When list is run with --namespace and API credentials, the saved plan excludes images that are already scanned so that it is ready to scan only new or unscanned images. The structure is:
Container registry scanning with AWS ECR
The following commands use AWS ECR to show how to list images, apply filters, save a scan plan, and run scans. Use the appropriate--registry-type, --registry, and --registry-namespace values for other registries. See supported container registries to learn more.
- List all images in an AWS ECR registry.
- Filter images updated in the last 7 days, include only tags matching
latest, and exclude release candidate tags.
- Save the generated image list to a JSON scan plan file for use with the
container registry scancommand.
- List images including untagged manifests.
- List only images that match a preferred architecture such as
arm64when the repository contains multi-architecture images.
- Scan images defined in a previously saved scan plan file.
- AWS ECR authenticates using the AWS SDK default credential chain, which includes environment variables, shared credential files, and IAM roles.
- For Docker Hub, use
--registry-type=dockerhuband omit--reauthbecause it requires access to Docker Hub credentials for automated reauthentication. - For Quay, use
--registry-type=quayand provide--registry-namespacewith your Quay user or organization name. Omit--reauthbecause Quay requires manual login.
Troubleshooting
Authentication fails when listing or scanning images
Authentication fails when listing or scanning images
-
Ensure your registry credentials are valid and that the registry type and host are correct. Use
--reauthto refresh credentials when using AWS ECR or Azure ECR. - For Docker Hub, GHCR, and Quay, verify the environment variables or log in with the registry’s CLI.
-
For Quay, use
docker loginwith an OAuth token. -
For Azure ACR and JFrog, verify that
--registryis set.
Scan plan includes images I already scanned
Scan plan includes images I already scanned
-
Images that are already scanned are excluded only when you run list with
--namespaceand valid API credentials. Without them, the saved plan includes all matching images. -
Re-run
endorctl container registry listwith--namespaceand--exclude-scanned, save a new plan with--save-as-plan, then run the scan command with that plan.
How to generate a scan plan for a JFrog registry?
How to generate a scan plan for a JFrog registry?
Run the list command with your registry details and Replace
--save-as-plan to save the enumerated images to a JSON file.jfrog-host with your JFrog host and repo-key with your repository key.How to list images for a Quay registry?
How to list images for a Quay registry?
Run the list command with For a self-hosted Quay instance, set Replace
--registry-type=quay and --registry-namespace set to your Quay user or organization name.--registry to your Quay host.myorg with your Quay user or organization name and http://localhost:8080 with your self-hosted Quay registry URL.