Skip to content

Commit 78a5119

Browse files
committed
update control 2.9 to 2.15
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent 9c0002d commit 78a5119

1 file changed

Lines changed: 43 additions & 12 deletions

File tree

controls/docker_level2.rb

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
impact 1.0
8585
title 'Confirm default cgroup usage'
8686
desc 'The --cgroup-parent option allows you to set the default cgroup parent to use for all the containers. If there is no specific use case, this setting should be left at its default.'
87-
ref 'https://docs.docker.com/engine/reference/commandline/daemon/'
87+
tag 'daemon'
88+
ref 'Docker daemon configuration', url: 'https://docs.docker.com/engine/reference/commandline/daemon/'
8889

8990
describe json('/etc/docker/daemon.json') do
9091
its(['cgroup-parent']) { should eq('docker') }
@@ -95,7 +96,8 @@
9596
impact 1.0
9697
title 'Do not change base device size until needed'
9798
desc 'In certain circumstances, you might need containers bigger than 10G in size. In these cases, carefully choose the base device size.'
98-
ref 'https://docs.docker.com/engine/reference/commandline/daemon/#storage-driver-options'
99+
tag 'daemon'
100+
ref 'Docker daemon storage driver options', url: 'https://docs.docker.com/engine/reference/commandline/daemon/#storage-driver-options'
99101

100102
describe json('/etc/docker/daemon.json') do
101103
its(['storage-opts']) { should eq(['dm.basesize=10G']) }
@@ -106,10 +108,10 @@
106108
impact 1.0
107109
title 'Use authorization plugin'
108110
desc 'Docker’s out-of-the-box authorization model is all or nothing. Any user with permission to access the Docker daemon can run any Docker client command. The same is true for callers using Docker’s remote API to contact the daemon. If you require greater access control, you can create authorization plugins and add them to your Docker daemon configuration. Using an authorization plugin, a Docker administrator can configure granular access policies for managing access to Docker daemon.'
109-
ref 'https://docs.docker.com/engine/reference/commandline/daemon/#access-authorization'
110-
ref 'https://docs.docker.com/engine/extend/plugins_authorization/'
111-
ref 'https://github.com/twistlock/authz'
112-
ref 'https://sreeninet.wordpress.com/2016/03/06/docker-security-part-3engine-access/'
111+
tag 'daemon'
112+
ref 'Access authorization', url: 'https://docs.docker.com/engine/reference/commandline/daemon/#access-authorization'
113+
ref 'Auhtorization plugins', url: 'https://docs.docker.com/engine/extend/plugins_authorization/'
114+
ref 'Twistlock authorization plugin', url: 'https://github.com/twistlock/authz'
113115

114116
describe json('/etc/docker/daemon.json') do
115117
its(['authorization-plugins']) { should_not be_empty }
@@ -123,8 +125,8 @@
123125
impact 1.0
124126
title 'Configure centralized and remote logging'
125127
desc 'Docker now supports various log drivers. A preferable way to store logs is the one that supports centralized and remote logging.'
126-
tag 'Bug: logs-opts seems broken in daemon.json https://github.com/docker/docker/issues/22311'
127-
ref 'https://docs.docker.com/engine/admin/logging/overview/'
128+
tag 'daemon'
129+
ref 'Logging overview', url: 'https://docs.docker.com/engine/admin/logging/overview/'
128130

129131
describe json('/etc/docker/daemon.json') do
130132
its(['log-driver']) { should_not be_empty }
@@ -141,16 +143,45 @@
141143
impact 1.0
142144
title 'Disable operations on legacy registry (v1)'
143145
desc 'The latest Docker registry is v2. All operations on the legacy registry version (v1) should be restricted.'
144-
ref 'https://docs.docker.com/engine/reference/commandline/daemon/'
145-
ref 'https://github.com/docker/docker/issues/8093'
146-
ref 'https://github.com/docker/docker/issues/9015'
147-
ref 'https://github.com/docker/docker-registry/issues/612'
146+
tag 'daemon'
147+
ref 'Docker daemon storage driver options', url: 'https://docs.docker.com/engine/reference/commandline/daemon/#storage-driver-options'
148+
ref 'Proposal: Provenance step 1 - Transform images for validation and verification', url: 'https://github.com/docker/docker/issues/8093'
149+
ref 'Proposal: JSON Registry API V2.1', url: 'https://github.com/docker/docker/issues/9015'
150+
ref 'Registry next generation', url: 'https://github.com/docker/docker-registry/issues/612'
151+
ref 'Docker Registry HTTP API V2', url: 'https://docs.docker.com/registry/spec/api/'
152+
ref 'Creating Private Docker Registry 2.0 with Token Authentication Service', url: 'https://the.binbashtheory.com/creating-private-docker-registry-2-0-with-token-authentication-service/'
153+
ref 'New Tool to Migrate From V1 Registry to Docker Trusted Registry or V2 Open Source Registry', url: 'https://blog.docker.com/2015/07/new-tool-v1-registry-docker-trusted-registry-v2-open-source/'
154+
ref 'Docker Registry V2', url: 'https://www.slideshare.net/Docker/docker-registry-v2'
148155

149156
describe json('/etc/docker/daemon.json') do
150157
its(['disable-legacy-registry']) { should eq(true) }
151158
end
152159
end
153160

161+
control 'cis-docker-benchmark-2.14' do
162+
impact 1.0
163+
title 'Enable live restore'
164+
desc 'The \'--live-restore\' enables full support of daemon-less containers in docker. It ensures that docker does not stop containers on shutdown or restore and properly reconnects to the container when restarted.'
165+
tag 'daemon'
166+
ref 'Add --live-restore flag', url: 'https://github.com/docker/docker/pull/23213'
167+
168+
describe json('/etc/docker/daemon.json') do
169+
its(['live-restore']) { should eq(true) }
170+
end
171+
end
172+
173+
control 'cis-docker-benchmark-2.15' do
174+
impact 1.0
175+
title 'Do not enable swarm mode, if not needed'
176+
desc 'Do not enable swarm mode on a docker engine instance unless needed.'
177+
tag 'daemon'
178+
ref 'docker swarm init', url: 'https://docs.docker.com/engine/reference/commandline/swarm_init/'
179+
180+
describe command('docker info') do
181+
its('stdout') { should include 'Swarm: inactive' }
182+
end
183+
end
184+
154185
control 'cis-docker-benchmark-4.5' do
155186
impact 1.0
156187
title 'Enable Content trust for Docker'

0 commit comments

Comments
 (0)