Skip to content

Commit 31e5f01

Browse files
add controls C-0275, C-0276 for cis-1.10
Signed-off-by: YiscahLevySilas1 <[email protected]>
1 parent ff4b59f commit 31e5f01

2 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"controlID": "C-0275",
3+
"name": "Minimize the admission of containers wishing to share the host process ID namespace",
4+
"description": "Do not generally permit containers to be run with the hostPID flag set to true.",
5+
"long_description": "A container running in the host's PID namespace can inspect processes running outside the container. If the container also has access to ptrace capabilities this can be used to escalate privileges outside of the container.\n\n There should be at least one admission control policy defined which does not permit containers to share the host PID namespace.\n\n If you need to run containers which require hostPID, this should be defined in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
6+
"remediation": "Configure the Admission Controller to restrict the admission of `hostPID` containers.",
7+
"manual_test": "Fetch hostPID from each pod with\n\n \n```\nget pods -A -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.spec.hostPID}\n{end}'\n```",
8+
"references": [
9+
"https://workbench.cisecurity.org/sections/2633390/recommendations/4261968"
10+
],
11+
"attributes": {
12+
},
13+
"rulesNames": [
14+
"host-pid-privileges"
15+
],
16+
"baseScore": 5,
17+
"impact_statement": "Pods defined with `spec.hostPID: true` will not be permitted unless they are run under a specific policy.",
18+
"default_value": "By default, there are no restrictions on the creation of `hostPID` containers.",
19+
"category": {
20+
"name" : "Workload"
21+
},
22+
"scanningScope": {
23+
"matches": [
24+
"cluster",
25+
"file"
26+
]
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"controlID": "C-0276",
3+
"name": "Minimize the admission of containers wishing to share the host IPC namespace",
4+
"description": "Do not generally permit containers to be run with the hostIPC flag set to true.",
5+
"long_description": "A container running in the host's IPC namespace can use IPC to interact with processes outside the container.\n\n There should be at least one admission control policy defined which does not permit containers to share the host IPC namespace.\n\n If you need to run containers which require hostIPC, this should be definited in a separate policy and you should carefully check to ensure that only limited service accounts and users are given permission to use that policy.",
6+
"remediation": "Add policies to each namespace in the cluster which has user workloads to restrict the admission of `hostIPC` containers.",
7+
"manual_test": "To fetch hostIPC from each pod.\n\n```\nget pods -A -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.spec.hostIPC}\n{end}'\n```",
8+
"references": [
9+
"https://workbench.cisecurity.org/sections/2633390/recommendations/4261969"
10+
],
11+
"attributes": {
12+
},
13+
"rulesNames": [
14+
"host-ipc-privileges"
15+
],
16+
"baseScore": 5,
17+
"impact_statement": "Pods defined with `spec.hostIPC: true` will not be permitted unless they are run under a specific policy.",
18+
"default_value": "By default, there are no restrictions on the creation of `hostIPC` containers.",
19+
"category": {
20+
"name" : "Workload"
21+
},
22+
"scanningScope": {
23+
"matches": [
24+
"cluster",
25+
"file"
26+
]
27+
}
28+
}

0 commit comments

Comments
 (0)