Skip to content

Commit 2ee7ecb

Browse files
Add missing C-0012, C-0013 description
Signed-off-by: Florian Pöhler <[email protected]>
1 parent bc3d2e1 commit 2ee7ecb

4 files changed

+61
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ kubectl -n policy-example run nginx --image=nginx --restart=Never
5252
| [C-0001](https://hub.armosec.io/docs/c-0001) | Forbidden Container Registries | [kubescape-c-0001-deny-forbidden-container-registries](/docs/policies-based-on-kubescape-controls/kubescape-c-0001-deny-forbidden-container-registries.md) | [untrustedRegistries](https://hub.armosec.io/docs/configuration_parameter_untrustedregistries) |
5353
| [C-0004](https://hub.armosec.io/docs/c-0004) | Resources memory limit and request | [kubescape-c-0004-deny-resources-with-memory-limit-or-request-not-set](/docs/policies-based-on-kubescape-controls/kubescape-c-0004-deny-resources-with-memory-limit-or-request-not-set.md) | [memoryRequestMin](https://hub.armosec.io/docs/configuration_parameter_memoryrequestmin) |
5454
| [C-0009](https://hub.armosec.io/docs/c-0009) | Resource limits | [kubescape-c-0009-deny-resources-with-memory-or-cpu-limit-not-set](/docs/policies-based-on-kubescape-controls/kubescape-c-0009-deny-resources-with-memory-or-cpu-limit-not-set.md) | not configurable |
55+
| [C-0012](https://hub.armosec.io/docs/c-0012) | Applications credentials in configuration files | [kubescape-c-0012-deny-resources-with-sensitive-information-in-environment-variables](/docs/policies-based-on-kubescape-controls/kubescape-c-0012-deny-resources-with-sensitive-information-in-environment-variables.md) | [sensitiveValues](https://hub.armosec.io/docs/configuration_parameter_sensitivevalues), [sensitiveValuesAllowed](https://hub.armosec.io/docs/configuration_parameter_sensitivevaluesallowed), [sensitiveKeyNames](https://hub.armosec.io/docs/configuration_parameter_sensitivekeynames), [sensitiveKeyNamesAllowed](https://hub.armosec.io/docs/configuration_parameter_sensitivekeynames) |
56+
| [C-0013](https://hub.armosec.io/docs/c-0013) | Non-root containers | [kubescape-c-0013-deny-if-container-runs-as-root](/docs/policies-based-on-kubescape-controls/kubescape-c-0013-deny-if-container-runs-as-root.md) | not configurable |
5557
| [C-0016](https://hub.armosec.io/docs/c-0016) | Allow privilege escalation | [kubescape-c-0016-allow-privilege-escalation](/docs/policies-based-on-kubescape-controls/kubescape-c-0016-allow-privilege-escalation.md) | not configurable |
5658
| [C-0017](https://hub.armosec.io/docs/c-0017) | Immutable container filesystem | [kubescape-c-0017-deny-resources-with-mutable-container-filesystem](/docs/policies-based-on-kubescape-controls/kubescape-c-0017-deny-resources-with-mutable-container-filesystem.md) | not configurable |
5759
| [C-0018](https://hub.armosec.io/docs/c-0018) | Configured readiness probe | [kubescape-c-0018-deny-resources-without-configured-readiness-probes](/docs/policies-based-on-kubescape-controls/kubescape-c-0018-deny-resources-without-configured-readiness-probes.md) | not configurable |

controls/kustomization.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ resources:
22
- C-0001/policy.yaml
33
- C-0004/policy.yaml
44
- C-0009/policy.yaml
5+
- C-0012/policy.yaml
6+
- C-0013/policy.yaml
57
- C-0016/policy.yaml
68
- C-0017/policy.yaml
79
- C-0018/policy.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kubescape C-0012: Deny if application credentials found in configuration files
2+
3+
## Why this policy is required:
4+
Developers store secrets in the Kubernetes configuration files, such as environment variables in the pod configuration. Such behavior is commonly seen in clusters that are monitored by Azure Security Center. Attackers who have access to those configurations, by querying the API server or by accessing those files on the developer’s endpoint, can steal the stored secrets and use them.Note, this control is configurable. See below the details.
5+
6+
## Severity Level: High
7+
8+
## Configuration Parameters:
9+
* [sensitiveValues](https://hub.armosec.io/docs/configuration_parameter_sensitivevalues)
10+
* [sensitiveValuesAllowed](https://hub.armosec.io/docs/configuration_parameter_sensitivevaluesallowed)
11+
* [sensitiveKeyNames](https://hub.armosec.io/docs/configuration_parameter_sensitivekeynames)
12+
* [sensitiveKeyNamesAllowed](https://hub.armosec.io/docs/configuration_parameter_sensitivekeynames)
13+
14+
## Resources this policy could be applied to:
15+
* ConfigMap
16+
* CronJob
17+
* DaemonSet
18+
* Deployment
19+
* Job
20+
* Pod
21+
* ReplicaSet
22+
* StatefulSet
23+
24+
## What does this policy do:
25+
### This Policy checks for every container in the resource:
26+
* If pod has sensitive information in environment variables, by using list of known sensitive key names and values.
27+
28+
### This Policy checks for every configMap in the resource:
29+
* If configMap contains sensitive information.
30+
31+
## Implementing this policy in the Cluster:
32+
[Refer here for using the policy in the cluster](https://github.com/kubescape/cel-admission-library#using-the-library)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Kubescape C-0017: Deny resources with mutable container filesystem
2+
3+
## Why this policy is required:
4+
By default, containers are permitted mostly unrestricted execution within their own context. An attacker who has access to a container, can create files and download scripts as he wishes, and modify the underlying application running on the container.
5+
6+
## Severity Level: Low
7+
8+
## Configuration Parameters:
9+
* Not Configurable
10+
11+
## Resources this policy could be applied to:
12+
* CronJob
13+
* DaemonSet
14+
* Deployment
15+
* Job
16+
* Pod
17+
* ReplicaSet
18+
* StatefulSet
19+
20+
## What does this policy do:
21+
### This Policy checks for every container in the resource:
22+
* If `securityContext.readOnlyRootFilesystem` is set to `true`. If not, the resource is denied from being deployed in the cluster.
23+
24+
## Implementing this policy in the Cluster:
25+
[Refer here for using the policy in the cluster](https://github.com/kubescape/cel-admission-library#using-the-library)

0 commit comments

Comments
 (0)