Skip to content

Commit 7b0e7b9

Browse files
committed
Update docker scan pages to include info on Log4J fix
Signed-off-by: Usha Mandya <[email protected]>
1 parent c4b87f4 commit 7b0e7b9

4 files changed

Lines changed: 114 additions & 11 deletions

File tree

develop/scan-images/index.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ keywords: docker scan, scan, images, snyk, vulnerability
55
---
66

77
{% include sign-up-cta.html
8-
body="You can now get 10 free scans per month as part of your Docker subscription. Sign in to Docker to start scanning your images for vulnerabilities."
9-
header-text="This feature requires a Docker subscription"
8+
body="Did you know that you can now get 10 free scans per month? Sign in to Docker to start scanning your images for vulnerabilities."
9+
header-text="Scan your images for free"
1010
target-url="https://www.docker.com/pricing?utm_source=docker&utm_medium=webreferral&utm_campaign=docs_driven_upgrade_scan"
1111
%}
1212

13-
This page contains recommendations and best practices for scanning and building secure images.
13+
This page contains recommendations and best practices for scanning and building
14+
secure images.
1415

1516
Docker and Snyk have partnered together to bring security natively into the development workflow by providing a simple and streamlined approach for developers to build and deploy secure containers. Container security spans multiple teams - developers, security, and operations. Additionally, there are multiple layers of security that apply to containers:
1617

@@ -25,6 +26,15 @@ Including the vulnerability scanning options into the Docker platform extends th
2526

2627
## Scanning images
2728

29+
> **Log4j 2 CVE-2021-44228**
30+
>
31+
> Versions of `docker scan` earlier than `v0.11.0` are not able to detect [Log4j 2
32+
> CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228){:
33+
> target="_blank" rel="noopener" class="_"}. You must update your Docker Desktop
34+
> installation to version 4.3.1 or higher to fix this issue. For more information,
35+
> see [Scan images for Log4j 2 CVE](../../engine/scan#scan-images-for-log4j-2-cve).
36+
{: .important}
37+
2838
You can trigger scans automatically by pushing an image to Docker Hub. You can achieve this either through the `docker scan` command in the CLI, or through Docker Hub.
2939

3040
### Scan using the CLI
-113 KB
Loading

docker-hub/vulnerability-scanning.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,34 @@ title: Hub Vulnerability Scanning
1010
target-url="https://www.docker.com/pricing?utm_source=docker&utm_medium=webreferral&utm_campaign=docs_driven_upgrade_scan"
1111
%}
1212

13-
Docker Hub Vulnerability Scanning enables you to automatically scan Docker images for vulnerabilities using Snyk. This uses the same technology as the [docker scan](../engine/scan/index.md) command.
13+
Docker Hub Vulnerability Scanning enables you to automatically scan Docker
14+
images for vulnerabilities using Snyk. This uses the same technology as the
15+
[docker scan](../engine/scan/index.md) command.
1416

15-
When you push an image to Docker Hub after enabling vulnerability scanning, Docker Hub automatically scans the image to identify vulnerabilities in your container images. Vulnerability Scanning allows developers and development teams to review the security state of the container images and take actions to fix issues identified during the scan, resulting in more secure deployments. The scan result includes the source of the vulnerability, such as OS packages and libraries, version in which it was introduced, and a recommended fixed version (if available) to remediate the vulnerabilities discovered.
17+
> When you enable Hub Vulnerability Scanning, you can also see whether your
18+
> images are affected by Log4Shell (CVE-2021-44228). For more information, see
19+
> [Scan images](#scan-images-on-docker-hub).
1620
17-
## Scan images
21+
When you push an image to Docker Hub after enabling vulnerability scanning, Docker Hub automatically scans the image to identify vulnerabilities in your container images. Vulnerability Scanning allows developers and development teams to review the security state of the container images and take actions to fix issues identified during the scan, resulting in more secure deployments. The scan result includes the source of the vulnerability, such as OS packages and libraries, version in which it was introduced, and a recommended fixed version (if available) to remediate the vulnerabilities discovered.
1822

19-
Hub Vulnerability scanning allows repository owners and administrators of a Docker Pro, Team, or a Business tier to enable and disable scanning.
23+
## Scan images on Docker Hub
2024

21-
In addition, repository owners in a Docker Pro subscription and team members in a Team, or a Business subscription can view the detailed scan reports. When scanning is enabled on a specific repository, anyone with push access can trigger a scan by pushing an image to Docker Hub.
25+
> **Log4j 2 CVE-2021-44228**
26+
>
27+
> Versions of `docker scan` earlier than `v0.11.0` are not able to detect [Log4j
28+
2 CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228){:
29+
target="_blank" rel="noopener" class="_"}. You must update your Docker
30+
> installation to the latest version to fix this issue. For more
31+
> information, see [Scan images for Log4j 2 CVE](../../engine/scan#scan-images-for-log4j-2-cve).
32+
{: .important}
33+
34+
Hub Vulnerability scanning allows repository owners and administrators of a
35+
Docker Pro, Team, or a Business tier to enable and disable scanning. When scanning is enabled on a specific repository, anyone with push access can trigger a scan by pushing an image to Docker Hub.
36+
37+
In addition, repository owners in a Docker Pro subscription and team members in a Team, or a Business subscription can view the detailed scan reports, including
38+
information about whether or not an image is affected by the **Log4j 2 CVE**.
39+
You must push the image to Docker Hub to trigger a scan that
40+
allows you to view the Log4j 2 CVE results.
2241

2342
> **Note**
2443
>

engine/scan/index.md

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,85 @@ Looking to speed up your development cycles? Quickly detect and learn how to rem
1616

1717
Vulnerability scanning for Docker local images allows developers and development teams to review the security state of the container images and take actions to fix issues identified during the scan, resulting in more secure deployments. Docker Scan runs on Snyk engine, providing users with visibility into the security posture of their local Dockerfiles and local images.
1818

19-
Users trigger vulnerability scans through the CLI, and use the CLI to view the scan results. The scan results contain a list of Common Vulnerabilities and Exposures (CVEs), the sources, such as OS packages and libraries, versions in which they were introduced, and a recommended fixed version (if available) to remediate the CVEs discovered.
19+
Users trigger vulnerability scans through the CLI, and use the CLI to view the
20+
scan results. The scan results contain a list of Common Vulnerabilities and
21+
Exposures (CVEs), the sources, such as OS packages and libraries, versions in
22+
which they were introduced, and a recommended fixed version (if available) to
23+
remediate the CVEs discovered.
24+
25+
> **Log4j 2 CVE-2021-44228**
26+
>
27+
> Versions of `docker Scan` earlier than `v0.11.0` are not able to detect [Log4j 2
28+
> CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228){:
29+
> target="_blank" rel="noopener" class="_"}. You must update your Docker
30+
> Desktop installation to 4.3.1 or higher to fix this issue. For more
31+
> information, see [Scan images for Log4j 2 CVE](#scan-images-for-log4j-2-cve).
32+
{: .important}
2033

2134
For information about the system requirements to run vulnerability scanning, see [Prerequisites](#prerequisites).
2235

23-
This page contains information about the `docker scan` CLI command. For information about automatically scanning Docker images through Docker Hub, see [Hub Vulnerability Scanning](/docker-hub/vulnerability-scanning/).
36+
This page contains information about the `docker scan` CLI command. For
37+
information about automatically scanning Docker images through Docker Hub, see
38+
[Hub Vulnerability Scanning](/docker-hub/vulnerability-scanning/).
39+
40+
## Scan images for Log4j 2 CVE
41+
42+
Docker Scan versions earlier than `v0.11.0` do not detect [Log4j 2
43+
CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228){:
44+
target="_blank" rel="noopener" class="_"} when you scan your
45+
images for vulnerabilities. You must update your Docker installation to the
46+
latest version to fix this issue.
47+
48+
If you are using the `docker scan` plugin shipped
49+
with Docker Desktop, update Docker Desktop to version 4.3.1 or
50+
higher. See the release notes for [Mac](../../desktop/mac/release-notes/index.md) and
51+
[Windows](../../desktop/windows/release-notes/index.md) for download information.
52+
53+
If you are using Linux, run the following command to manually install the latest
54+
version of `docker scan`:
55+
56+
On `.deb` based distros, such as Ubuntu and Debian:
57+
58+
```console
59+
$ apt-get update && apt-get install docker-scan-plugin
60+
```
61+
62+
On rpm-based distros, such as CentOS or Fedora:
63+
64+
```console
65+
$ yum install docker-scan-plugin
66+
```
67+
68+
Alternatively, you can manually download the `docker scan` binaries from the [Docker Scan](https://github.com/docker/scan-cli-plugin/releases/tag/v0.11.0){:
69+
target="_blank" rel="noopener" class="_"} GitHub repository and
70+
[install](https://github.com/docker/scan-cli-plugin){:
71+
target="_blank" rel="noopener" class="_"} in the plugins directory.
72+
73+
### Verify the `docker scan` version
74+
75+
After upgrading `docker scan`, verify you are running the latest version by
76+
running the following command:
77+
78+
```console
79+
$ docker scan --accept-license --version
80+
Version: v0.12.0
81+
Git commit: 1074dd0
82+
Provider: Snyk (1.790.0 (standalone))
83+
```
84+
85+
If your code output contains `ORGAPACHELOGGINGLOG4J`, it is
86+
likely that your code is affected by the Log4j 2 CVE-2021-44228 vulnerability. When you run the updated version of `docker scan`, you should also see a message
87+
in the output log similar to:
88+
89+
```console
90+
Upgrade org.apache.logging.log4j:[email protected] to org.apache.logging.log4j:[email protected] to fix
91+
✗ Arbitrary Code Execution (new) [Critical Severity][https://snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-2314720] in org.apache.logging.log4j:[email protected]
92+
introduced by org.apache.logging.log4j:[email protected]
93+
```
94+
95+
For more information, read our blog post [Apache Log4j 2
96+
CVE-2021-44228](https://www.docker.com/blog/apache-log4j-2-cve-2021-44228/){:
97+
target="_blank" rel="noopener" class="_"}.
2498

2599
## How to scan images
26100

@@ -340,7 +414,7 @@ If you use the `--login` flag without any token, you will be redirected to the S
340414

341415
To run vulnerability scanning on your Docker images, you must meet the following requirements:
342416

343-
1. Download and install Docker Desktop.
417+
1. Download and install the latest version of Docker Desktop.
344418

345419
- [Download for Mac with Intel chip](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64)
346420
- [Download for Mac with Apple chip](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64)

0 commit comments

Comments
 (0)