You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+106-8Lines changed: 106 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ This project is to be considered a **proof-of-concept** and **not a supported pr
10
10
11
11
For issues with rules and documentation please check our GitHub [issues](https://github.com/BernieWhite/PSRule.Rules.Kubernetes/issues) page. If you do not see your problem captured, please file a new issue and follow the provided template.
12
12
13
-
If you have any problems with the [PSRule][project] engine, please check the project GitHub [issues](https://github.com/BernieWhite/PSRule/issues) page instead.
13
+
If you have any problems with the [PSRule][project] engine, please check the project GitHub [issues](https://github.com/Microsoft/PSRule/issues) page instead.
14
14
15
15
## Getting the modules
16
16
17
-
This project requires the PowerShell module PSRule.
17
+
This project requires the `PSRule`PowerShell module.
18
18
19
19
You can download and install these modules from the PowerShell Gallery.
PSRule for Kubernetes provides two methods for analyzing Kubernetes resources:
28
+
29
+
-_Pre-flight_ - Before resources are deployed from a YAML manifest file.
30
+
-_In-flight_ - After resources are deployed to a Kubernetes cluster.
31
+
27
32
### Offline with a manifest
28
33
29
-
Kubernetes resources can be evaluated within a YAML manifest file.
34
+
Kubernetes resources can be validated within a YAML manifest file.
35
+
To validate Kubernetes resources use the `Invoke-PSRule` cmdlet. PSRule natively supports reading objects from YAML files using the `-InputPath` parameter.
36
+
The `-InputPath` parameter can be abbreviated to `-f`.
@@ -21,3 +21,7 @@ When this annotation is used on a load balanced service, the Azure load balancer
21
21
## RECOMMENDATION
22
22
23
23
Consider creating services with an internal load balancer instead of a public load balancer.
24
+
25
+
## LINKS
26
+
27
+
-[Use an internal load balancer with Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/internal-lb#create-an-internal-load-balancer)
@@ -19,6 +19,6 @@ Containers should use specific tags instead of latest.
19
19
Deployments or pods should identify a specific tag to use for container images instead of latest.
20
20
When latest is used it may be hard to determine which version of the image is running.
21
21
22
-
When using variable tags such as v1.0 (which may refer to v1.0.0 or v1.0.1) consider using imagePullPolicy: Always to ensure that the an out-of-date cached image is not used.
22
+
When using variable tags such as v1.0 (which may refer to v1.0.0 or v1.0.1) consider using `imagePullPolicy: Always` to ensure that the an out-of-date cached image is not used.
23
23
24
-
The latest tag automatically uses imagePullPolicy: Always instead of the default imagePullPolicy: IfNotPresent.
24
+
The latest tag automatically uses `imagePullPolicy: Always` instead of the default `imagePullPolicy: IfNotPresent`.
@@ -12,8 +12,16 @@ Containers should deny privilege escalation.
12
12
13
13
## DESCRIPTION
14
14
15
-
Containers should deny privilege escalation.
15
+
In the default configuration, container processes are permitted to change the effective user ID through the _setuid_ binary.
16
+
Changing the effective user ID could allow a malicious or vulnerable process to gain a higher level of permission then intended.
17
+
To prevent this, explicitly set the `securityContext.allowPrivilegeEscalation` option to `false` on pod containers.
16
18
17
19
## RECOMMENDATION
18
20
19
-
Containers should deny privilege escalation.
21
+
Consider explicitly setting the `securityContext.allowPrivilegeEscalation` option to `false` on pod containers.
22
+
23
+
## LINKS
24
+
25
+
-[Secure container access to resources](https://docs.microsoft.com/en-us/azure/aks/operator-best-practices-cluster-security#secure-container-access-to-resources)
26
+
-[Set the security context for a Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
0 commit comments