Skip to content

Commit 5ce5266

Browse files
committed
update refs and add tags up to control 1.10
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent b5c9f60 commit 5ce5266

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

controls/docker_host_os_level1.rb

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
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.'
4545
tag 'host'
46-
ref 'http://www.projectatomic.io/docs/docker-storage-recommendation/'
46+
ref 'Docker storage recommendation', url: 'http://www.projectatomic.io/docs/docker-storage-recommendation/'
4747

4848
describe mount('/var/lib/docker') do
4949
it { should be_mounted }
@@ -55,8 +55,8 @@
5555
title 'Use the updated Linux Kernel'
5656
desc 'Docker in daemon mode has specific kernel requirements. A 3.10 Linux kernel is the minimum requirement for Docker.'
5757
tag 'host'
58-
ref 'https://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies'
59-
ref 'https://docs.docker.com/engine/installation/#installation-list'
58+
ref 'Check kernel dependencies', url: 'https://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies'
59+
ref 'Installation list', url: 'https://docs.docker.com/engine/installation/#installation-list'
6060

6161
kernel_version = command('uname -r | grep -o \'^\w\.\w*\.\w*\'').stdout
6262
kernel_compare = Gem::Version.new('3.10') <= Gem::Version.new(kernel_version)
@@ -71,38 +71,36 @@
7171
title 'Harden the container host'
7272
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'
7373
tag 'host'
74-
ref 'http://dev-sec.io'
75-
ref 'https://docs.docker.com/articles/security/'
76-
ref 'https://docs.docker.com/engine/security/security/'
77-
ref 'https://benchmarks.cisecurity.org/downloads/multiform/index.cfm'
78-
ref 'http://docs.docker.com/articles/security/#other-kernel-security-features'
79-
ref 'https://grsecurity.net/'
80-
ref 'https://en.wikibooks.org/wiki/Grsecurity'
81-
ref 'https://pax.grsecurity.net/'
82-
ref 'http://en.wikipedia.org/wiki/PaX'
74+
ref 'Hardening Framework dev-sec.io', url: 'http://dev-sec.io'
75+
ref 'Docker security article', url: 'https://docs.docker.com/engine/security/security/'
76+
ref 'CIS Benchmarks', url: 'https://benchmarks.cisecurity.org/downloads/multiform/index.cfm'
77+
ref 'grsecurity', url: 'https://grsecurity.net/'
78+
ref 'grsecurity Wiki', url: 'https://en.wikibooks.org/wiki/Grsecurity'
79+
ref 'Homepage of The PaX Team', url: 'https://pax.grsecurity.net/'
80+
ref 'PAX Wiki', url: 'http://en.wikipedia.org/wiki/PaX'
8381
end
8482

8583
control 'cis-docker-benchmark-1.4' do
8684
impact 1.0
8785
title 'Remove all non-essential services from the host'
8886
desc 'Ensure that the host running the docker daemon is running only the essential services.'
8987
tag 'host'
90-
ref 'https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/'
88+
ref 'Containers & Docker: How Secure Are They?', url: 'https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/'
9189
end
9290

9391
control 'cis-docker-benchmark-1.5' do
9492
impact 1.0
9593
title 'Keep Docker up to date'
9694
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.'
9795
tag 'host'
98-
ref 'https://docs.docker.com/installation/'
99-
ref 'https://github.com/docker/docker/releases/latest'
96+
ref 'Docker installation', url: 'https://docs.docker.com/installation/'
97+
ref 'Docker releases', url: 'https://github.com/docker/docker/releases/latest'
10098

10199
docker_server_version = command('docker version --format \'{{.Server.Version}}\'').stdout
102-
docker_server_compare = Gem::Version.new('1.13.1') <= Gem::Version.new(docker_server_version)
100+
docker_server_compare = Gem::Version.new('17.03') <= Gem::Version.new(docker_server_version)
103101

104102
docker_client_version = command('docker version --format \'{{.Client.Version}}\'').stdout
105-
docker_client_compare = Gem::Version.new('1.13.1') <= Gem::Version.new(docker_client_version)
103+
docker_client_compare = Gem::Version.new('17.03') <= Gem::Version.new(docker_client_version)
106104

107105
describe docker_server_compare do
108106
it { should eq true }
@@ -118,9 +116,8 @@
118116
title 'Only allow trusted users to control Docker daemon'
119117
desc 'The Docker daemon currently requires \'root\' privileges. A user added to the \'docker\' group gives him full \'root\' access rights'
120118
tag 'host'
121-
ref 'https://docs.docker.com/articles/security/#docker-daemon-attack-surface'
122-
ref 'https://www.andreas-jung.com/contents/on-docker-security-docker-group-considered-harmful'
123-
ref 'http://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel/'
119+
ref 'On Docker security: docker group considered harmful', url: 'https://www.andreas-jung.com/contents/on-docker-security-docker-group-considered-harmful'
120+
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/'
124121

125122
describe group('docker') do
126123
it { should exist }
@@ -136,12 +133,12 @@
136133
title 'Audit docker daemon'
137134
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.'
138135
tag 'host'
139-
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
136+
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
140137

141138
describe auditd_rules do
142139
its(:lines) { should include('-w /usr/bin/docker -p rwxa -k docker') }
143140
end
144-
describe service('auditd') do
141+
describe service('auditd') do
145142
it { should be_installed }
146143
it { should be_enabled }
147144
it { should be_running }
@@ -152,7 +149,8 @@
152149
impact 1.0
153150
title 'Audit Docker files and directories - /var/lib/docker'
154151
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.'
155-
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
152+
tag 'host'
153+
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
156154

157155
describe auditd_rules do
158156
its(:lines) { should include('-w /var/lib/docker/ -p rwxa -k docker') }
@@ -163,7 +161,8 @@
163161
impact 1.0
164162
title 'Audit Docker files and directories - /etc/docker'
165163
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.'
166-
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
164+
tag 'host'
165+
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
167166

168167
describe auditd_rules do
169168
its(:lines) { should include('-w /etc/docker/ -p rwxa -k docker') }
@@ -174,7 +173,8 @@
174173
impact 1.0
175174
title 'Audit Docker files and directories - docker.service'
176175
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.'
177-
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
176+
tag 'host'
177+
ref 'System auditing', url: 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
178178

179179
if docker.path
180180
rule = '-w ' + docker.path + ' -p rwxa -k docker'

0 commit comments

Comments
 (0)