Skip to content

Commit 3283434

Browse files
authored
Merge pull request #20596 from dvdksn/scout-policy-consolidate
scout: update ootb policy to match health score rules
2 parents 3b64beb + 23edbb9 commit 3283434

File tree

5 files changed

+99
-65
lines changed

5 files changed

+99
-65
lines changed

.github/vale/config/vocabularies/Docker/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Autotest
1414
Azure
1515
BuildKit
1616
BusyBox
17+
CISA
1718
CNCF
1819
CVEs?
1920
CentOS

content/scout/policy/_index.md

Lines changed: 72 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ image analysis feature, interpreting the analysis results against the rules
3232
defined by policies.
3333

3434
A policy defines image quality criteria that your artifacts should fulfill.
35-
For example, the **No copyleft licenses** policy flags packages distributed under a copyleft license.
36-
If an image contains a copyleft-licensed package, that image is non-compliant with this policy.
37-
Some policies, such as the **No copyleft licenses** policy, are configurable.
35+
For example, the **No AGPL v3 licenses** policy flags any image containing packages distributed under the AGPL v3 license.
36+
If an image contains such a package, that image is non-compliant with this policy.
37+
Some policies, such as the **No AGPL v3 licenses** policy, are configurable.
3838
Configurable policies let you adjust the criteria to better match your organization's needs.
3939

4040
In Docker Scout, policies are designed to help you ratchet forward your
@@ -55,11 +55,12 @@ image up-to-dateness.
5555
Docker Scout ships the following out-of-the-box policies:
5656

5757
- [No fixable critical or high vulnerabilities](#no-fixable-critical-or-high-vulnerabilities)
58-
- [No copyleft licenses](#no-copyleft-licenses)
58+
- [No AGPL v3 licenses](#no-agpl-v3-licenses)
5959
- [No outdated base images](#no-outdated-base-images)
6060
- [No high-profile vulnerabilities](#no-high-profile-vulnerabilities)
6161
- [Supply chain attestations](#supply-chain-attestations)
6262
- [Default non-root user](#default-non-root-user)
63+
- [No unapproved base images](#no-unapproved-base-images)
6364

6465
To give you a head start, Scout enables several policies by default for your
6566
Scout-enabled repositories. You can customize the default configurations to
@@ -78,34 +79,34 @@ available. Essentially, this means that there's an easy fix that you can deploy
7879
for images that fail this policy: upgrade the vulnerable package to a version
7980
containing a fix for the vulnerability.
8081

81-
By default, this policy only flags critical and high severity vulnerabilities
82-
disclosed more than 30 days ago. The rationale for only flagging
83-
vulnerabilities of a certain age is that newly discovered vulnerabilities
84-
shouldn't cause your evaluations to fail until you've had a chance to address
85-
them.
82+
By default, this policy only flags critical and high severity vulnerabilities.
8683

87-
This policy is unfulfilled if an artifact is affected by one or more critical-
84+
This policy is violated if an artifact is affected by one or more critical-
8885
or high-severity vulnerability, where a fix version is available.
8986

9087
You can configure the parameters of this policy by creating a custom version of the policy.
9188
The following policy parameters are configurable in a custom version:
9289

93-
- Name and description of the policy
94-
- Severity levels to consider
95-
- Age threshold (set to `0` to flag all vulnerabilities, regardless of age)
96-
- Whether or not to only report vulnerabilities with a fix version available
90+
- **Age**: The minimum number of days since the vulnerability was first published
9791

98-
For more information about configuring policies, see [Configure policies](./configure.md).
92+
The rationale for only flagging vulnerabilities of a certain minimum age is
93+
that newly discovered vulnerabilities shouldn't cause your evaluations to
94+
fail until you've had a chance to address them.
95+
96+
<!-- vale Vale.Spelling = NO -->
97+
- **Severities**: Severity levels to consider (default: `Critical, High`)
98+
<!-- vale Vale.Spelling = YES -->
9999

100-
### No copyleft licenses
100+
- **Fixable vulnerabilities only**: Whether or not to only report
101+
vulnerabilities with a fix version available (enabled by default).
102+
103+
For more information about configuring policies, see [Configure policies](./configure.md).
101104

102-
The **No copyleft licenses** policy requires that your artifacts don't contain
103-
packages distributed under an AGPLv3 or GPLv3 license. These licenses are
104-
protective [copyleft](https://en.wikipedia.org/wiki/Copyleft), and may be
105-
unsuitable for use in your software because of the restrictions they enforce.
105+
### No AGPL v3 licenses
106106

107-
This policy is unfulfilled if your artifacts contain one or more packages with
108-
a violating license.
107+
The **No AGPL v3 licenses** policy requires that your artifacts don't contain
108+
packages distributed under an AGPLv3 license. This policy is violated if
109+
your artifacts contain one or more packages with this license.
109110

110111
You can configure the list of licenses that this policy should look out for,
111112
and add exceptions by specifying an allow-list (in the form of PURLs).
@@ -116,7 +117,7 @@ See [Configure policies](./configure.md).
116117
The **No outdated base images** policy requires that the base images you use are
117118
up-to-date.
118119

119-
It's unfulfilled when the tag you used to build your image points to a
120+
It's violated when the tag you used to build your image points to a
120121
different digest than what you're using. If there's a mismatch in digests, that
121122
means the base image you're using is out of date.
122123

@@ -135,19 +136,33 @@ The list includes the following vulnerabilities:
135136
- [CVE-2014-0160 (OpenSSL Heartbleed)](https://scout.docker.com/v/CVE-2014-0160)
136137
- [CVE-2021-44228 (Log4Shell)](https://scout.docker.com/v/CVE-2021-44228)
137138
- [CVE-2023-38545 (cURL SOCKS5 heap buffer overflow)](https://scout.docker.com/v/CVE-2023-38545)
138-
:cc
139+
- [CVE-2023-44487 (HTTP/2 Rapid Reset)](https://scout.docker.com/v/CVE-2023-44487)
139140
- [CVE-2024-3094 (XZ backdoor)](https://scout.docker.com/v/CVE-2024-3094)
140141

141142
You can configure the CVEs included in this list by creating a custom policy.
142-
For more information, see [Configure policies](./configure.md).
143+
Custom configuration options include:
144+
145+
- **CVEs to avoid**: Specify the CVEs that you want to avoid in your artifacts.
146+
147+
Default: `CVE-2014-0160`, `CVE-2021-44228`, `CVE-2023-38545`, `CVE-2023-44487`, `CVE-2024-3094`
148+
149+
- **CISA KEV**: Enable tracking of vulnerabilities from CISA's Known Exploited Vulnerabilities (KEV) catalog
150+
151+
The [CISA KEV catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)
152+
includes vulnerabilities that are actively exploited in the wild. When enabled,
153+
the policy flags images that contain vulnerabilities from the CISA KEV catalog.
154+
155+
Enabled by default.
156+
157+
For more information on policy configuration, see [Configure policies](./configure.md).
143158

144159
### Supply chain attestations
145160

146161
The **Supply chain attestations** policy requires that your artifacts have
147162
[SBOM](../../build/attestations/sbom.md) and
148163
[provenance](../../build/attestations/slsa-provenance.md) attestations.
149164

150-
This policy is unfulfilled if an artifact lacks either an SBOM attestation or a
165+
This policy is violated if an artifact lacks either an SBOM attestation or a
151166
provenance attestation with max mode. To ensure compliance,
152167
update your build command to attach these attestations at build-time:
153168

@@ -236,20 +251,10 @@ ENTRYPOINT ["/app/production"]
236251
{{< /tab >}}
237252
{{< /tabs >}}
238253

239-
## Additional policies
240-
241-
In addition to the [out-of-the-box policies](#out-of-the-box-policies) enabled
242-
by default, Docker Scout supports the following optional policies. Before you
243-
can enable these policies, you need to either configure the policies, or
244-
configure the integration that the policy requires.
245-
246-
- [No unapproved base images](#no-unapproved-base-images)
247-
- [SonarQube quality gates passed](#sonarqube-quality-gates-passed)
248-
249254
### No unapproved base images
250255

251-
The **No unapproved base images** policy lets you restrict which base
252-
images you allow in your builds.
256+
The **No unapproved base images** policy ensures that the base images you use
257+
in your builds are maintained and secure.
253258

254259
This policy checks whether the base images used in your builds match any of the
255260
patterns specified in the policy configuration. The following table shows a few
@@ -268,35 +273,50 @@ An asterisk (`*`) matches up until the character that follows, or until the end
268273
of the image reference. Note that the `docker.io` prefix is required in order
269274
to match Docker Hub images. This is the registry hostname of Docker Hub.
270275

271-
You can also configure the policy to:
276+
This policy is configurable with the following options:
277+
278+
- **Approved base image sources**
279+
280+
Specify the image reference patterns that you want to allow. The policy
281+
evaluates the base image references against these patterns.
282+
283+
Default: `[*]` (any reference is an allowed base image)
272284

273-
- Allow only supported tags of Docker Official Images.
285+
- **Only supported tags**
286+
287+
Allow only supported tags when using Docker Official Images.
274288

275289
When this option is enabled, images using unsupported tags of official images
276-
trigger a policy violation. Supported tags for official images are listed in
277-
the **Supported tags** section of the repository overview on Docker Hub.
290+
as their base image trigger a policy violation. Supported tags for official
291+
images are listed in the **Supported tags** section of the repository
292+
overview on Docker Hub.
293+
294+
Enabled by default.
295+
296+
- **Only supported OS distributions**
278297

279-
- Allow only Docker Official Images of supported distro versions
298+
Allow only Docker Official Images of supported Linux distribution versions.
280299

281300
When this option is enabled, images using unsupported Linux distributions
282301
that have reached end of life (such as `ubuntu:18.04`) trigger a policy violation.
283302

284303
Enabling this option may cause the policy to report no data
285304
if the operating system version cannot be determined.
286305

287-
This policy isn't enabled by default. To enable the policy:
288-
289-
1. [Create a new policy](https://scout.docker.com/reports/policies/create?fromDefinition=approved-base-images&fromNamespace=docker) in the Docker Scout Dashboard.
290-
2. Under **Approved base image sources**, specify the image reference patterns that you want to allow.
291-
3. Select whether you want to allow only supported tags for official images,
292-
and supported Linux distribution versions.
293-
4. Select **Save and enable**.
294-
295-
The policy is now enabled for your current organization.
306+
Enabled by default.
296307

297308
Your images need provenance attestations for this policy to successfully
298309
evaluate. For more information, see [No base image data](#no-base-image-data).
299310

311+
## Additional policies
312+
313+
In addition to the [out-of-the-box policies](#out-of-the-box-policies) enabled
314+
by default, Docker Scout supports the following optional policies. Before you
315+
can enable these policies, you need to either configure the policies, or
316+
configure the integration that the policy requires.
317+
318+
- [SonarQube quality gates passed](#sonarqube-quality-gates-passed)
319+
300320
### SonarQube quality gates passed
301321

302322
The **SonarQube quality gates passed** policy builds on the [SonarQube

content/scout/policy/scores.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,10 @@ The policies that influence the score, and their respective weights, are as foll
108108
| [No fixable critical or high vulnerabilities](/scout/policy#no-fixable-critical-or-high-vulnerabilities) | 20 |
109109
| [No high-profile vulnerabilities](/scout/policy#no-high-profile-vulnerabilities) | 20 |
110110
| [Supply chain attestations](/scout/policy#supply-chain-attestations) | 15 |
111-
| [No unapproved base images](/scout/policy/#no-unapproved-base-images) \* | 15 |
111+
| [No unapproved base images](/scout/policy/#no-unapproved-base-images) | 15 |
112112
| [No outdated base images](/scout/policy#no-outdated-base-images) | 10 |
113113
| [Default non-root user](/scout/policy#default-non-root-user) | 5 |
114-
| No AGPL v3 licenses \*\* | 5 |
115-
116-
\* _The **No unapproved base images** policy used for health score evaluation also
117-
checks that the tags of Docker Official Images use supported tags and, where
118-
applicable, that the Linux distro that the image uses is a supported distro
119-
version. This is a policy configuration option that's enabled by default for
120-
health score evaluation. For more information, refer to the
121-
[Unapproved base images](/scout/policy/#no-unapproved-base-images) policy._
122-
123-
\*\* _The **No AGPL v3 licenses** policy is a subset of the
124-
[Copyleft licenses](./_index.md#no-copyleft-licenses) policy._
114+
| [No AGPL v3 licenses](/scout/policy/_index.md#no-agpl-v3-licenses) | 5 |
125115

126116
### Evaluation
127117

content/scout/release-notes/platform.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,29 @@ Docker Scout platform, including the Dashboard. For CLI release notes, refer to
1515
Take a look at the [Docker Public Roadmap](https://github.com/docker/roadmap/projects/1)
1616
for what's coming next.
1717

18+
## Q3 2024
19+
20+
New features and enhancements released in the third quarter of 2024.
21+
22+
### 2024-08-13
23+
24+
This release changes the out-of-the-box policies to align with the policy
25+
configurations used to evaluate Docker Scout [health scores](/scout/policy/scores.md).
26+
27+
The default out-of-the-box policies are now:
28+
29+
- **No high-profile vulnerabilities**
30+
- **No fixable critical or high vulnerabilities**
31+
- **No unapproved base images**
32+
- **Default non-root user**
33+
- **Supply chain attestations**
34+
- **No outdated base images**
35+
- **No AGPL v3 licenses**
36+
37+
The configurations for these policies are now the same as the configurations
38+
used to calculate health scores. Previously, the out-of-the-box policies had
39+
different configurations than the health score policies.
40+
1841
## Q2 2024
1942

2043
New features and enhancements released in the second quarter of 2024.

data/redirects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
- /go/scout-policy/
125125
"/scout/policy/#no-fixable-critical-or-high-vulnerabilities":
126126
- /go/scout-policy-dsp001/
127-
"/scout/policy/#no-copyleft-licenses":
127+
"/scout/policy/#no-agpl-v3-licenses":
128128
- /go/scout-policy-dsp002/
129129
"/scout/policy/#no-outdated-base-images":
130130
- /go/scout-policy-dsp003/

0 commit comments

Comments
 (0)