Skip to content

Commit 24d1fe3

Browse files
authored
Update text of linting rules descriptions and remediations (#172)
1 parent 622c0b5 commit 24d1fe3

21 files changed

+89
-89
lines changed

docs/generated/checks.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ KubeLinter includes the following built-in checks:
66

77
**Enabled by default**: Yes
88

9-
**Description**: Alert on services that don't have any matching deployments
9+
**Description**: Indicates when services do not have any associated deployments.
1010

11-
**Remediation**: Make sure your service's selector correctly matches the labels on one of your deployments.
11+
**Remediation**: Confirm that your service's selector correctly matches the labels on one of your deployments.
1212

1313
**Template**: [dangling-service](generated/templates.md#dangling-services)
1414

@@ -22,9 +22,9 @@ KubeLinter includes the following built-in checks:
2222

2323
**Enabled by default**: No
2424

25-
**Description**: Alert on pods that use the default service account
25+
**Description**: Indicates when pods use the default service account.
2626

27-
**Remediation**: Create a dedicated service account for your pod. See https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ for more details.
27+
**Remediation**: Create a dedicated service account for your pod. Refer to https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ for details.
2828

2929
**Template**: [service-account](generated/templates.md#service-account)
3030

@@ -38,9 +38,9 @@ KubeLinter includes the following built-in checks:
3838

3939
**Enabled by default**: Yes
4040

41-
**Description**: Alert on deployments that use the deprecated serviceAccount field
41+
**Description**: Indicates when deployments use the deprecated serviceAccount field.
4242

43-
**Remediation**: Use the serviceAccountName field instead of the serviceAccount field.
43+
**Remediation**: Use the serviceAccountName field instead.
4444

4545
**Template**: [deprecated-service-account-field](generated/templates.md#deprecated-service-account-field)
4646

@@ -54,9 +54,9 @@ KubeLinter includes the following built-in checks:
5454

5555
**Enabled by default**: Yes
5656

57-
**Description**: Alert on containers not dropping NET_RAW capability
57+
**Description**: Indicates when containers do not drop NET_RAW capability
5858

59-
**Remediation**: NET_RAW grants an application within the container the ability to craft raw packets, use raw sockets, and it also allows an application to bind to any address. Please specify to drop this capability in the containers under containers security contexts.
59+
**Remediation**: NET_RAW makes it so that an application within the container is able to craft raw packets, use raw sockets, and bind to any address. Remove this capability in the containers under containers security contexts.
6060

6161
**Template**: [verify-container-capabilities](generated/templates.md#verify-container-capabilities)
6262

@@ -70,9 +70,9 @@ KubeLinter includes the following built-in checks:
7070

7171
**Enabled by default**: Yes
7272

73-
**Description**: Alert on objects using a secret in an environment variable
73+
**Description**: Indicates when objects use a secret in an environment variable.
7474

75-
**Remediation**: Don't use raw secrets in an environment variable. Instead, either mount the secret as a file or use a secretKeyRef. See https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets for more details.
75+
**Remediation**: Do not use raw secrets in environment variables. Instead, either mount the secret as a file or use a secretKeyRef. Refer to https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets for details.
7676

7777
**Template**: [env-var](generated/templates.md#environment-variables)
7878

@@ -86,9 +86,9 @@ KubeLinter includes the following built-in checks:
8686

8787
**Enabled by default**: Yes
8888

89-
**Description**: Alert on deployments where the selector doesn't match the pod template labels
89+
**Description**: Indicates when deployment selectors fail to match the pod template labels.
9090

91-
**Remediation**: Make sure your deployment's selector correctly matches the labels in its pod template.
91+
**Remediation**: Confirm that your deployment selector correctly matches the labels in its pod template.
9292

9393
**Template**: [mismatching-selector](generated/templates.md#mismatching-selector)
9494

@@ -102,9 +102,9 @@ KubeLinter includes the following built-in checks:
102102

103103
**Enabled by default**: Yes
104104

105-
**Description**: Alert on deployments with multiple replicas that don't specify inter pod anti-affinity to ensure that the orchestrator attempts to schedule replicas on different nodes
105+
**Description**: Indicates when deployments with multiple replicas fail to specify inter-pod anti-affinity, to ensure that the orchestrator attempts to schedule replicas on different nodes.
106106

107-
**Remediation**: Specify anti-affinity in your pod spec to ensure that the orchestrator attempts to schedule replicas on different nodes. You can do this by using podAntiAffinity, specifying a labelSelector that matches pods of this deployment, and setting the topologyKey to kubernetes.io/hostname. See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity for more details.
107+
**Remediation**: Specify anti-affinity in your pod specification to ensure that the orchestrator attempts to schedule replicas on different nodes. Using podAntiAffinity, specify a labelSelector that matches pods for the deployment, and set the topologyKey to kubernetes.io/hostname. Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity for details.
108108

109109
**Template**: [anti-affinity](generated/templates.md#anti-affinity-not-specified)
110110

@@ -118,9 +118,9 @@ KubeLinter includes the following built-in checks:
118118

119119
**Enabled by default**: Yes
120120

121-
**Description**: Alert on objects using deprecated API versions under extensions v1beta
121+
**Description**: Indicates when objects use deprecated API versions under extensions/v1beta.
122122

123-
**Remediation**: Migrate to using the apps/v1 API versions for these objects. See https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ for more details.
123+
**Remediation**: Migrate using the apps/v1 API versions for the objects. Refer to https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ for details.
124124

125125
**Template**: [disallowed-api-obj](generated/templates.md#disallowed-api-objects)
126126

@@ -134,9 +134,9 @@ KubeLinter includes the following built-in checks:
134134

135135
**Enabled by default**: No
136136

137-
**Description**: Alert on containers which don't specify a liveness probe
137+
**Description**: Indicates when containers fail to specify a liveness probe.
138138

139-
**Remediation**: Specify a liveness probe in your container. See https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for more details.
139+
**Remediation**: Specify a liveness probe in your container. Refer to https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for details.
140140

141141
**Template**: [liveness-probe](generated/templates.md#liveness-probe-not-specified)
142142

@@ -150,9 +150,9 @@ KubeLinter includes the following built-in checks:
150150

151151
**Enabled by default**: Yes
152152

153-
**Description**: Alert on containers not running with a read-only root filesystem
153+
**Description**: Indicates when containers are running without a read-only root filesystem.
154154

155-
**Remediation**: Set readOnlyRootFilesystem to true in your container's securityContext.
155+
**Remediation**: Set readOnlyRootFilesystem to true in the container securityContext.
156156

157157
**Template**: [read-only-root-fs](generated/templates.md#read-only-root-filesystems)
158158

@@ -166,9 +166,9 @@ KubeLinter includes the following built-in checks:
166166

167167
**Enabled by default**: No
168168

169-
**Description**: Alert on containers which don't specify a readiness probe
169+
**Description**: Indicates when containers fail to specify a readiness probe.
170170

171-
**Remediation**: Specify a readiness probe in your container. See https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for more details.
171+
**Remediation**: Specify a readiness probe in your container. Refer to https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for details.
172172

173173
**Template**: [readiness-probe](generated/templates.md#readiness-probe-not-specified)
174174

@@ -182,9 +182,9 @@ KubeLinter includes the following built-in checks:
182182

183183
**Enabled by default**: Yes
184184

185-
**Description**: Alert on pods referencing a service account that isn't found
185+
**Description**: Indicates when pods reference a service account that is not found.
186186

187-
**Remediation**: Make sure to create the service account, or to refer to an existing service account.
187+
**Remediation**: Create the missing service account, or refer to an existing service account.
188188

189189
**Template**: [non-existent-service-account](generated/templates.md#non-existent-service-account)
190190

@@ -198,9 +198,9 @@ KubeLinter includes the following built-in checks:
198198

199199
**Enabled by default**: Yes
200200

201-
**Description**: Alert on deployments with containers running in privileged mode
201+
**Description**: Indicates when deployments have containers running in privileged mode.
202202

203-
**Remediation**: Don't run your container as privileged unless required.
203+
**Remediation**: Do not run your container as privileged unless it is required.
204204

205205
**Template**: [privileged](generated/templates.md#privileged-containers)
206206

@@ -214,9 +214,9 @@ KubeLinter includes the following built-in checks:
214214

215215
**Enabled by default**: No
216216

217-
**Description**: Alert on objects without an 'email' annotation with a valid email
217+
**Description**: Indicates when objects do not have an email annotation with a valid email address.
218218

219-
**Remediation**: Add an email annotation to your object with the contact information of the object's owner.
219+
**Remediation**: Add an email annotation to your object with the email address of the object's owner.
220220

221221
**Template**: [required-annotation](generated/templates.md#required-annotation)
222222

@@ -230,9 +230,9 @@ KubeLinter includes the following built-in checks:
230230

231231
**Enabled by default**: No
232232

233-
**Description**: Alert on objects without the 'owner' label
233+
**Description**: Indicates when objects do not have an email annotation with an owner label.
234234

235-
**Remediation**: Add an email annotation to your object with information about the object's owner.
235+
**Remediation**: Add an email annotation to your object with the name of the object's owner.
236236

237237
**Template**: [required-label](generated/templates.md#required-label)
238238

@@ -246,9 +246,9 @@ KubeLinter includes the following built-in checks:
246246

247247
**Enabled by default**: Yes
248248

249-
**Description**: Alert on containers not set to runAsNonRoot
249+
**Description**: Indicates when containers are not set to runAsNonRoot.
250250

251-
**Remediation**: Set runAsUser to a non-zero number, and runAsNonRoot to true, in your pod or container securityContext. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ for more details.
251+
**Remediation**: Set runAsUser to a non-zero number and runAsNonRoot to true in your pod or container securityContext. Refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ for details.
252252

253253
**Template**: [run-as-non-root](generated/templates.md#run-as-non-root-user)
254254

@@ -262,9 +262,9 @@ KubeLinter includes the following built-in checks:
262262

263263
**Enabled by default**: Yes
264264

265-
**Description**: Alert on deployments exposing port 22, commonly reserved for SSH access
265+
**Description**: Indicates when deployments expose port 22, which is commonly reserved for SSH access.
266266

267-
**Remediation**: Ensure that non-SSH services are not using port 22. Ensure that any actual SSH servers have been vetted.
267+
**Remediation**: Ensure that non-SSH services are not using port 22. Confirm that any actual SSH servers have been vetted.
268268

269269
**Template**: [ports](generated/templates.md#ports)
270270

@@ -278,9 +278,9 @@ KubeLinter includes the following built-in checks:
278278

279279
**Enabled by default**: Yes
280280

281-
**Description**: Alert on containers without CPU requests and limits set
281+
**Description**: Indicates when containers do not have CPU requests and limits set.
282282

283-
**Remediation**: Set your container's CPU requests and limits depending on its requirements. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for more details.
283+
**Remediation**: Set CPU requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.
284284

285285
**Template**: [cpu-requirements](generated/templates.md#cpu-requirements)
286286

@@ -294,9 +294,9 @@ KubeLinter includes the following built-in checks:
294294

295295
**Enabled by default**: Yes
296296

297-
**Description**: Alert on containers without memory requests and limits set
297+
**Description**: Indicates when containers do not have memory requests and limits set.
298298

299-
**Remediation**: Set your container's memory requests and limits depending on its requirements. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for more details.
299+
**Remediation**: Set memory requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.
300300

301301
**Template**: [memory-requirements](generated/templates.md#memory-requirements)
302302

@@ -310,9 +310,9 @@ KubeLinter includes the following built-in checks:
310310

311311
**Enabled by default**: No
312312

313-
**Description**: Alert on containers that mount a host path as writable
313+
**Description**: Indicates when containers mount a host path as writable.
314314

315-
**Remediation**: If you need to access files on the host, mount them as readOnly.
315+
**Remediation**: Set containers to mount host paths as readOnly, if you need to access files on the host.
316316

317317
**Template**: [writable-host-mount](generated/templates.md#writable-host-mounts)
318318

pkg/builtinchecks/yamls/dangling-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "dangling-service"
2-
description: "Alert on services that don't have any matching deployments"
3-
remediation: "Make sure your service's selector correctly matches the labels on one of your deployments."
2+
description: "Indicates when services do not have any associated deployments."
3+
remediation: "Confirm that your service's selector correctly matches the labels on one of your deployments."
44
scope:
55
objectKinds:
66
- Service

pkg/builtinchecks/yamls/default-service-account.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "default-service-account"
2-
description: "Alert on pods that use the default service account"
2+
description: "Indicates when pods use the default service account."
33
remediation: >-
44
Create a dedicated service account for your pod.
5-
See https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ for more details.
5+
Refer to https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ for details.
66
scope:
77
objectKinds:
88
- DeploymentLike

pkg/builtinchecks/yamls/deprecated-service-account.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "deprecated-service-account-field"
2-
description: "Alert on deployments that use the deprecated serviceAccount field"
3-
remediation: "Use the serviceAccountName field instead of the serviceAccount field."
2+
description: "Indicates when deployments use the deprecated serviceAccount field."
3+
remediation: "Use the serviceAccountName field instead."
44
scope:
55
objectKinds:
66
- DeploymentLike

pkg/builtinchecks/yamls/drop-net-raw-capability.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "drop-net-raw-capability"
2-
description: "Alert on containers not dropping NET_RAW capability"
2+
description: "Indicates when containers do not drop NET_RAW capability"
33
remediation: >-
4-
NET_RAW grants an application within the container the ability to craft raw packets, use raw sockets, and it also
5-
allows an application to bind to any address. Please specify to drop this capability in the containers under
4+
NET_RAW makes it so that an application within the container is able to craft raw packets,
5+
use raw sockets, and bind to any address. Remove this capability in the containers under
66
containers security contexts.
77
scope:
88
objectKinds:

pkg/builtinchecks/yamls/env-var-secret.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "env-var-secret"
2-
description: "Alert on objects using a secret in an environment variable"
2+
description: "Indicates when objects use a secret in an environment variable."
33
remediation: >-
4-
Don't use raw secrets in an environment variable. Instead, either mount the secret as a file or use a secretKeyRef.
5-
See https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets for more details.
4+
Do not use raw secrets in environment variables. Instead, either mount the secret as a file or use a secretKeyRef.
5+
Refer to https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets for details.
66
scope:
77
objectKinds:
88
- DeploymentLike

pkg/builtinchecks/yamls/mismatching-selector.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "mismatching-selector"
2-
description: "Alert on deployments where the selector doesn't match the pod template labels"
3-
remediation: "Make sure your deployment's selector correctly matches the labels in its pod template."
2+
description: "Indicates when deployment selectors fail to match the pod template labels."
3+
remediation: "Confirm that your deployment selector correctly matches the labels in its pod template."
44
scope:
55
objectKinds:
66
- DeploymentLike

pkg/builtinchecks/yamls/no-anti-affinity.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: "no-anti-affinity"
2-
description: "Alert on deployments with multiple replicas that don't specify inter pod anti-affinity to ensure that the orchestrator attempts to schedule replicas on different nodes"
2+
description: "Indicates when deployments with multiple replicas fail to specify inter-pod anti-affinity, to ensure that the orchestrator attempts to schedule replicas on different nodes."
33
remediation: >-
4-
Specify anti-affinity in your pod spec to ensure that the orchestrator attempts to schedule replicas on different nodes.
5-
You can do this by using podAntiAffinity, specifying a labelSelector that matches pods of this deployment,
6-
and setting the topologyKey to kubernetes.io/hostname.
7-
See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity for more details.
4+
Specify anti-affinity in your pod specification to ensure that the orchestrator attempts to schedule replicas on different nodes.
5+
Using podAntiAffinity, specify a labelSelector that matches pods for the deployment,
6+
and set the topologyKey to kubernetes.io/hostname.
7+
Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity for details.
88
scope:
99
objectKinds:
1010
- DeploymentLike

pkg/builtinchecks/yamls/no-extensions-v1beta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "no-extensions-v1beta"
2-
description: "Alert on objects using deprecated API versions under extensions v1beta"
2+
description: "Indicates when objects use deprecated API versions under extensions/v1beta."
33
remediation: >-
4-
Migrate to using the apps/v1 API versions for these objects.
5-
See https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ for more details.
4+
Migrate using the apps/v1 API versions for the objects.
5+
Refer to https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ for details.
66
scope:
77
objectKinds:
88
- Any

pkg/builtinchecks/yamls/no-liveness-probe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "no-liveness-probe"
2-
description: "Alert on containers which don't specify a liveness probe"
2+
description: "Indicates when containers fail to specify a liveness probe."
33
remediation: >-
44
Specify a liveness probe in your container.
5-
See https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for more details.
5+
Refer to https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ for details.
66
scope:
77
objectKinds:
88
- DeploymentLike

0 commit comments

Comments
 (0)