Skip to content

Commit 30df4d2

Browse files
dhi: cosign feedback (#22999)
<!--Delete sections as needed --> ## Description Added important callout that cosign requires logging into Hub and Scout. Updated associated examples to only tested commands. ## Related issues or tickets ENGDOCS-2800 ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review Signed-off-by: Craig <[email protected]>
1 parent 84e8c6c commit 30df4d2

File tree

3 files changed

+42
-16
lines changed

3 files changed

+42
-16
lines changed

content/manuals/dhi/about/test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ You can view and verify this attestation using the Docker Scout CLI.
142142
```
143143

144144
If the attestation is valid, Docker Scout will confirm the signature and show
145-
the matching Cosign verify-attestation command.
145+
the matching `cosign verify` command.
146146

147147
To view other attestations, such as SBOMs or vulnerability reports, see [Verify
148148
an image](../how-to/verify.md).

content/manuals/dhi/core-concepts/sbom.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,23 @@ $ docker scout sbom <image-name>:<tag>
6767

6868
## Verify the SBOM of a Docker Hardened Image
6969

70-
Since Docker Hardened Images come with signed SBOMs, you can use Cosign to
70+
Since Docker Hardened Images come with signed SBOMs, you can use Docker Scout to
7171
verify the authenticity and integrity of the SBOM attached to the image. This
7272
ensures that the SBOM has not been tampered with and that the image's contents
7373
are trustworthy.
7474

75-
To verify the SBOM of a Docker Hardened Image using Cosign, use the following command:
75+
To verify the SBOM of a Docker Hardened Image using Docker Scout, use the following command:
7676

7777
```console
78-
$ cosign verify-attestation \
79-
--key https://registry.scout.docker.com/keyring/dhi/latest.pub \
80-
--type sbom \
81-
<image-reference>
78+
$ docker scout attest get <image-name>:<tag> \
79+
--predicate-type https://scout.docker.com/sbom/v0.1 --verify --platform <platform>
8280
```
8381

84-
For example, to verify the SBOM attestation for the dhi/node image:
82+
For example, to verify the SBOM attestation for the `dhi/node:20.19-debian12-fips-20250701182639` image:
8583

8684
```console
87-
$ cosign verify-attestation \
88-
--key https://registry.scout.docker.com/keyring/dhi/latest.pub \
89-
--type sbom \
90-
registry.scout.docker.com/dhi/node@sha256:6de8ac9c07367652496bf926675425a22bf93e487cc2690d6778a82dd0159c4f
85+
$ docker scout attest get docs/dhi-node:20.19-debian12-fips-20250701182639 \
86+
--predicate-type https://scout.docker.com/sbom/v0.1 --verify --platform linux/amd64
9187
```
9288

9389
## Resources

content/manuals/dhi/how-to/verify.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ offers several key advantages when working with Docker Hardened Images:
5757

5858
In short, Docker Scout streamlines the verification process and reduces the chances of human error, while still giving you full visibility and the option to fall back to cosign when needed.
5959

60-
61-
6260
### List available attestations
6361

6462
To list attestations for a mirrored DHI:
@@ -105,9 +103,26 @@ $ docker scout attest get \
105103
docs/dhi-python:3.13 --platform linux/amd64
106104
```
107105

108-
### Validate and show the equivalent cosign command
106+
### Validate the attestation with Docker Scout
107+
108+
To validate the attestation using Docker Scout, you can use the `--verify` flag:
109+
110+
```console
111+
$ docker scout attest get <image-name>:<tag> \
112+
--predicate-type https://scout.docker.com/sbom/v0.1 --verify
113+
```
109114

110-
You can use the `--verify` flag to validate the attestation and print the corresponding [cosign](https://docs.sigstore.dev/) command:
115+
For example, to verify the SBOM attestation for the `dhi/node:20.19-debian12-fips-20250701182639` image:
116+
117+
```console
118+
$ docker scout attest get docs/dhi-node:20.19-debian12-fips-20250701182639 \
119+
--predicate-type https://scout.docker.com/sbom/v0.1 --verify
120+
```
121+
122+
### Show the equivalent cosign command
123+
124+
When using the `--verify` flag, it also prints the corresponding
125+
[cosign](https://docs.sigstore.dev/) command to verify the image signature:
111126

112127
```console
113128
$ docker scout attest get \
@@ -137,6 +152,21 @@ Example output:
137152
...
138153
```
139154

155+
> [!IMPORTANT]
156+
>
157+
> When using cosign, you must first authenticate to both the Docker Hub registry
158+
> and the Docker Scout registry.
159+
>
160+
> For example:
161+
>
162+
> ```console
163+
> $ docker login
164+
> $ docker login registry.scout.docker.com
165+
> $ cosign verify \
166+
> registry.scout.docker.com/docker/dhi-python@sha256:b5418da893ada6272add2268573a3d5f595b5c486fb7ec58370a93217a9785ae \
167+
> --key https://registry.scout.docker.com/keyring/dhi/latest.pub --experimental-oci11
168+
> ```
169+
140170
## Available DHI attestations
141171
142172
See [available

0 commit comments

Comments
 (0)