@@ -7,15 +7,21 @@ keywords: verify container image, docker scout attest, cosign verify, sbom valid
77---
88
99Docker Hardened Images (DHI) and charts include signed attestations that verify
10- the build process, contents, and security posture. These attestations are
11- available for each image variant and chart and can be verified using
12- [ cosign] ( https://docs.sigstore.dev/ ) or the Docker Scout CLI.
10+ the build process, contents, and security posture.
1311
1412Docker's public key for DHI images and charts is published at:
1513
1614- https://registry.scout.docker.com/keyring/dhi/latest.pub
1715- https://github.com/docker-hardened-images/keyring
1816
17+ Docker recommends using [ Docker Scout] ( /scout/ ) , but you can use
18+ [ ` regctl ` ] ( https://github.com/regclient/regclient ) and
19+ [ ` cosign ` ] ( https://docs.sigstore.dev/ ) to retrieve and verify attestations.
20+ Docker Scout offers several key advantages: it understands DHI attestation
21+ structures, automatically resolves platforms, provides human-readable summaries,
22+ validates in one step with ` --verify ` , and integrates tightly with Docker's
23+ attestation infrastructure.
24+
1925> [ !IMPORTANT]
2026>
2127> You must authenticate to the Docker Hardened Images registry (` dhi.io ` ) to
@@ -25,50 +31,21 @@ Docker's public key for DHI images and charts is published at:
2531>
2632> Run ` docker login dhi.io ` to authenticate.
2733
28- ## Verify image attestations with Docker Scout
29-
30- You can use the [ Docker Scout] ( /scout/ ) CLI to list and retrieve attestations for Docker
31- Hardened Images.
34+ ## Verify image attestations
3235
3336> [ !NOTE]
3437>
3538> Before you run ` docker scout attest ` commands, ensure any image that you have
3639> pulled locally is up to date with the remote image. You can do this by running
3740> ` docker pull ` . If you don't do this, you may see ` No attestation found ` .
3841
39- ### Why use Docker Scout instead of cosign directly?
40-
41- While you can use cosign to verify attestations manually, the Docker Scout CLI
42- offers several key advantages when working with Docker Hardened Images and charts:
43-
44- - Purpose-built experience: Docker Scout understands the structure of DHI
45- attestations and naming conventions, so you don't have to construct full
46- digests or URIs manually.
47-
48- - Automatic platform resolution: With Scout, you can specify the platform (e.g.,
49- ` --platform linux/amd64 ` ), and it automatically verifies the correct image
50- variant. Cosign requires you to look up the digest yourself.
51-
52- - Human-readable summaries: Scout returns summaries of attestation contents
53- (e.g., package counts, provenance steps), whereas cosign only returns raw
54- signature validation output.
55-
56- - One-step validation: The ` --verify ` flag in ` docker scout attest get ` validates
57- the attestation and shows the equivalent cosign command, making it easier to
58- understand what's happening behind the scenes.
59-
60- - Integrated with Docker Hub and DHI trust model: Docker Scout is tightly
61- integrated with Docker’s attestation infrastructure and public keyring,
62- ensuring compatibility and simplifying verification for users within the
63- Docker ecosystem.
64-
65- In short, Docker Scout streamlines the verification process and reduces the chances of human error, while still giving
66- you full visibility and the option to fall back to cosign when needed.
67-
6842### List available attestations
6943
7044To list attestations for a mirrored DHI image:
7145
46+ {{< tabs group="tool" >}}
47+ {{< tab name="Docker Scout" >}}
48+
7249> [ !NOTE]
7350>
7451> If the image exists locally on your device, you must prefix the image name with ` registry:// ` . For example, use
@@ -80,8 +57,47 @@ $ docker scout attest list dhi.io/<image>:<tag>
8057
8158This command shows all available attestations, including SBOMs, provenance, vulnerability reports, and more.
8259
60+ {{< /tab >}}
61+ {{< tab name="regctl" >}}
62+
63+ First, authenticate to both registries. Prepare a [ personal access token
64+ (PAT)] ( ../../security/access-tokens.md ) for your user with ` read only ` access:
65+
66+ ``` console
67+ $ export DOCKER_USERNAME=" YOUR_DOCKER_USERNAME"
68+ $ export DOCKER_PAT=" YOUR_DOCKER_PAT"
69+ $ export DOCKER_ORG=" YOUR_DOCKER_ORG"
70+ $ echo $DOCKER_PAT | regctl registry login -u " $DOCKER_USERNAME " --pass-stdin docker.io
71+ $ echo $DOCKER_PAT | regctl registry login -u " $DOCKER_USERNAME " --pass-stdin registry.scout.docker.com
72+ ```
73+
74+ Then list attestations using the ` --external ` flag. DHI repositories store image
75+ layers on ` dhi.io ` (or ` docker.io ` for mirrored images) and signed attestations
76+ in ` registry.scout.docker.com ` :
77+
78+ ``` console
79+ $ regctl artifact list docker.io/${DOCKER_ORG} /< image> :< tag> \
80+ --external registry.scout.docker.com/${DOCKER_ORG}/<image> \
81+ --platform linux/amd64
82+ ```
83+
84+ For example:
85+
86+ ``` console
87+ $ regctl artifact list docker.io/${DOCKER_ORG} /dhi-node:22 \
88+ --external registry.scout.docker.com/${DOCKER_ORG}/dhi-node \
89+ --platform linux/amd64
90+ ```
91+
92+
93+ {{< /tab >}}
94+ {{< /tabs >}}
95+
8396### Retrieve a specific attestation
8497
98+ {{< tabs group="tool" >}}
99+ {{< tab name="Docker Scout" >}}
100+
85101To retrieve a specific attestation, use the ` --predicate-type ` flag with the full predicate type URI:
86102
87103``` console
@@ -112,16 +128,28 @@ $ docker scout attest get \
112128 dhi.io/<image>:<tag>
113129```
114130
115- For example:
131+ {{< /tab >}}
132+ {{< tab name="regctl" >}}
133+
134+ Once you've listed attestations, download the full attestation artifact using the digest from the ` Name ` field:
116135
117136``` console
118- $ docker scout attest get \
119- --predicate-type https://cyclonedx.org/bom/v1.6 \
120- --predicate \
121- dhi.io/python:3.13
137+ $ regctl artifact get < attestation-digest> > attestation.json
122138```
123139
124- ### Validate the attestation with Docker Scout
140+ For example, to save a SLSA provenance attestation:
141+
142+ ``` console
143+ $ regctl artifact get registry.scout.docker.com/${DOCKER_ORG} /dhi-node@sha256:6cbf803796e281e535f2681de7cd33a1012202610322a50ee745d1bb02ac3c18 > slsa_provenance.json
144+ ```
145+
146+ {{< /tab >}}
147+ {{< /tabs >}}
148+
149+ ### Validate the attestation
150+
151+ {{< tabs >}}
152+ {{< tab name="Docker Scout" >}}
125153
126154To validate the attestation using Docker Scout, you can use the ` --verify ` flag:
127155
@@ -144,9 +172,41 @@ $ docker scout attest get dhi.io/node:20.19-debian12 \
144172 --predicate-type https://scout.docker.com/sbom/v0.1 --verify
145173```
146174
175+ {{< /tab >}}
176+ {{< tab name="cosign" >}}
177+
178+ Once you've listed the attestations and obtained the digest from the ` Name ` field, verify them using cosign:
179+
180+ ``` console
181+ $ cosign verify \
182+ <attestation-digest-from-name-field> \
183+ --key https://registry.scout.docker.com/keyring/dhi/latest.pub \
184+ --insecure-ignore-tlog=true
185+ ```
186+
187+ For example:
188+
189+ ``` console
190+ $ cosign verify \
191+ registry.scout.docker.com/${DOCKER_ORG}/dhi-node@sha256:6cbf803796e281e535f2681de7cd33a1012202610322a50ee745d1bb02ac3c18 \
192+ --key https://registry.scout.docker.com/keyring/dhi/latest.pub \
193+ --insecure-ignore-tlog=true
194+ ```
195+
196+ > [ !NOTE]
197+ >
198+ > The ` --insecure-ignore-tlog=true ` flag is needed because DHI attestations
199+ > may not be recorded in the public Rekor transparency log to protect private
200+ > customer information. The attestation signature is still verified against
201+ > Docker's public key.
202+
203+ {{< /tab >}}
204+ {{< /tabs >}}
205+
147206#### Handle missing transparency log entries
148207
149- When using ` --verify ` , you may sometimes see an error like:
208+ When using ` --verify ` with Docker Scout or ` cosign verify ` , you may sometimes
209+ see an error like:
150210
151211``` text
152212ERROR no matching signatures: signature not found in transparency log
0 commit comments