abide-data-processor 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/abide-data-processor/processor.rb +5 -5
- data/lib/abide-data-processor/version.rb +1 -1
- data/lib/abide-data-processor.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04940d641ff075df44bad1d44db0c5cfb4498c0aacd69c79baf5af9234d5533
|
4
|
+
data.tar.gz: 4ccc87ba94466281cb4ed8656b3734f07063ada8c113abc2c50e6c9b61d5bed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc5c8a4f39c318f635b84e2413435b0e5e39ce2dfa6c9acee8e1d912b7f4936dbfb131281f571c1de44b7a41d37b6f3650e45eb0ebdd3e6eec75245bad1aac0
|
7
|
+
data.tar.gz: dc18ff5f2a6c0bb41d5213969643d71261df6b36d9e31af10bd4e1d40bd532633b8bc988e33142af693983cdc1f0deda7f363096fb9e2e5b154f1f2bcaca20d8
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require 'deep_merge'
|
4
4
|
require 'set'
|
5
|
-
require 'pry'
|
6
5
|
|
7
6
|
module AbideDataProcessor
|
8
7
|
module Processor
|
@@ -38,7 +37,8 @@ module AbideDataProcessor
|
|
38
37
|
# @param control_configs: the custom control configurations pulled from cis.pp
|
39
38
|
# Return a hash to be convert to Puppet code.
|
40
39
|
def create_resources(resources_hash, only, ignore, control_configs)
|
41
|
-
|
40
|
+
unfreezed_resources = Marshal.load(Marshal.dump(resources_hash))
|
41
|
+
resources = real_resources(unfreezed_resources, only.to_set, ignore.to_set, control_configs)
|
42
42
|
ordered_resources = order_resources(resources)
|
43
43
|
|
44
44
|
mutate_ordering_params!(ordered_resources[1])
|
@@ -100,7 +100,7 @@ module AbideDataProcessor
|
|
100
100
|
# Below is just a sure fire way to make sure that we will never use the resource
|
101
101
|
only.delete(name) # Remove from the only list
|
102
102
|
ignore.add(name) # Add the name of the current control to the ignore list if we're not gonna enforce it
|
103
|
-
@logger.
|
103
|
+
@logger.debug("Control #{name} will not be enforced because the controls that it depends on is invalid.")
|
104
104
|
next
|
105
105
|
end
|
106
106
|
end
|
@@ -182,12 +182,12 @@ module AbideDataProcessor
|
|
182
182
|
# else return true
|
183
183
|
def only_and_ignore_check(name, name_map, only, ignore)
|
184
184
|
if !only.empty? && !filter_function(name, name_map, only)
|
185
|
-
@logger.
|
185
|
+
@logger.debug("Control #{name} will be skipped because it is not in the only list.")
|
186
186
|
return false
|
187
187
|
end
|
188
188
|
|
189
189
|
if !ignore.empty? && filter_function(name, name_map, ignore)
|
190
|
-
@logger.
|
190
|
+
@logger.debug("Control #{name} will be skipped because it is in the ignore list.")
|
191
191
|
return false
|
192
192
|
end
|
193
193
|
true
|
data/lib/abide-data-processor.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abide-data-processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abide-team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet
|