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

Fix OS Release Comparing: 8.10 #39

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ end

begin
RuboCop::RakeTask.new(:lint) do |task|
task.options += %w[--display-cop-names --no-color --parallel]
task.options += %w(--display-cop-names --no-color --parallel)
end
rescue LoadError
puts 'rubocop is not available. Install the rubocop gem to run the lint tests.'
Expand Down
20 changes: 10 additions & 10 deletions controls/SV-230221.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
release = os.release

EOMS_DATE = {
/^8\.1/ => '30 November 2021',
/^8\.2/ => '30 April 2022',
/^8\.3/ => '30 April 2021',
/^8\.4/ => '31 May 2023',
/^8\.5/ => '31 May 2022',
/^8\.6/ => '31 May 2024',
/^8\.7/ => '31 May 2023',
/^8\.8/ => '31 May 2025',
/^8\.9/ => '31 May 2024',
/^8\.10/ => '31 May 2029'
/^8\.1$/ => '30 November 2021',
/^8\.2$/ => '30 April 2022',
/^8\.3$/ => '30 April 2021',
/^8\.4$/ => '31 May 2023',
/^8\.5$/ => '31 May 2022',
/^8\.6$/ => '31 May 2024',
/^8\.7$/ => '31 May 2023',
/^8\.8$/ => '31 May 2025',
/^8\.9$/ => '31 May 2024',
/^8\.10$/ => '31 May 2029'
}.find { |k, _v| k.match(release) }&.last

describe "The release \"#{release}\" is still be within the support window" do
Expand Down
2 changes: 1 addition & 1 deletion controls/SV-230332.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
!input('central_account_management')
}

if os.release.to_f >= 8.2
if Gem::Version.new(os.release) < Gem::Version.new('8.2')
impact 0.0
describe 'This requirement only applies to RHEL 8 version(s) 8.0 and 8.1' do
skip "Currently on release #{os.release}, this control is Not Applicable."
Expand Down
6 changes: 3 additions & 3 deletions controls/SV-230338.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
tag 'host'
tag 'container'

only_if('This check applies to RHEL versions 8.0 and 8.1, if the system is RHEL version 8.2 or newer, this check is not applicable.', impact: 0.0) {
(os.release.to_f) < 8.2
}
only_if('This check applies to RHEL versions 8.0 and 8.1. If the system is RHEL version 8.2 or newer, this check is Not Applicable.', impact: 0.0) do
Gem::Version.new(os.release) < Gem::Version.new('8.2')
end

pam_auth_files = input('pam_auth_files')

Expand Down
6 changes: 3 additions & 3 deletions controls/SV-230342.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
tag cci: ['CCI-000044']
tag nist: ['AC-7 a']

only_if('If the system is RHEL version 8.2 or newer, this check is not applicable.', impact: 0.0) {
(os.release.to_f) < 8.2
}
only_if('This check applies to RHEL versions 8.0 and 8.1. If the system is RHEL version 8.2 or newer, this check is Not Applicable.', impact: 0.0) do
jrmetzger marked this conversation as resolved.
Show resolved Hide resolved
Gem::Version.new(os.release) < Gem::Version.new('8.2')
jrmetzger marked this conversation as resolved.
Show resolved Hide resolved
end

pam_auth_files = input('pam_auth_files')

Expand Down
6 changes: 3 additions & 3 deletions controls/SV-230344.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
tag 'host'
tag 'container'

only_if('If the system is RHEL version 8.2 or newer, this check is not applicable.', impact: 0.0) {
(os.release.to_f) < 8.2
}
only_if('This check applies to RHEL versions 8.0 and 8.1. If the system is RHEL version 8.2 or newer, this check is Not Applicable.', impact: 0.0) do
Gem::Version.new(os.release) < Gem::Version.new('8.2')
end

pam_auth_files = input('pam_auth_files')

Expand Down
4 changes: 2 additions & 2 deletions controls/SV-230475.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
!virtualization.system.eql?('docker')
}

audit_tools = %w[/usr/sbin/auditctl
audit_tools = %w(/usr/sbin/auditctl
/usr/sbin/auditd
/usr/sbin/ausearch
/usr/sbin/aureport
/usr/sbin/autrace
/usr/sbin/rsyslogd
/usr/sbin/augenrules]
/usr/sbin/augenrules)

if package('aide').installed?
audit_tools.each do |tool|
Expand Down
6 changes: 3 additions & 3 deletions controls/SV-250316.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ module with the following command:
tag 'host'
tag 'container'

only_if('This check applies to RHEL versions 8.0 and 8.1. If the system is RHEL version 8.2 or newer, this check is Not Applicable.', impact: 0.0) {
os.release.to_f < 8.2
}
only_if('This check applies to RHEL versions 8.0 and 8.1. If the system is RHEL version 8.2 or newer, this check is Not Applicable.', impact: 0.0) do
Gem::Version.new(os.release) < Gem::Version.new('8.2')
end

describe selinux do
it { should be_installed }
Expand Down
4 changes: 2 additions & 2 deletions inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ maintainer: MITRE SAF Team
copyright: MITRE
license: Apache-2.0
summary: "This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DoD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil."
version: 1.14.1
version: 1.14.2
jrmetzger marked this conversation as resolved.
Show resolved Hide resolved

inspec_version: ">= 5.0"

Expand Down Expand Up @@ -1047,4 +1047,4 @@ inputs:
type: String
value: 'local'



Loading