simp-beaker-helpers 1.24.1 → 1.24.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fixtures.yml +0 -3
- data/.github/workflows/pr_acceptance.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/lib/simp/beaker_helpers/inspec.rb +1 -3
- data/lib/simp/beaker_helpers/ssg.rb +3 -4
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +4 -2
- metadata +2 -5
- data/spec/fixtures/inspec_profiles/CentOS-8-disa_stig +0 -1
- data/spec/fixtures/inspec_profiles/RedHat-8-disa_stig/controls/00_Control_Selector.rb +0 -45
- data/spec/fixtures/inspec_profiles/RedHat-8-disa_stig/inspec.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3ebfb21a6409e25775b605532f96982fe2bfc200dced0a88683427bf1c3818e
|
4
|
+
data.tar.gz: 94ecd0803ebda28858480211e6fc0d0ab0402c96dbf3101fa4f6a7f17070c11e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72fb511dc7fb090c5ae5f80170975af6c0e33ebf01744b090a1cae8579e052d8baa354b9d42e9b9a9b50fda12afc54e8e519e1278bc565633b8777be79827c18
|
7
|
+
data.tar.gz: 4629b633ec4a047d1549fa9f7ab2dbc457a72e1770cfbff8aaf9eba9a5648905a9be87b32a5191797caab501e25e47ba6cb975e70a1ebc9ca9b0bd16f34201de
|
data/.fixtures.yml
CHANGED
@@ -7,6 +7,3 @@ fixtures:
|
|
7
7
|
disa_stig-el7-baseline:
|
8
8
|
repo: https://github.com/mitre/redhat-enterprise-linux-7-stig-baseline
|
9
9
|
target: spec/fixtures/inspec_deps/inspec_profiles/profiles
|
10
|
-
disa_stig-el8-baseline:
|
11
|
-
repo: https://github.com/mitre/redhat-enterprise-linux-8-stig-baseline
|
12
|
-
target: spec/fixtures/inspec_deps/inspec_profiles/profiles
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### 1.24.2 / 2022-03-09
|
2
|
+
* Fixed:
|
3
|
+
* Prevent `spec/` directory symlink recursion in `copy_fixture_modules_to`
|
4
|
+
* Update the derivatives workaround to insert an inert line instead of
|
5
|
+
commenting out the previous line to allow for logic updates
|
6
|
+
* Addressed a bug where passing an empty exceptions array would produce an
|
7
|
+
invalid xpath query
|
8
|
+
* Ensure that the new SIMP community RPMs are used
|
9
|
+
|
1
10
|
### 1.24.1 / 2021-10-27
|
2
11
|
* Fixed:
|
3
12
|
* Worked around a bug in 'puppet lookup' - PUP-11402
|
@@ -34,9 +34,7 @@ module Simp::BeakerHelpers
|
|
34
34
|
# The name of the profile against which to run
|
35
35
|
#
|
36
36
|
def initialize(sut, profile)
|
37
|
-
|
38
|
-
# @inspec_version = ENV['BEAKER_inspec_version'] || 'latest'
|
39
|
-
@inspec_version = ENV['BEAKER_inspec_version'] || '4.39.0'
|
37
|
+
@inspec_version = ENV['BEAKER_inspec_version'] || 'latest'
|
40
38
|
|
41
39
|
@sut = sut
|
42
40
|
|
@@ -278,9 +278,8 @@ module Simp::BeakerHelpers
|
|
278
278
|
|
279
279
|
xpath_query << ')' if filter.size > 1
|
280
280
|
|
281
|
-
|
282
|
-
|
283
|
-
|
281
|
+
exclusions = Array(exclusions)
|
282
|
+
unless exclusions.empty?
|
284
283
|
xpath_query << 'and not('
|
285
284
|
|
286
285
|
xpath_query << exclusions.map do |exl|
|
@@ -419,7 +418,7 @@ module Simp::BeakerHelpers
|
|
419
418
|
#
|
420
419
|
# This isn't 100% correct but it's "good enough" for an automated CI
|
421
420
|
# environment to tell us if something is critically out of alignment.
|
422
|
-
on(@sut, %(cd scap-content/build-scripts; sed -ci 's/ssg.build_derivatives.profile_handling
|
421
|
+
on(@sut, %(cd scap-content/build-scripts; sed -ci 's/ssg.build_derivatives.profile_handling/__simp_dontcare__ = None #ssg.build_derivatives.profile_handling/g' enable_derivatives.py))
|
423
422
|
|
424
423
|
on(@sut, %(cd scap-content/build; cmake ../; make -j4 #{OS_INFO[@os][@os_rel]['ssg']['build_target']}-content && cp *ds.xml #{@scap_working_dir}))
|
425
424
|
end
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -411,7 +411,7 @@ module Simp::BeakerHelpers
|
|
411
411
|
begin
|
412
412
|
tarfile = "#{Simp::BeakerHelpers.tmpname}.tar"
|
413
413
|
|
414
|
-
excludes = PUPPET_MODULE_INSTALL_IGNORE.map do |x|
|
414
|
+
excludes = (PUPPET_MODULE_INSTALL_IGNORE + ['spec']).map do |x|
|
415
415
|
x = "--exclude '*/#{x}'"
|
416
416
|
end.join(' ')
|
417
417
|
|
@@ -1498,10 +1498,12 @@ module Simp::BeakerHelpers
|
|
1498
1498
|
block_on(suts, :run_in_parallel => parallel) do |sut|
|
1499
1499
|
install_package_unless_present_on(sut, 'yum-utils')
|
1500
1500
|
|
1501
|
+
release = fact_on(sut, 'os.release.major')
|
1502
|
+
|
1501
1503
|
install_package_unless_present_on(
|
1502
1504
|
sut,
|
1503
1505
|
'simp-release-community',
|
1504
|
-
"https://download.simp-project.com/simp-release-community.rpm"
|
1506
|
+
"https://download.simp-project.com/simp-release-community.el#{release}.rpm"
|
1505
1507
|
)
|
1506
1508
|
|
1507
1509
|
to_disable = disable.dup
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.24.
|
4
|
+
version: 1.24.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -254,11 +254,8 @@ files:
|
|
254
254
|
- spec/acceptance/suites/windows/nodesets/win2016.yml
|
255
255
|
- spec/acceptance/suites/windows/nodesets/win2019.yml
|
256
256
|
- spec/fixtures/inspec_profiles/CentOS-7-disa_stig
|
257
|
-
- spec/fixtures/inspec_profiles/CentOS-8-disa_stig
|
258
257
|
- spec/fixtures/inspec_profiles/RedHat-7-disa_stig/controls/00_Control_Selector.rb
|
259
258
|
- spec/fixtures/inspec_profiles/RedHat-7-disa_stig/inspec.yml
|
260
|
-
- spec/fixtures/inspec_profiles/RedHat-8-disa_stig/controls/00_Control_Selector.rb
|
261
|
-
- spec/fixtures/inspec_profiles/RedHat-8-disa_stig/inspec.yml
|
262
259
|
- spec/lib/simp/beaker_helpers_spec.rb
|
263
260
|
- spec/spec_helper.rb
|
264
261
|
- spec/spec_helper_acceptance.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
spec/fixtures/inspec_profiles/RedHat-8-disa_stig
|
@@ -1,45 +0,0 @@
|
|
1
|
-
skips = {
|
2
|
-
'V-72209' => 'Cannot guarantee a remote syslog server during test'
|
3
|
-
}
|
4
|
-
overrides = [ 'V-72091' ]
|
5
|
-
subsystems = []
|
6
|
-
|
7
|
-
require_controls 'disa_stig-el8-baseline' do
|
8
|
-
skips.each_pair do |ctrl, reason|
|
9
|
-
control ctrl do
|
10
|
-
describe "Skip #{ctrl}" do
|
11
|
-
skip "Reason: #{skips[ctrl]}" do
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
@conf['profile'].info[:controls].each do |ctrl|
|
18
|
-
next if (overrides + skips.keys).include?(ctrl[:id])
|
19
|
-
|
20
|
-
if subsystems.empty?
|
21
|
-
control ctrl[:id]
|
22
|
-
else
|
23
|
-
tags = ctrl[:tags]
|
24
|
-
if tags && tags[:subsystems]
|
25
|
-
subsystems.each do |subsystem|
|
26
|
-
if tags[:subsystems].include?(subsystem)
|
27
|
-
control ctrl[:id]
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
## Overrides ##
|
35
|
-
|
36
|
-
# There's no email server to send anything to by default so syslog is a safer
|
37
|
-
# default for processing.
|
38
|
-
control 'V-72091' do
|
39
|
-
overrides << self.to_s
|
40
|
-
|
41
|
-
describe auditd_conf do
|
42
|
-
its('space_left_action.downcase') { should cmp 'syslog' }
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
name: EL8 STIG
|
2
|
-
title: STIG for EL 8
|
3
|
-
supports:
|
4
|
-
- os-family: redhat
|
5
|
-
maintainer: SIMP Team
|
6
|
-
copyright: Onyx Point, Inc.
|
7
|
-
copyright_email: simp@onyxpoint.com
|
8
|
-
license: Apache-2.0
|
9
|
-
summary: |
|
10
|
-
A collection of InSpec tests
|
11
|
-
version: 0.0.1
|
12
|
-
depends:
|
13
|
-
- name: disa_stig-el8-baseline
|
14
|
-
path: ../../inspec_deps/inspec_profiles/profiles/disa_stig-el8-baseline
|