anchorectl image

Image related operations.

Every command on this page also accepts the global flags.

Subcommands

image add

Analyze a container image.

anchorectl image add IMAGE [flags]

Arguments

ArgumentDescription
IMAGEThe container image to analyze (e.g. docker.io/library/nginx:latest).

Examples

# Submit image for addition to Anchore Enterprise (Anchore Enterprise will pull
# image from registry and perform full analysis)

anchorectl image add ghcr.io/place/thing:v0.1.0

# Submit image for addition to Anchore Enterprise (anchorectl will perform full
# local image analysis, SBOM + additional analysis pushed to Anchore Enterprise)

anchorectl image add ghcr.io/place/thing:v0.1.0 --from docker

# Submit image for addition to Anchore Enterprise (anchorectl will perform full
# local image analysis from a local podman daemon image, SBOM + additional
# analysis pushed to Anchore Enterprise; falls back to the registry if the image
# is not present in the local podman daemon)

anchorectl image add ghcr.io/place/thing:v0.1.0 --from podman

# Submit image for addition to Anchore Enterprise (use SBOM generated by Syft,
# no additional analysis performed, and push to Anchore Enterprise)

syft -o json ghcr.io/place/thing:v0.1.0 | anchorectl image add ghcr.io/place/thing:v0.1.0 --from -

# Submit and wait for analysis to complete

anchorectl image add ghcr.io/place/thing:v0.1.0 --wait

# Submit and get results once analysis is completed

anchorectl image add ghcr.io/place/thing:v0.1.0 --get content,vulnerabilities=/path/to/vulns.json

# Submit and fetch all results to a directory

anchorectl image add ghcr.io/place/thing:v0.1.0 --get all=/path/to/dir

# Submit image for addition to Anchore Enterprise and perform a STIG evaluation locally

anchorectl image add ghcr.io/place/thing:v0.1.0 --stig --stig-profile /path/to/profile --stig-input-file /path/to/inputfile

# Associate the added image with an app version (preferred v6 path; the
# --application/-a flag on this command is deprecated and will be removed
# in a future release)

anchorectl app version asset add container-image-remote ghcr.io/place/thing:v0.1.0 --app myapp --version v3.1.4 --asset thing

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--annotationstring (repeatable)ANCHORECTL_IMAGE_ANNOTATION[]NoOne or more key-value annotations to add on the image in Anchore Enterprise (format: key=value).
-a, --applicationstringANCHORECTL_APPLICATION""NoDeprecated. Associate the image with an application at a specific version in the format app@version (example: [email protected]); use anchorectl app version asset add container-image-remote instead.
-d, --dockerfilestringANCHORECTL_IMAGE_DOCKERFILE""NoPath to the Dockerfile for this image.
-f, --forceboolANCHORECTL_FORCEfalseNoRe-analyze the image even if it has already been analyzed.
--fromstringANCHORECTL_IMAGE_FROM""NoAnalyze from the given source (default: "", indicating that Anchore Enterprise will pull the image from the registry; allowable-values: <path-to-syft-SBOM>, -, docker, podman, registry, docker-archive) (docker and podman: if the image is not present in the daemon it is pulled from the registry).
-g, --getstring (repeatable)ANCHORECTL_IMAGE_GET[]NoGet results and optionally write the raw results to a file (example: content or content=./path/to/file.json or all=/path/to/dir; allowable-keys: image-metadata, sbom, sbomspdx, sbomcyclonedx, content, vulnerability, policy-evaluation, all).
-n, --no-auto-subscribeboolANCHORECTL_IMAGE_NO_AUTO_SUBSCRIBEfalseNoDo not automatically scan newly pushed tags to the registry for the given image.
-p, --platformstringANCHORECTL_IMAGE_PLATFORM""NoAn optional platform specifier for use with --from registry target type (e.g. linux/arm64, linux/arm64/v8, arm64, linux).
--stigboolANCHORECTL_STIGfalseNoPerform a STIG evaluation on the image.
--stig-container-manual-overridestringANCHORECTL_STIG_CONTAINER_MANUAL_OVERRIDE""NoDocker container ID to use as the STIG target (skips creating container with anchore-keep-alive binary).
--stig-input-filestring (repeatable)ANCHORECTL_STIG_INPUT_FILE[]NoPath to input file to use for STIG generation (optional).
--stig-output-dirstringANCHORECTL_STIG_OUTPUT_DIR""NoPath to save the STIG evaluation (optional).
--stig-profilestringANCHORECTL_STIG_PROFILE""NoPath to STIG profile (required when --stig is set).
--stig-tools-binary-pathstringANCHORECTL_STIG_TOOLS_BINARY_PATH""NoPath to the statically-linked busybox binary inside the tools image (default: /bin/busybox).
--stig-tools-imagestringANCHORECTL_STIG_TOOLS_IMAGE""NoContainer image containing a statically-linked busybox binary for shell-less image support (e.g. docker.io/library/busybox:musl). The binary must be statically linked to work in distroless containers.
--stig-waiver-filestring (repeatable)ANCHORECTL_STIG_WAIVER_FILE[]NoPath to waiver file to use for STIG generation. The waiver file can waive controls and dictate the running and/or reporting of those controls (optional).
-w, --waitboolANCHORECTL_IMAGE_WAITfalseNoWait for the analysis to complete.

image ancestors

List analyzed ancestor images, which are the images that form the base layers of the image.

anchorectl image ancestors IMAGE [flags]

Aliases: ancestor

Arguments

ArgumentDescription
IMAGEThe image to fetch the ancestors for (can be a digest, id, or registry/repo:tag).

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-b, --baseboolANCHORECTL_ANCESTOR_BASEfalseNoOnly show the analyzed ancestor image with the fewest layers.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, id. See Output Formats.
-p, --parentboolANCHORECTL_ANCESTOR_PARENTfalseNoOnly show the analyzed ancestor image with the most layers.

image check

Get the policy evaluation for the given image.

anchorectl image check IMAGE [flags]

Aliases: evaluate

Arguments

ArgumentDescription
IMAGEThe image to fetch the policy evaluation for (can be a digest, id or registry/repo:tag). If supplying a digest or image id, a tag must be supplied with the -t flag.

Examples

# Evaluate the active policy against an image
anchorectl image check registry.example.com/my-service:1.4.0

# Show every failing gate, and exit 1 when the evaluation result is fail
anchorectl image check registry.example.com/my-service:1.4.0 --detail --fail-based-on-results

# Evaluate against a specific policy instead of the active one
anchorectl image check registry.example.com/my-service:1.4.0 --policy strict-policy

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--base-digeststringANCHORECTL_IMAGE_CHECK_BASE_DIGESTautoNoBase image digest to compare against so findings report inherited_from_base; auto resolves the base image automatically, empty disables the comparison.
--detailboolANCHORECTL_IMAGE_CHECK_DETAILfalseNoShow each failed gate within the policy evaluation report.
-f, --fail-based-on-resultsboolANCHORECTL_FAIL_BASED_ON_RESULTSfalseNoSet the return code to 1 if the policy evaluation result shows as fail.
--historyboolANCHORECTL_IMAGE_CHECK_HISTORYfalseNoShow all previous policy evaluations.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results (HTML available with --detail). Allowable values: text, json, json-raw, id, csv, html. See Output Formats.
-d, --output-directorystringANCHORECTL_OUTPUT_DIRECTORY""NoOptional output directory to write results to.
-p, --policystringANCHORECTL_POLICY""NoThe policy name or ID to evaluate against (if not provided the default policy is used).
-t, --tagstringANCHORECTL_IMAGE_TAG""NoSpecify which tag (repo:tag) is evaluated for a given image ID or Image digest.

image content

Get image content.

anchorectl image content IMAGE [flags]

Aliases: contents

Arguments

ArgumentDescription
IMAGEThe image ID, digest, or name:tag to fetch content of.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-a, --available-typesboolANCHORECTL_AVAILABLE_TYPESfalseNoOnly show available content types and exit.
--filestringANCHORECTL_FILE""NoA file path to write a .tar file containing all retrieved files.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.
--overwriteboolANCHORECTL_OVERWRITEfalseNoWrite over an existing file when saving retrieved files tarball.
-t, --typestring (repeatable)ANCHORECTL_CONTENT_TYPES[]NoFilter down results to one or more vulnerability types; use --available-types to see valid values (default: fetch all available types).

image delete

Delete an image analysis.

anchorectl image delete IMAGE... [flags]

Aliases: del

Arguments

ArgumentDescription
IMAGEOne or more images to delete (can be a digest, id or registry/repo:tag). If no tag supplied defaults to latest.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-a, --allboolfalseNoDelete all images.
-f, --forceboolANCHORECTL_IMAGE_DELETE_FORCEfalseNoForce deletion of image by cancelling any subscription/notification settings prior to image delete.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

image get

Get information about a single image.

anchorectl image get IMAGE [flags]

Arguments

ArgumentDescription
IMAGEThe image ID, name:tag, name@sha256:digest, name:tag@sha256:digest, or sha256:digest value.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-i, --digeststringANCHORECTL_IMAGE_DIGEST""NoThe image digest.
--historyboolANCHORECTL_IMAGE_HISTORYfalseNoShow history of images that match the input image.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

image list

List all images visible to the user.

anchorectl image list [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-s, --analysis-statusstringANCHORECTL_IMAGE_ANALYSIS_STATUS""NoFilter by analysis_status value on the record. Allowable values: not_analyzed, analyzed, analyzing, analysis_failed.
--historyboolANCHORECTL_IMAGE_HISTORYfalseNoInclude full history of images (duplicate tags with previous content).
-i, --imagestringANCHORECTL_IMAGE_NAME""NoTag-based docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1).
--image-statusstringANCHORECTL_IMAGE_STATUSactiveNoFilter by “image_status” value on the record. Allowable values: all, active, deleting.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

image metadata

Get image metadata.

anchorectl image metadata IMAGE [flags]

Arguments

ArgumentDescription
IMAGEThe image ID, digest, or name:tag to fetch metadata of.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--filestringANCHORECTL_FILE""NoA file path to write the metadata out to.
--overwriteboolANCHORECTL_OVERWRITEfalseNoWrite over existing metadata files.
-t, --typestringANCHORECTL_METADATA_TYPE""NoFilter down results to one or more vulnerability types (run command without this flag to see available types for the given image).

image one-time-scan

Analyze a container image.

anchorectl image one-time-scan IMAGE [flags]

Arguments

ArgumentDescription
IMAGEThe container image to analyze (e.g. docker.io/library/nginx:latest).

Examples

anchorectl image one-time-scan ghcr.io/anchore/enterprise-test-images:latest

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--detailboolANCHORECTL_DETAILfalseNoShow policy evaluation details (always enabled for HTML output).
--dockerfilestringANCHORECTL_DOCKERFILE""NoPath to Dockerfile to use for analysis.
--extended-supportstringANCHORECTL_EXTENDED_SUPPORT""NoUse Extended Update Support (EUS) data during the vulnerability scan. Will use the system configured behaviour if not provided. Allowable values: true, false.
--fail-on-policy-errorboolANCHORECTL_FAIL_ON_POLICY_ERRORfalseNoFail if policy evaluation fails.
-o, --formatstringANCHORECTL_FORMATtextNoOutput format (text, JSON, json-raw, HTML).
--fromstringANCHORECTL_FROMregistryNoSource of the image to analyze (registry, docker, or podman) (docker and podman: if the image is not present in the daemon it is pulled from the registry).
-d, --output-directorystringANCHORECTL_OUTPUT_DIRECTORY""NoOptional output directory to write results to.
--platformstringANCHORECTL_PLATFORM""NoPlatform to use for analysis.
-p, --policystringANCHORECTL_POLICY""NoPolicy bundle (name or id) to use for evaluation.

image sbom

Get image SBOM in the native Anchore format.

anchorectl image sbom IMAGE [flags]

Arguments

ArgumentDescription
IMAGEThe image reference (ID, digest, name:tag).

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-x, --exclude-filesboolANCHORECTL_EXCLUDE_FILESfalseNoExclude files from the SBOM (this only valid for CycloneDX formats.
-f, --filestringANCHORECTL_FILE""NoWrite the SBOM content to a file (instead of STDOUT).
-o, --outputstringsyft-jsonNoReport output format, options: cyclonedx-json, cyclonedx-xml, purls, spdx-json, spdx-tag-value, syft-json, table, text. See Output Formats.
--overwriteboolANCHORECTL_OVERWRITEfalseNoWrite over existing SBOM files.

image vulnerabilities

Get image vulnerabilities.

anchorectl image vulnerabilities IMAGE [flags]

Aliases: vulns, vuln

Arguments

ArgumentDescription
IMAGEThe image ID, digest, or name:tag to fetch vulnerabilities for.

Examples

# All vulnerabilities for an image
anchorectl image vulnerabilities registry.example.com/my-service:1.4.0

# Only OS package findings the vendor has not marked as won't-fix
anchorectl image vulnerabilities registry.example.com/my-service:1.4.0 --type os --vendor-only

# Write JSON results to a directory. --output-directory accepts only
# json, json-raw, html, and csv
anchorectl image vulnerabilities registry.example.com/my-service:1.4.0 --output json --output-directory ./reports

# CycloneDX output requires an image digest, not a tag
anchorectl image vulnerabilities sha256:<DIGEST> --output cyclonedx-json

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--annotationsstring (repeatable)ANCHORECTL_VULNERABILITY_ANNOTATIONS[]NoFilter results to include only vulnerabilities with the given annotation status. Accepts a comma separated list of: not_affected, affected, fixed, under_investigation.
-a, --available-typesboolfalseNoOnly show available vulnerability types and exit.
--include-descriptionboolANCHORECTL_VULNERABILITY_INCLUDE_DESCRIPTIONfalseNoInclude full descriptions in the vulnerability result.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, csv, cyclonedx-json, cyclonedx-xml, html. See Output Formats.
-d, --output-directorystringANCHORECTL_OUTPUT_DIRECTORY""NoOptional output directory to write results to.
-r, --refreshboolANCHORECTL_VULNERABILITY_REFRESHfalseNoRefresh the vulnerability match results against the original artifact.
-t, --typestring (repeatable)ANCHORECTL_VULNERABILITY_TYPE[]NoFilter down results to one or more vulnerability types.
--vendor-onlyboolANCHORECTL_VULNERABILITY_VENDOR_ONLYfalseNoFilter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data. When set to true, it will filter out all vulnerabilities where will_not_fix is False. If false all vulnerabilities are returned regardless of will_not_fix.
Last modified September 22, 2026