Skip to content

Commit e72b2d2

Browse files
committed
fix lint errors
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com> fix lint errors Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com> fixing lint errors Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent df1e77f commit e72b2d2

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

controls/docker_host_os_level1.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding: utf-8
2+
# frozen_string_literal: true
23
#
34
# Copyright 2016, Patrick Muench
45
#
@@ -150,14 +151,14 @@
150151
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.'
151152
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
152153

153-
unless docker.path.nil?
154+
if docker.path
154155
rule = '-w ' << docker.path << ' -p rwxa -k docker'
155156
describe auditd_rules do
156157
its(:lines) { should include(rule) }
157158
end
158159
else
159160
describe 'audit docker service' do
160-
skip "Cannot determine docker path"
161+
skip 'Cannot determine docker path'
161162
end
162163
end
163164
end
@@ -168,14 +169,14 @@
168169
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.'
169170
ref 'https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html'
170171

171-
unless docker.path.nil?
172+
if docker.path
172173
rule = '-w ' << docker.socket << ' -p rwxa -k docker'
173174
describe auditd_rules do
174175
its(:lines) { should include(rule) }
175176
end
176177
else
177178
describe 'audit docker service' do
178-
skip "Cannot determine docker socket"
179+
skip 'Cannot determine docker socket'
179180
end
180181
end
181182
end

controls/docker_level1.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding: utf-8
2+
# frozen_string_literal: true
23
#
34
# Copyright 2016, Patrick Muench
45
#

controls/docker_level2.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding: utf-8
2+
# frozen_string_literal: true
23
#
34
# Copyright 2016, Patrick Muench
45
#

0 commit comments

Comments
 (0)