Skip to content
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

motd may be configured under /etc/update-motd.d/ #127

Closed
wants to merge 29 commits into from
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4d1fd74
motd may be configured under /etc/update-motd.d/
bendres97 Jun 24, 2022
65517ac
Merge branch 'dev-sec:master' into master
bendres97 Mar 15, 2023
8aa7928
Change `File.exists?` to `File.exist?`
bendres97 Mar 15, 2023
22f41e0
motd may be configured under /etc/update-motd.d/
bendres97 Jun 24, 2022
8a9f846
Update release.yml
rndmh3ro Sep 29, 2022
306107c
update inspec.yml and changelog
Sep 29, 2022
41bc83b
Fix gid
spencer-cdw Nov 2, 2022
3140e20
Refactor UID
spencer-cdw Nov 3, 2022
87fa4b1
chown back to root
spencer-cdw Nov 3, 2022
4e2d570
revert should include gid
spencer-cdw Nov 3, 2022
0e23519
doucment why 32 bit
spencer-cdw Nov 2, 2022
b3c2ae2
update inspec.yml and changelog
Nov 2, 2022
c6fee59
Adds _chrony user to check
spencer-cdw Nov 3, 2022
2319099
lint
spencer-cdw Nov 3, 2022
6dd9510
update inspec.yml and changelog
Nov 3, 2022
c1662f9
undo failure for 42
spencer-cdw Nov 8, 2022
047c2af
update inspec.yml and changelog
Nov 14, 2022
086fa53
64bit
spencer-cdw Nov 2, 2022
e703375
Simplify uname
spencer-cdw Nov 14, 2022
202a702
update inspec.yml and changelog
Nov 15, 2022
77e1040
Expected group
spencer-cdw Nov 8, 2022
bb439bb
Pull check
spencer-cdw Nov 14, 2022
f08efae
update inspec.yml and changelog
Dec 5, 2022
7a10ef1
update inspec.yml and changelog
Nov 15, 2022
d8c2c36
Change `File.exists?` to `File.exist?`
bendres97 Mar 15, 2023
f2617da
use centralised issue templates and workflows
schurzi Dec 5, 2022
68ea943
Merge branch 'master' of https://github.com/bendres97/cis-dil-benchmark
bendres97 Mar 15, 2023
80a320c
motd may be configured under /etc/update-motd.d/
bendres97 Mar 15, 2023
da7e77a
Merge branch 'master' of https://github.com/bendres97/cis-dil-benchmark
bendres97 Mar 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions controls/1_7_warning_banners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,28 @@
end

control 'cis-dil-benchmark-1.7.1.4' do
title 'Ensure permissions on /etc/motd are configured'
desc "The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.\n\nRationale: If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information."
title 'Ensure permissions on /etc/motd and /etc/update-motd.d/* are configured'
desc "The contents of the /etc/motd and /etc/update-motd.d/* files are displayed to users after login and function as a message of the day for authenticated users.\n\nRationale: If the files do not have the correct ownership, they could be modified by unauthorized users with incorrect or misleading information."
impact 0.0

tag cis: 'distribution-independent-linux:1.7.1.4'
tag level: 1

describe file('/etc/motd') do
its('group') { should eq 'root' }
its('owner') { should eq 'root' }
its('mode') { should cmp '0644' }
motd_file = '/etc/motd'

if File.exist?(motd_file)
describe file(motd_file) do
its('group') { should eq 'root' }
its('owner') { should eq 'root' }
its('mode') { should cmp '0644' }
end
end
command('find /etc/update-motd.d/ -type f').stdout.split.each do |f|
describe file(f) do
its('group') { should eq 'root' }
its('owner') { should eq 'root' }
its('mode') { should cmp '0755' }
end
end
end

Expand Down