Skip to content

Commit 18a5383

Browse files
committed
feat: add control to check for legacy NIS entries in account files
'+' and '-' where prepended to lines in account files (/etc/passwd, /etc/group, /etc/shadow) to signify if fields should be overwritten or inserted from a NIS server. Since NIS is a insecure and legacy technology, that is replaced by other software, this check makes sure that no such entries exist anymore. Signed-off-by: Claudius Heine <[email protected]>
1 parent 49b94e6 commit 18a5383

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

controls/os_spec.rb

+15
Original file line numberDiff line numberDiff line change
@@ -326,3 +326,18 @@
326326
its('users') { should be_empty }
327327
end
328328
end
329+
330+
control 'os-17' do
331+
impact 1.0
332+
title 'Prevent + or - fields in passwd an related files used by NIS'
333+
desc 'NIS is insecure and should not be used'
334+
describe file('/etc/passwd') do
335+
its('content') { should_not match(/^[+-]/) }
336+
end
337+
describe file('/etc/shadow') do
338+
its('content') { should_not match(/^[+-]/) }
339+
end
340+
describe file('/etc/group') do
341+
its('content') { should_not match(/^[+-]/) }
342+
end
343+
end

0 commit comments

Comments
 (0)