Skip to content

Commit 83df7af

Browse files
authored
Merge pull request #216 from docker/update-docs-1.20.0
docs updates for 1.20.0
2 parents ae73b6e + ae39d72 commit 83df7af

File tree

6 files changed

+72
-364
lines changed

6 files changed

+72
-364
lines changed

docs/docker_scout_compare.yaml

Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,40 @@ 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.
5+
The docker scout compare command analyzes two images and displays a comparison of both.
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 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.
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.
1111
12-
If no image is specified, the most recently built image is used
13-
as a comparison target.
12+
If no image is specified, the most recently built image will be used.
1413
1514
The following artifact types are supported:
1615
1716
- Images
1817
- OCI layout directories
19-
- Tarball archives, as created by `docker save`
18+
- Tarball archives, as created by docker save
2019
- Local directory or file
2120
21+
The tool analyzes the provided software artifact, and generates a vulnerability report.
22+
2223
By default, the tool expects an image reference, such as:
2324
24-
- `redis`
25-
- `curlimages/curl:7.87.0`
26-
- `mcr.microsoft.com/dotnet/runtime:7.0`
25+
- redis
26+
- curlimages/curl:7.87.0
27+
- mcr.microsoft.com/dotnet/runtime:7.0
2728
2829
If the artifact you want to analyze is an OCI directory, a tarball archive, a local file or directory,
2930
or if you want to control from where the image will be resolved, you must prefix the reference with one of the following:
3031
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
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
3839
usage: docker scout compare --to IMAGE|DIRECTORY|ARCHIVE [IMAGE|DIRECTORY|ARCHIVE]
3940
pname: docker scout
4041
plink: docker_scout.yaml
@@ -336,42 +337,7 @@ inherited_options:
336337
experimentalcli: false
337338
kubernetes: false
338339
swarm: false
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-
```
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"
375341
deprecated: false
376342
experimental: false
377343
experimentalcli: true

docs/docker_scout_cves.yaml

Lines changed: 16 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
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.
1417
1518
By default, the tool expects an image reference, such as:
1619
17-
- `redis`
18-
- `curlimages/curl:7.87.0`
19-
- `mcr.microsoft.com/dotnet/runtime:7.0`
20+
- redis
21+
- curlimages/curl:7.87.0
22+
- mcr.microsoft.com/dotnet/runtime:7.0
2023
2124
If the artifact you want to analyze is an OCI directory, a tarball archive, a local file or directory,
2225
or if you want to control from where the image will be resolved, you must prefix the reference with one of the following:
2326
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.
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
3234
usage: docker scout cves [OPTIONS] [IMAGE|DIRECTORY|ARCHIVE]
3335
pname: docker scout
3436
plink: docker_scout.yaml
@@ -57,7 +59,6 @@ options:
5759
default_value: "false"
5860
description: |
5961
Display the EPSS scores and organize the package's CVEs according to their EPSS score
60-
details_url: '#epss'
6162
deprecated: false
6263
hidden: false
6364
experimental: false
@@ -398,168 +399,7 @@ inherited_options:
398399
experimentalcli: false
399400
kubernetes: false
400401
swarm: false
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
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"
563403
deprecated: false
564404
experimental: false
565405
experimentalcli: false

docs/docker_scout_policy.yaml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
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.
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.
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.
96
usage: docker scout policy [IMAGE | REPO]
107
pname: docker scout
118
plink: docker_scout.yaml
@@ -108,30 +105,7 @@ inherited_options:
108105
experimentalcli: false
109106
kubernetes: false
110107
swarm: false
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-
```
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"
135109
deprecated: false
136110
experimental: false
137111
experimentalcli: true

docs/docker_scout_push.yaml

Lines changed: 2 additions & 7 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 lets you push an image or analysis result to Docker Scout.
4+
The docker scout push command allows to push an image or image index to Docker Scout.
55
usage: docker scout push IMAGE
66
pname: docker scout
77
plink: docker_scout.yaml
@@ -103,12 +103,7 @@ inherited_options:
103103
experimentalcli: false
104104
kubernetes: false
105105
swarm: false
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-
```
106+
examples: " Push an image to Docker Scout\n $ docker scout push --org my-org registry.example.com/repo:tag\e[0m"
112107
deprecated: false
113108
experimental: false
114109
experimentalcli: false

0 commit comments

Comments
 (0)