cis-dil-benchmark icon indicating copy to clipboard operation
cis-dil-benchmark copied to clipboard

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

Open bendres97 opened this issue 2 years ago • 4 comments

Signed-off-by: bendres97[email protected]

Fixes #125

Added a check to only run tests on /etc/motd if it exists.

Added additional logic to validate any motd files under /etc/update-motd.d/

bendres97 avatar Jun 24 '22 00:06 bendres97

~I'm not familiar with /etc/update-motd.d/, so apologies if this is a noob question, but why would the files under /etc/update-motd.d/ have 0755 permissions, when /etc/motd is expected to have 0644 permissions?~

Disregard. I should have googled before posting this comment. I see that the scripts are executed when a user logs in to update the motd, so 0755 makes sense.

Spencer-Doak avatar Jun 29 '22 16:06 Spencer-Doak

The files under the directory are excutable scripts so they need the executable bitSent from my Galaxy -------- Original message --------From: Spencer @.> Date: 6/29/22 11:07 (GMT-06:00) To: dev-sec/cis-dil-benchmark @.> Cc: Bryan Endres @.>, Author @.> Subject: Re: [dev-sec/cis-dil-benchmark] motd may be configured under /etc/update-motd.d/ (PR #127) I'm not familiar with /etc/update-motd.d/, so apologies if this is a noob question, but why would the files under /etc/update-motd.d/ have 0755 permissions, when /etc/motd is expected to have 0644 permissions?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

bendres97 avatar Jun 29 '22 17:06 bendres97

Poking my head in to see if it's possible to get this merged. I see it's failing lint tests on:

controls/1_7_warning_banners.rb:71:11: W: [Correctable] Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?.
  if File.exists?(motd_file)

dtseiler avatar Sep 15 '22 14:09 dtseiler

Good catch, I will see about updating this when I get some cycles. Sent from my Galaxy -------- Original message --------From: Don Seiler @.> Date: 9/15/22 09:49 (GMT-06:00) To: dev-sec/cis-dil-benchmark @.> Cc: Bryan Endres @.>, Author @.> Subject: Re: [dev-sec/cis-dil-benchmark] motd may be configured under /etc/update-motd.d/ (PR #127) Poking my head in to see if it's possible to get this merged. I see it's failing lint tests on: controls/1_7_warning_banners.rb:71:11: W: [Correctable] Lint/DeprecatedClassMethods: File.exists? is deprecated in favor of File.exist?. if File.exists?(motd_file)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

bendres97 avatar Sep 15 '22 19:09 bendres97

I horked this up pretty bad... I'll open a new PR

bendres97 avatar Mar 15 '23 02:03 bendres97