-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update profile to match CIS v1.1.0 #54
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @itoperatorguy
@@ -0,0 +1,3 @@ | |||
--- | |||
lockfile_version: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not include lock files
@@ -237,6 +237,8 @@ | |||
end | |||
end | |||
|
|||
# There is a mistake in the official CIS DIL documentaion 1.1.10-1.1.14 are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove them? I think there is no value in adding CIS misstakes in this profile. We could point this out in the README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, these can be left out. It's acknowledged as a bug by the CIS maintainers, however unresolved for about 8 months now.
@itoperatorguy Are you continuing on this PR? We're looking forward to the updated CiS checks |
Processed the feedback given on original PR dev-sec#54
Processed the feedback given on original PR dev-sec#54 Signed-off-by: Frank van Boven <[email protected]>
Processed the feedback given on original PR dev-sec#54 Signed-off-by: Frank van Boven <[email protected]>
Processed the feedback given on original PR dev-sec#54 Signed-off-by: Frank van Boven <[email protected]>
Processed the feedback given on original PR dev-sec#54 Signed-off-by: Frank van Boven <[email protected]>
Processed the feedback given on original PR dev-sec#54 Solved rebase issues Signed-off-by: Frank van Boven <[email protected]>
Processed the feedback given on original PR dev-sec#54 Solved rebase issues Signed-off-by: Frank van Boven <[email protected]>
tag level: 1 | ||
|
||
command("cat /etc/shadow | cut -d: -f1").stdout.split.each do |username| | ||
describe command('date -d "`export LANG="en_US.UTF-8" ; chage --list root | grep "Last password" | cut -d: -f2`" +%s') do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of chage --list root
it should use username
also why u export us
settings here?
tag cis: 'distribution-independent-linux:5.4.5' | ||
tag level: 2 | ||
|
||
command("sudo find /etc/ -maxdepth 1 -name *bashrc*").stdout.split.each do |bashrc_file| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo
should not be used in command invocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%w(bash.bashrc profile bashrc).each do |f|
next unless file("/etc/#{f}").file?
describe file("/etc/#{f}") do
its(:content) { should match /^TMOUT=([1-6]\d{2})|(\d{2})|{\d{1}}(\s*#.*)*$/ }
end
end
I modified the controls where I could, so now the profile matches to the CIS v.1.1.0