Skip to content

Commit 29211f2

Browse files
committed
feat: add rule to check users and groups are unique
Signed-off-by: Claudius Heine <[email protected]>
1 parent 18a5383 commit 29211f2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

controls/os_spec.rb

+14
Original file line numberDiff line numberDiff line change
@@ -341,3 +341,17 @@
341341
its('content') { should_not match(/^[+-]/) }
342342
end
343343
end
344+
345+
control 'os-18' do
346+
impact 1.0
347+
title 'Users and groups should be unique'
348+
desc 'In order to avoid confusion or identity theft, every group and user should be unique'
349+
describe passwd do
350+
its('users') { should_not contain_duplicates }
351+
its('uids') { should_not contain_duplicates }
352+
end
353+
describe etc_group do
354+
its('groups') { should_not contain_duplicates }
355+
its('gids') { should_not contain_duplicates }
356+
end
357+
end

0 commit comments

Comments
 (0)