Skip to content

Commit 8baf8c9

Browse files
authored
Merge pull request #23 from dev-sec/chris-rock/tags
update tags and refs
2 parents a1607e9 + 9d54c98 commit 8baf8c9

File tree

3 files changed

+416
-153
lines changed

3 files changed

+416
-153
lines changed

controls/docker_host_os_level1.rb

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@
4242
impact 1.0
4343
title 'Create a separate partition for containers'
4444
desc 'All Docker containers and their data and metadata is stored under /var/lib/docker directory. By default, /var/lib/docker would be mounted under / or /var partitions based on availability.'
45+
4546
tag 'host'
46-
tag cis: '1.1'
47+
tag cis: 'docker:1.1'
48+
tag level: 1
4749
ref 'Docker storage recommendation', url: 'http://www.projectatomic.io/docs/docker-storage-recommendation/'
4850

4951
describe mount('/var/lib/docker') do
@@ -55,8 +57,10 @@
5557
impact 1.0
5658
title 'Use the updated Linux Kernel'
5759
desc 'Docker in daemon mode has specific kernel requirements. A 3.10 Linux kernel is the minimum requirement for Docker.'
60+
5861
tag 'host'
59-
tag cis: '1.2'
62+
tag cis: 'docker:1.2'
63+
tag level: 1
6064
ref 'Check kernel dependencies', url: 'https://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies'
6165
ref 'Installation list', url: 'https://docs.docker.com/engine/installation/#installation-list'
6266

@@ -72,8 +76,10 @@
7276
impact 1.0
7377
title 'Harden the container host'
7478
desc 'Containers run on a Linux host. A container host can run one or more containers. It is of utmost importance to harden the host to mitigate host security misconfiguration'
79+
7580
tag 'host'
76-
tag cis: '1.3'
81+
tag cis: 'docker:1.3'
82+
tag level: 1
7783
ref 'Hardening Framework dev-sec.io', url: 'http://dev-sec.io'
7884
ref 'Docker security article', url: 'https://docs.docker.com/engine/security/security/'
7985
ref 'CIS Benchmarks', url: 'https://benchmarks.cisecurity.org/downloads/multiform/index.cfm'
@@ -87,17 +93,21 @@
8793
impact 1.0
8894
title 'Remove all non-essential services from the host'
8995
desc 'Ensure that the host running the docker daemon is running only the essential services.'
96+
9097
tag 'host'
91-
tag cis: '1.4'
98+
tag cis: 'docker:1.4'
99+
tag level: 1
92100
ref 'Containers & Docker: How Secure Are They?', url: 'https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/'
93101
end
94102

95103
control 'cis-docker-benchmark-1.5' do
96104
impact 1.0
97105
title 'Keep Docker up to date'
98106
desc 'The docker container solution is evolving to maturity and stability at a rapid pace. Like any other software, the vendor releases regular updates for Docker software that address security vulnerabilities, product bugs and bring in new functionality.'
107+
99108
tag 'host'
100-
tag cis: '1.5'
109+
tag cis: 'docker:1.5'
110+
tag level: 1
101111
ref 'Docker installation', url: 'https://docs.docker.com/installation/'
102112
ref 'Docker releases', url: 'https://github.com/docker/docker/releases/latest'
103113

@@ -120,8 +130,10 @@
120130
impact 1.0
121131
title 'Only allow trusted users to control Docker daemon'
122132
desc 'The Docker daemon currently requires \'root\' privileges. A user added to the \'docker\' group gives him full \'root\' access rights'
133+
123134
tag 'host'
124-
tag cis: '1.6'
135+
tag cis: 'docker:1.6'
136+
tag level: 1
125137
ref 'On Docker security: docker group considered harmful', url: 'https://www.andreas-jung.com/contents/on-docker-security-docker-group-considered-harmful'
126138
ref 'Why we do not let non-root users run Docker in CentOS, Fedora, or RHEL', url: 'http://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel/'
127139

@@ -138,8 +150,10 @@
138150
impact 1.0
139151
title 'Audit docker daemon'
140152
desc 'Apart from auditing your regular Linux file system and system calls, audit Docker daemon as well. Docker daemon runs with \'root\' privileges. It is thus necessary to audit its activities and usage.'
153+
141154
tag 'host'
142-
tag cis: '1.7'
155+
tag cis: 'docker:1.7'
156+
tag level: 1
143157
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
144158

145159
describe auditd_rules do
@@ -156,8 +170,10 @@
156170
impact 1.0
157171
title 'Audit Docker files and directories - /var/lib/docker'
158172
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /var/lib/docker is one such directory. It holds all the information about containers. It must be audited.'
173+
159174
tag 'host'
160-
tag cis: '1.8'
175+
tag cis: 'docker:1.8'
176+
tag level: 1
161177
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
162178

163179
describe auditd_rules do
@@ -169,8 +185,10 @@
169185
impact 1.0
170186
title 'Audit Docker files and directories - /etc/docker'
171187
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /etc/docker is one such directory. It holds various certificates and keys used for TLS communication between Docker daemon and Docker client. It must be audited.'
188+
172189
tag 'host'
173-
tag cis: '1.9'
190+
tag cis: 'docker:1.9'
191+
tag level: 1
174192
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
175193

176194
describe auditd_rules do
@@ -182,8 +200,10 @@
182200
impact 1.0
183201
title 'Audit Docker files and directories - docker.service'
184202
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. docker.service is one such file. The docker.service file might be present if the daemon parameters have been changed by an administrator. It holds various parameters for Docker daemon. It must be audited, if applicable.'
203+
185204
tag 'host'
186-
tag cis: '1.10'
205+
tag cis: 'docker:1.10'
206+
tag level: 1
187207
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
188208

189209
if docker.path
@@ -202,8 +222,10 @@
202222
impact 1.0
203223
title 'Audit Docker files and directories - docker.socket'
204224
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. docker.socket is one such file. It holds various parameters for Docker daemon socket. It must be audited, if applicable.'
225+
205226
tag 'host'
206-
tag cis: '1.11'
227+
tag cis: 'docker:1.11'
228+
tag level: 1
207229
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
208230

209231
if docker.socket
@@ -222,8 +244,10 @@
222244
impact 1.0
223245
title 'Audit Docker files and directories - /etc/default/docker'
224246
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /etc/default/docker is one such file. It holds various parameters for Docker daemon. It must be audited, if applicable.'
247+
225248
tag 'host'
226-
tag cis: '1.12'
249+
tag cis: 'docker:1.12'
250+
tag level: 1
227251
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
228252

229253
only_if { os[:family] != 'centos' }
@@ -236,8 +260,10 @@
236260
impact 1.0
237261
title 'Audit Docker files and directories - /etc/docker/daemon.json'
238262
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /etc/docker/daemon.json is one such file. It holds various parameters for Docker daemon. It must be audited, if applicable.'
263+
239264
tag 'host'
240-
tag cis: '1.13'
265+
tag cis: 'docker:1.13'
266+
tag level: 1
241267
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
242268
ref 'Daemon configuration', url: 'https://docs.docker.com/engine/reference/commandline/daemon/#daemon-configuration-file'
243269

@@ -250,8 +276,10 @@
250276
impact 1.0
251277
title 'Audit Docker files and directories - /usr/bin/docker-containerd'
252278
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /usr/bin/docker-containerd is one such file. Docker now relies on containerd and runC to spawn containers. It must be audited, if applicable.'
279+
253280
tag 'host'
254-
tag cis: '1.14'
281+
tag cis: 'docker:1.14'
282+
tag level: 1
255283
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
256284
ref 'Containerd integration', url: 'https://github.com/docker/docker/pull/20662'
257285
ref 'Containerd tools', url: 'https://containerd.tools/'
@@ -265,8 +293,10 @@
265293
impact 1.0
266294
title 'Audit Docker files and directories - /usr/bin/docker-runc'
267295
desc 'Apart from auditing your regular Linux file system and system calls, audit all Docker related files and directories. Docker daemon runs with \'root\' privileges. Its behavior depends on some key files and directories. /usr/bin/docker-runc is one such file. Docker now relies on containerd and runC to spawn containers. It must be audited, if applicable.'
296+
268297
tag 'host'
269-
tag cis: '1.15'
298+
tag cis: 'docker:1.15'
299+
tag level: 1
270300
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
271301
ref 'Containerd integration', url: 'https://github.com/docker/docker/pull/20662'
272302
ref 'Containerd tools', url: 'https://containerd.tools/'
@@ -281,6 +311,10 @@
281311
impact 1.0
282312
title 'Avoid image sprawl'
283313
desc 'Do not keep a large number of container images on the same host. Use only tagged images as appropriate.'
314+
315+
tag 'host'
316+
tag cis: 'docker:6.4'
317+
tag level: 1
284318
ref 'http://craiccomputing.blogspot.de/2014/09/clean-up-unused-docker-containers-and.html'
285319
ref 'https://forums.docker.com/t/command-to-remove-all-unused-images/20/7'
286320
ref 'https://github.com/docker/docker/issues/9054'
@@ -301,6 +335,10 @@
301335
impact 1.0
302336
title 'Avoid container sprawl'
303337
desc 'Do not keep a large number of containers on the same host.'
338+
339+
tag 'host'
340+
tag cis: 'docker:6.5'
341+
tag level: 1
304342
ref 'https://zeltser.com/security-risks-and-benefits-of-docker-application/'
305343
ref 'http://searchsdn.techtarget.com/feature/Docker-networking-How-Linux-containers-will-change-your-network'
306344

0 commit comments

Comments
 (0)