Skip to content

Commit f4d7038

Browse files
chrispatrickgithub-actions[bot]
authored andcommitted
[BOT] Update docs for v1.20.1 release
1 parent 83df7af commit f4d7038

File tree

7 files changed

+451
-75
lines changed

7 files changed

+451
-75
lines changed

docs/docker_scout_compare.yaml

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,39 @@ command: docker scout compare
22
aliases: docker scout compare, docker scout diff
33
short: Compare two images and display differences (experimental)
44
long: |-
5-
The docker scout compare command analyzes two images and displays a comparison of both.
5+
The `docker scout compare` command analyzes two images and displays a comparison.
66
7-
This command is experimental and its behaviour might change in the future
7+
> This command is **experimental** and its behaviour might change in the future
88
9-
The main usage is to compare two versions of the same image.
10-
For instance when a new image is built and compared to the version running in production.
9+
The intended use of this command is to compare two versions of the same image.
10+
For instance, when a new image is built and compared to the version running in production.
1111
12-
If no image is specified, the most recently built image will be used.
12+
If no image is specified, the most recently built image is used
13+
as a comparison target.
1314
1415
The following artifact types are supported:
1516
1617
- Images
1718
- OCI layout directories
18-
- Tarball archives, as created by docker save
19+
- Tarball archives, as created by `docker save`
1920
- Local directory or file
2021
21-
The tool analyzes the provided software artifact, and generates a vulnerability report.
22-
2322
By default, the tool expects an image reference, such as:
2423
25-
- redis
26-
- curlimages/curl:7.87.0
27-
- mcr.microsoft.com/dotnet/runtime:7.0
24+
- `redis`
25+
- `curlimages/curl:7.87.0`
26+
- `mcr.microsoft.com/dotnet/runtime:7.0`
2827
2928
If the artifact you want to analyze is an OCI directory, a tarball archive, a local file or directory,
3029
or if you want to control from where the image will be resolved, you must prefix the reference with one of the following:
3130
32-
- image:// (default) use a local image, or fall back to a registry lookup
33-
- local:// use an image from the local image store (don't do a registry lookup)
34-
- registry:// use an image from a registry (don't use a local image)
35-
- oci-dir:// use an OCI layout directory
36-
- archive:// use a tarball archive, as created by docker save
37-
- fs:// use a local directory or file
38-
- sbom:// use an SBOM as SPDX file or in-toto attestation file with SPDX predicate or syft json SBOM file
31+
- `image://` (default) use a local image, or fall back to a registry lookup
32+
- `local://` use an image from the local image store (don't do a registry lookup)
33+
- `registry://` use an image from a registry (don't use a local image)
34+
- `oci-dir://` use an OCI layout directory
35+
- `archive://` use a tarball archive, as created by `docker save`
36+
- `fs://` use a local directory or file
37+
- `sbom://` SPDX file or in-toto attestation file with SPDX predicate or `syft` json SBOM file
3938
usage: docker scout compare --to IMAGE|DIRECTORY|ARCHIVE [IMAGE|DIRECTORY|ARCHIVE]
4039
pname: docker scout
4140
plink: docker_scout.yaml
@@ -337,7 +336,42 @@ inherited_options:
337336
experimentalcli: false
338337
kubernetes: false
339338
swarm: false
340-
examples: " Compare the most recently built image to a reference\n $ docker scout compare --to namespace/repo:latest\e[0m\n\n Compare an image to the latest tag\n $ docker scout compare --to namespace/repo:latest namespace/repo:v1.2.3-pre\e[0m\n\n Compare a local build to the same tag from the registry\n $ docker scout compare local://namespace/repo:v1.2.3 --to registry://namespace/repo:v1.2.3\e[0m\n\n Ignore base images\n $ docker scout compare --ignore-base --to namespace/repo:latest namespace/repo:v1.2.3-pre\e[0m\n\n Generate a markdown output\n $ docker scout compare --format markdown --to namespace/repo:latest namespace/repo:v1.2.3-pre\e[0m\n\n Only compare maven packages and only display critical vulnerabilities for maven packages\n $ docker scout compare --only-package-type maven --only-severity critical --to namespace/repo:latest namespace/repo:v1.2.3-pre\e[0m"
339+
examples: |-
340+
### Compare the most recently built image to the latest tag
341+
342+
```console
343+
$ docker scout compare --to namespace/repo:latest
344+
```
345+
346+
### Compare local build to the same tag from the registry
347+
348+
```console
349+
$ docker scout compare local://namespace/repo:latest --to registry://namespace/repo:latest
350+
```
351+
352+
### Ignore base images
353+
354+
```console
355+
$ docker scout compare --ignore-base --to namespace/repo:latest namespace/repo:v1.2.3-pre
356+
```
357+
358+
### Generate a markdown output
359+
360+
```console
361+
$ docker scout compare --format markdown --to namespace/repo:latest namespace/repo:v1.2.3-pre
362+
```
363+
364+
### Only compare maven packages and only display critical vulnerabilities for maven packages
365+
366+
```console
367+
$ docker scout compare --only-package-type maven --only-severity critical --to namespace/repo:latest namespace/repo:v1.2.3-pre
368+
```
369+
370+
### Show all policy results for both images
371+
372+
```console
373+
docker scout compare --to namespace/repo:latest namespace/repo:v1.2.3-pre
374+
```
341375
deprecated: false
342376
experimental: false
343377
experimentalcli: true

docs/docker_scout_cves.yaml

Lines changed: 176 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
command: docker scout cves
22
short: Display CVEs identified in a software artifact
33
long: |-
4-
The docker scout cves command analyzes a software artifact for vulnerabilities.
4+
The `docker scout cves` command analyzes a software artifact for vulnerabilities.
55
66
If no image is specified, the most recently built image is used.
77
88
The following artifact types are supported:
99
1010
- Images
1111
- OCI layout directories
12-
- Tarball archives, as created by docker save
12+
- Tarball archives, as created by `docker save`
1313
- Local directory or file
14-
- SPDX file or in-toto attestation file with SPDX predicate
15-
16-
The tool analyzes the provided software artifact, and generates a vulnerability report.
1714
1815
By default, the tool expects an image reference, such as:
1916
20-
- redis
21-
- curlimages/curl:7.87.0
22-
- mcr.microsoft.com/dotnet/runtime:7.0
17+
- `redis`
18+
- `curlimages/curl:7.87.0`
19+
- `mcr.microsoft.com/dotnet/runtime:7.0`
2320
2421
If the artifact you want to analyze is an OCI directory, a tarball archive, a local file or directory,
2522
or if you want to control from where the image will be resolved, you must prefix the reference with one of the following:
2623
27-
- image:// (default) use a local image, or fall back to a registry lookup
28-
- local:// use an image from the local image store (don't do a registry lookup)
29-
- registry:// use an image from a registry (don't use a local image)
30-
- oci-dir:// use an OCI layout directory
31-
- archive:// use a tarball archive, as created by docker save
32-
- fs:// use a local directory or file
33-
- sbom:// use an SBOM as SPDX file or in-toto attestation file with SPDX predicate or syft json SBOM file
24+
- `image://` (default) use a local image, or fall back to a registry lookup
25+
- `local://` use an image from the local image store (don't do a registry lookup)
26+
- `registry://` use an image from a registry (don't use a local image)
27+
- `oci-dir://` use an OCI layout directory
28+
- `archive://` use a tarball archive, as created by `docker save`
29+
- `fs://` use a local directory or file
30+
- `sbom://` SPDX file or in-toto attestation file with SPDX predicate or `syft` json SBOM file
31+
In case of `sbom://` prefix, if the file is not defined then it will try to read it from the standard input.
3432
usage: docker scout cves [OPTIONS] [IMAGE|DIRECTORY|ARCHIVE]
3533
pname: docker scout
3634
plink: docker_scout.yaml
@@ -59,6 +57,7 @@ options:
5957
default_value: "false"
6058
description: |
6159
Display the EPSS scores and organize the package's CVEs according to their EPSS score
60+
details_url: '#epss'
6261
deprecated: false
6362
hidden: false
6463
experimental: false
@@ -399,7 +398,168 @@ inherited_options:
399398
experimentalcli: false
400399
kubernetes: false
401400
swarm: false
402-
examples: " Display vulnerabilities for the most recently built image\n $ docker scout cves\e[0m\n\n Display vulnerabilities grouped by package\n $ docker scout cves alpine\e[0m\n\n Display vulnerabilities from a docker save tarball\n $ docker save alpine > alpine.tar\e[0m\n $ docker scout cves archive://alpine.tar\e[0m\n\n Display vulnerabilities from an OCI directory\n $ skopeo copy --override-os linux docker://alpine oci:alpine\e[0m\n $ docker scout cves oci-dir://alpine\e[0m\n\n Display vulnerabilities from the current directory\n $ docker scout cves fs://.\e[0m\n\n Export vulnerabilities to a SARIF JSON file\n $ docker scout cves --format sarif --output alpine.sarif.json alpine\e[0m\n\n Markdown output, including HTML tags. To be used in Pull Request comments for instance.\n $ docker scout cves --format markdown alpine\e[0m\n\n List all Go packages of the image that are vulnerable\n $ docker scout cves --format only-packages --only-package-type golang --only-vuln-packages golang:1.18.0\e[0m\n\n List vulnerabilities from an SPDX file\n $ syft -o spdx-json alpine | docker scout cves sbom://\e[0m"
401+
examples: |-
402+
### Display vulnerabilities grouped by package
403+
404+
```console
405+
$ docker scout cves alpine
406+
Analyzing image alpine
407+
✓ Image stored for indexing
408+
✓ Indexed 18 packages
409+
✓ No vulnerable package detected
410+
```
411+
412+
### Display vulnerabilities from a `docker save` tarball
413+
414+
```console
415+
$ docker save alpine > alpine.tar
416+
417+
$ docker scout cves archive://alpine.tar
418+
Analyzing archive alpine.tar
419+
✓ Archive read
420+
✓ SBOM of image already cached, 18 packages indexed
421+
✓ No vulnerable package detected
422+
```
423+
424+
### Display vulnerabilities from an OCI directory
425+
426+
```console
427+
$ skopeo copy --override-os linux docker://alpine oci:alpine
428+
429+
$ docker scout cves oci-dir://alpine
430+
Analyzing OCI directory alpine
431+
✓ OCI directory read
432+
✓ Image stored for indexing
433+
✓ Indexed 19 packages
434+
✓ No vulnerable package detected
435+
```
436+
437+
### Display vulnerabilities from the current directory
438+
439+
```console
440+
$ docker scout cves fs://.
441+
```
442+
443+
### Export vulnerabilities to a SARIF JSON file
444+
445+
```console
446+
$ docker scout cves --format sarif --output alpine.sarif.json alpine
447+
Analyzing image alpine
448+
✓ SBOM of image already cached, 18 packages indexed
449+
✓ No vulnerable package detected
450+
✓ Report written to alpine.sarif.json
451+
```
452+
453+
### Display markdown output
454+
455+
The following example shows how to generate the vulnerability report as markdown.
456+
457+
```console
458+
$ docker scout cves --format markdown alpine
459+
✓ Pulled
460+
✓ SBOM of image already cached, 19 packages indexed
461+
✗ Detected 1 vulnerable package with 3 vulnerabilities
462+
<h2>:mag: Vulnerabilities of <code>alpine</code></h2>
463+
464+
<details open="true"><summary>:package: Image Reference</strong> <code>alpine</code></summary>
465+
<table>
466+
<tr><td>digest</td><td><code>sha256:e3bd82196e98898cae9fe7fbfd6e2436530485974dc4fb3b7ddb69134eda2407</code></td><tr><tr><td>vulnerabilities</td><td><img alt="critical: 0" src="https://img.shields.io/badge/critical-0-lightgrey"/> <img alt="high: 0" src="https://img.shields.io/badge/high-0-lightgrey"/> <img alt="medium: 2" src="https://img.shields.io/badge/medium-2-fbb552"/> <img alt="low: 0" src="https://img.shields.io/badge/low-0-lightgrey"/> <img alt="unspecified: 1" src="https://img.shields.io/badge/unspecified-1-lightgrey"/></td></tr>
467+
<tr><td>platform</td><td>linux/arm64</td></tr>
468+
<tr><td>size</td><td>3.3 MB</td></tr>
469+
<tr><td>packages</td><td>19</td></tr>
470+
</table>
471+
</details></table>
472+
</details>
473+
...
474+
```
475+
476+
### List all vulnerable packages of a certain type
477+
478+
The following example shows how to generate a list of packages, only including
479+
packages of the specified type, and only showing packages that are vulnerable.
480+
481+
```console
482+
$ docker scout cves --format only-packages --only-package-type golang --only-vuln-packages golang:1.18.0
483+
✓ Pulled
484+
✓ SBOM of image already cached, 296 packages indexed
485+
✗ Detected 1 vulnerable package with 40 vulnerabilities
486+
487+
Name Version Type Vulnerabilities
488+
───────────────────────────────────────────────────────────
489+
stdlib 1.18 golang 2C 29H 8M 1L
490+
```
491+
492+
### Display EPSS score (--epss) {#epss}
493+
494+
The `--epss` flag adds [Exploit Prediction Scoring System (EPSS)](https://www.first.org/epss/)
495+
scores to the `docker scout cves` output. EPSS scores are estimates of the likelihood (probability)
496+
that a software vulnerability will be exploited in the wild in the next 30 days.
497+
The higher the score, the greater the probability that a vulnerability will be exploited.
498+
499+
```console {hl_lines="13,14"}
500+
$ docker scout cves --epss nginx
501+
✓ Provenance obtained from attestation
502+
✓ SBOM obtained from attestation, 232 packages indexed
503+
✓ Pulled
504+
✗ Detected 23 vulnerable packages with a total of 39 vulnerabilities
505+
506+
...
507+
508+
✗ HIGH CVE-2023-52425
509+
https://scout.docker.com/v/CVE-2023-52425
510+
Affected range : >=2.5.0-1
511+
Fixed version : not fixed
512+
EPSS Score : 0.000510
513+
EPSS Percentile : 0.173680
514+
```
515+
516+
- `EPSS Score` is a floating point number between 0 and 1 representing the probability of exploitation in the wild in the next 30 days (following score publication).
517+
- `EPSS Percentile` is the percentile of the current score, the proportion of all scored vulnerabilities with the same or a lower EPSS score.
518+
519+
You can use the `--epss-score` and `--epss-percentile` flags to filter the output
520+
of `docker scout cves` based on these scores. For example,
521+
to only show vulnerabilities with an EPSS score higher than 0.5:
522+
523+
```console
524+
$ docker scout cves --epss --epss-score 0.5 nginx
525+
✓ SBOM of image already cached, 232 packages indexed
526+
✓ EPSS scores for 2024-03-01 already cached
527+
✗ Detected 1 vulnerable package with 1 vulnerability
528+
529+
...
530+
531+
✗ LOW CVE-2023-44487
532+
https://scout.docker.com/v/CVE-2023-44487
533+
Affected range : >=1.22.1-9
534+
Fixed version : not fixed
535+
EPSS Score : 0.705850
536+
EPSS Percentile : 0.979410
537+
```
538+
539+
EPSS scores are updated on a daily basis.
540+
By default, the latest available score is displayed.
541+
You can use the `--epss-date` flag to manually specify a date
542+
in the format `yyyy-mm-dd` for fetching EPSS scores.
543+
544+
```console
545+
$ docker scout cves --epss --epss-date 2024-01-02 nginx
546+
```
547+
548+
### List vulnerabilities from an SPDX file
549+
550+
The following example shows how to generate a list of vulnerabilities from an SPDX file using `syft`.
551+
552+
```console
553+
$ syft -o spdx-json alpine:3.16.1 | docker scout cves sbom://
554+
✔ Pulled image
555+
✔ Loaded image alpine:3.16.1
556+
✔ Parsed image sha256:3d81c46cd8756ddb6db9ec36fa06a6fb71c287fb265232ba516739dc67a5f07d
557+
✔ Cataloged contents 274a317d88b54f9e67799244a1250cad3fe7080f45249fa9167d1f871218d35f
558+
├── ✔ Packages [14 packages]
559+
├── ✔ File digests [75 files]
560+
├── ✔ File metadata [75 locations]
561+
└── ✔ Executables [16 executables]
562+
✗ Detected 2 vulnerable packages with a total of 11 vulnerabilities
403563
deprecated: false
404564
experimental: false
405565
experimentalcli: false

docs/docker_scout_policy.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
command: docker scout policy
22
short: |
33
Evaluate policies against an image and display the policy evaluation results (experimental)
4-
long: |
5-
The docker scout policy command evaluates policies against an image and displays the policy evaluation results. If the policy results for an image are already available in the Scout platform, they are retrieved from there, otherwise the policies are evaluated locally. It can also compare policy results for a repository in a specific environment.
4+
long: |-
5+
The `docker scout policy` command evaluates policies against an image.
6+
The image analysis is uploaded to Docker Scout where policies get evaluated.
7+
8+
The policy evaluation results may take a few minutes to become available.
69
usage: docker scout policy [IMAGE | REPO]
710
pname: docker scout
811
plink: docker_scout.yaml
@@ -105,7 +108,30 @@ inherited_options:
105108
experimentalcli: false
106109
kubernetes: false
107110
swarm: false
108-
examples: " Evaluate policies against an image:\n $ docker scout policy IMAGE\e[0m\n\n Evaluate policies against an image for a specific organization:\n $ docker scout policy IMAGE --org ORG\e[0m\n\n Evaluate policies against an image with a specific platform:\n $ docker scout policy IMAGE --platform PLATFORM\e[0m\n\n Compare policy results for a repository in a specific environment:\n $ docker scout policy REPO --to-env ENV\e[0m"
111+
examples: |-
112+
### Evaluate policies against an image and display the results
113+
114+
```console
115+
$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1
116+
```
117+
118+
### Evaluate policies against an image for a specific organization
119+
120+
```console
121+
$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1 --org dockerscoutpolicy
122+
```
123+
124+
### Evaluate policies against an image with a specific platform
125+
126+
```console
127+
$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1 --platform linux/amd64
128+
```
129+
130+
### Compare policy results for a repository in a specific environment
131+
132+
```console
133+
$ docker scout policy dockerscoutpolicy/customers-api-service --to-env production
134+
```
109135
deprecated: false
110136
experimental: false
111137
experimentalcli: true

docs/docker_scout_push.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
command: docker scout push
22
short: Push an image or image index to Docker Scout
33
long: |
4-
The docker scout push command allows to push an image or image index to Docker Scout.
4+
The `docker scout push` command lets you push an image or analysis result to Docker Scout.
55
usage: docker scout push IMAGE
66
pname: docker scout
77
plink: docker_scout.yaml
@@ -103,7 +103,12 @@ inherited_options:
103103
experimentalcli: false
104104
kubernetes: false
105105
swarm: false
106-
examples: " Push an image to Docker Scout\n $ docker scout push --org my-org registry.example.com/repo:tag\e[0m"
106+
examples: |-
107+
### Push an image to Docker Scout
108+
109+
```console
110+
$ docker scout push --org my-org registry.example.com/repo:tag
111+
```
107112
deprecated: false
108113
experimental: false
109114
experimentalcli: false

0 commit comments

Comments
 (0)