abide_dev_utils 0.17.1 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yaml +52 -0
  3. data/Gemfile.lock +14 -6
  4. data/Rakefile +22 -20
  5. data/abide_dev_utils.gemspec +2 -3
  6. data/lib/abide_dev_utils/cli/abstract.rb +18 -1
  7. data/lib/abide_dev_utils/cli/comply.rb +5 -2
  8. data/lib/abide_dev_utils/cli/jira.rb +7 -1
  9. data/lib/abide_dev_utils/cli/{cem.rb → sce.rb} +38 -35
  10. data/lib/abide_dev_utils/cli/test.rb +20 -9
  11. data/lib/abide_dev_utils/cli/xccdf.rb +9 -5
  12. data/lib/abide_dev_utils/cli.rb +5 -4
  13. data/lib/abide_dev_utils/comply.rb +7 -9
  14. data/lib/abide_dev_utils/errors.rb +1 -1
  15. data/lib/abide_dev_utils/jira.rb +36 -9
  16. data/lib/abide_dev_utils/output.rb +4 -0
  17. data/lib/abide_dev_utils/prompt.rb +13 -8
  18. data/lib/abide_dev_utils/{cem → sce}/benchmark.rb +43 -43
  19. data/lib/abide_dev_utils/{cem → sce}/generate/coverage_report.rb +15 -12
  20. data/lib/abide_dev_utils/{cem → sce}/generate/reference.rb +16 -14
  21. data/lib/abide_dev_utils/sce/generate.rb +11 -0
  22. data/lib/abide_dev_utils/{cem → sce}/hiera_data/mapping_data/map_data.rb +1 -1
  23. data/lib/abide_dev_utils/{cem → sce}/hiera_data/mapping_data/mixins.rb +1 -1
  24. data/lib/abide_dev_utils/{cem → sce}/hiera_data/mapping_data.rb +12 -9
  25. data/lib/abide_dev_utils/{cem → sce}/hiera_data/resource_data/control.rb +7 -7
  26. data/lib/abide_dev_utils/{cem → sce}/hiera_data/resource_data/parameters.rb +3 -3
  27. data/lib/abide_dev_utils/{cem → sce}/hiera_data/resource_data/resource.rb +11 -11
  28. data/lib/abide_dev_utils/{cem → sce}/hiera_data/resource_data.rb +11 -10
  29. data/lib/abide_dev_utils/{cem → sce}/hiera_data.rb +1 -1
  30. data/lib/abide_dev_utils/{cem → sce}/mapping/mapper.rb +12 -9
  31. data/lib/abide_dev_utils/{cem → sce}/validate/resource_data.rb +3 -3
  32. data/lib/abide_dev_utils/{cem → sce}/validate/strings/base_validator.rb +1 -1
  33. data/lib/abide_dev_utils/{cem → sce}/validate/strings/puppet_class_validator.rb +4 -3
  34. data/lib/abide_dev_utils/{cem → sce}/validate/strings/puppet_defined_type_validator.rb +1 -1
  35. data/lib/abide_dev_utils/{cem → sce}/validate/strings/validation_finding.rb +1 -1
  36. data/lib/abide_dev_utils/{cem → sce}/validate/strings.rb +2 -2
  37. data/lib/abide_dev_utils/{cem → sce}/validate.rb +2 -2
  38. data/lib/abide_dev_utils/{cem.rb → sce.rb} +6 -6
  39. data/lib/abide_dev_utils/version.rb +1 -1
  40. data/lib/abide_dev_utils/xccdf.rb +10 -10
  41. data/lib/abide_dev_utils.rb +7 -6
  42. metadata +42 -26
  43. data/lib/abide_dev_utils/cem/generate.rb +0 -11
  44. /data/lib/abide_dev_utils/errors/{cem.rb → sce.rb} +0 -0
@@ -2,11 +2,11 @@
2
2
 
3
3
  require 'abide_dev_utils/dot_number_comparable'
4
4
  require 'abide_dev_utils/errors'
5
- require 'abide_dev_utils/cem/hiera_data/mapping_data'
6
- require 'abide_dev_utils/cem/hiera_data/resource_data/parameters'
5
+ require 'abide_dev_utils/sce/hiera_data/mapping_data'
6
+ require 'abide_dev_utils/sce/hiera_data/resource_data/parameters'
7
7
 
8
8
  module AbideDevUtils
9
- module CEM
9
+ module Sce
10
10
  module HieraData
11
11
  module ResourceData
12
12
  # Represents a singular rule in a benchmark
@@ -58,7 +58,7 @@ module AbideDevUtils
58
58
 
59
59
  def method_missing(meth, *args, &block)
60
60
  meth_s = meth.to_s
61
- if AbideDevUtils::CEM::HieraData::MappingData::ALL_TYPES.include?(meth_s)
61
+ if AbideDevUtils::Sce::HieraData::MappingData::ALL_TYPES.include?(meth_s)
62
62
  @mapper.get(id).find { |x| @mapper.map_type(x) == meth_s }
63
63
  else
64
64
  super
@@ -66,7 +66,7 @@ module AbideDevUtils
66
66
  end
67
67
 
68
68
  def respond_to_missing?(meth, include_private = false)
69
- AbideDevUtils::CEM::HieraData::MappingData::ALL_TYPES.include?(meth.to_s) || super
69
+ AbideDevUtils::Sce::HieraData::MappingData::ALL_TYPES.include?(meth.to_s) || super
70
70
  end
71
71
 
72
72
  def to_h
@@ -76,7 +76,7 @@ module AbideDevUtils
76
76
  alternate_ids: alternate_ids,
77
77
  levels: levels,
78
78
  profiles: profiles,
79
- resource: resource,
79
+ resource: resource
80
80
  }.merge(parameters.to_h)
81
81
  end
82
82
 
@@ -94,7 +94,7 @@ module AbideDevUtils
94
94
 
95
95
  def validate_id_with_framework(id, framework, mapper)
96
96
  mtype = mapper.map_type(id)
97
- return if AbideDevUtils::CEM::HieraData::MappingData::FRAMEWORK_TYPES[framework].include?(mtype)
97
+ return if AbideDevUtils::Sce::HieraData::MappingData::FRAMEWORK_TYPES[framework].include?(mtype)
98
98
 
99
99
  raise AbideDevUtils::Errors::ControlIdFrameworkMismatchError, [id, mtype, framework]
100
100
  end
@@ -3,7 +3,7 @@
3
3
  require 'set'
4
4
 
5
5
  module AbideDevUtils
6
- module CEM
6
+ module Sce
7
7
  module HieraData
8
8
  module ResourceData
9
9
  class Parameters
@@ -40,7 +40,7 @@ module AbideDevUtils
40
40
  collection.each_with_object({}) do |(param, param_val), hsh|
41
41
  hsh[param] = {
42
42
  raw_value: param_val,
43
- display_value: param_display(param, param_val),
43
+ display_value: param_display(param, param_val)
44
44
  }
45
45
  end
46
46
  end
@@ -49,7 +49,7 @@ module AbideDevUtils
49
49
  {
50
50
  name: param,
51
51
  type: ruby_class_to_puppet_type(param_val.class.to_s),
52
- default: param_val,
52
+ default: param_val
53
53
  }
54
54
  end
55
55
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  require 'set'
4
4
  require 'abide_dev_utils/errors'
5
- require 'abide_dev_utils/cem/hiera_data/resource_data/control'
6
- require 'abide_dev_utils/cem/hiera_data/resource_data/parameters'
5
+ require 'abide_dev_utils/sce/hiera_data/resource_data/control'
6
+ require 'abide_dev_utils/sce/hiera_data/resource_data/parameters'
7
7
 
8
8
  module AbideDevUtils
9
- module CEM
9
+ module Sce
10
10
  module HieraData
11
11
  module ResourceData
12
12
  # Represents a resource data resource statement
@@ -25,21 +25,21 @@ module AbideDevUtils
25
25
  @controls ||= load_controls
26
26
  end
27
27
 
28
- def cem_options
29
- @cem_options ||= Parameters.new(data['cem_options'])
28
+ def sce_options
29
+ @sce_options ||= Parameters.new(data['sce_options'])
30
30
  end
31
31
 
32
- def cem_protected
33
- @cem_protected ||= Parameters.new(data['cem_protected'])
32
+ def sce_protected
33
+ @sce_protected ||= Parameters.new(data['sce_protected'])
34
34
  end
35
35
 
36
36
  def to_stubbed_h
37
37
  {
38
38
  title: title,
39
39
  type: type,
40
- cem_options: cem_options.to_h,
41
- cem_protected: cem_protected.to_h,
42
- reference: to_reference,
40
+ sce_options: sce_options.to_h,
41
+ sce_protected: sce_protected.to_h,
42
+ reference: to_reference
43
43
  }
44
44
  end
45
45
 
@@ -51,7 +51,7 @@ module AbideDevUtils
51
51
  parray = controls.map { |x| x.parameters.to_puppet_code if x.parameters.exist? }.flatten.compact.uniq
52
52
  return "#{type} { '#{title}': }" if parray.empty? || parray.all?(&:empty?) || parray.all?("\n")
53
53
 
54
- # if title == 'cem_linux::utils::packages::linux::auditd::time_change'
54
+ # if title == 'sce_linux::utils::packages::linux::auditd::time_change'
55
55
  # require 'pry'
56
56
  # binding.pry
57
57
  # end
@@ -2,17 +2,17 @@
2
2
 
3
3
  require 'abide_dev_utils/errors'
4
4
  require 'abide_dev_utils/ppt/facter_utils'
5
- require 'abide_dev_utils/cem/hiera_data/resource_data/control'
6
- require 'abide_dev_utils/cem/hiera_data/resource_data/resource'
5
+ require 'abide_dev_utils/sce/hiera_data/resource_data/control'
6
+ require 'abide_dev_utils/sce/hiera_data/resource_data/resource'
7
7
 
8
8
  module AbideDevUtils
9
- module CEM
9
+ module Sce
10
10
  module HieraData
11
11
  module ResourceData
12
12
  # Creates Benchmark objects from a Puppet module
13
13
  # @param pupmod [AbideDevUtils::Ppt::PuppetModule] A PuppetModule instance
14
14
  # @param skip_errors [Boolean] True skips errors and loads non-erroring benchmarks, false raises the error.
15
- # @return [Array<AbideDevUtils::CEM::Benchmark>] Array of Benchmark instances
15
+ # @return [Array<AbideDevUtils::Sce::Benchmark>] Array of Benchmark instances
16
16
  def self.benchmarks_from_puppet_module(pupmod, ignore_all_errors: false, ignore_framework_mismatch: true)
17
17
  frameworks = pupmod.hiera_conf.local_hiera_files(hierarchy_name: 'Mapping Data').each_with_object([]) do |hf, ary|
18
18
  parts = hf.path.split(pupmod.hiera_conf.default_datadir)[-1].split('/')
@@ -81,7 +81,8 @@ module AbideDevUtils
81
81
  end
82
82
 
83
83
  def mapper
84
- @mapper ||= AbideDevUtils::CEM::HieraData::MappingData::Mapper.new(module_name, framework, load_mapping_data)
84
+ @mapper ||= AbideDevUtils::Sce::HieraData::MappingData::Mapper.new(module_name, framework,
85
+ load_mapping_data)
85
86
  end
86
87
 
87
88
  def map_data
@@ -260,18 +261,18 @@ module AbideDevUtils
260
261
  def load_mapping_data
261
262
  files = case module_name
262
263
  when /_windows$/
263
- cem_windows_mapping_files
264
+ sce_windows_mapping_files
264
265
  when /_linux$/
265
- cem_linux_mapping_files
266
+ sce_linux_mapping_files
266
267
  else
267
- raise "Module name '#{module_name}' is not a CEM module"
268
+ raise "Module name '#{module_name}' is not a SCE module"
268
269
  end
269
270
  validate_mapping_files_framework(files).each_with_object({}) do |f, h|
270
271
  h[File.basename(f.path, '.yaml')] = YAML.load_file(f.path)
271
272
  end
272
273
  end
273
274
 
274
- def cem_linux_mapping_files
275
+ def sce_linux_mapping_files
275
276
  facts = [['os.name', osname], ['os.release.major', major_version]]
276
277
  mapping_files = hiera_conf.local_hiera_files_with_facts(*facts, hierarchy_name: 'Mapping Data')
277
278
  raise AbideDevUtils::Errors::MappingFilesNotFoundError, facts if mapping_files.nil? || mapping_files.empty?
@@ -279,7 +280,7 @@ module AbideDevUtils
279
280
  mapping_files
280
281
  end
281
282
 
282
- def cem_windows_mapping_files
283
+ def sce_windows_mapping_files
283
284
  facts = ['os.release.major', major_version]
284
285
  mapping_files = hiera_conf.local_hiera_files_with_fact(facts[0], facts[1], hierarchy_name: 'Mapping Data')
285
286
  raise AbideDevUtils::Errors::MappingFilesNotFoundError, facts if mapping_files.nil? || mapping_files.empty?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AbideDevUtils
4
- module CEM
4
+ module Sce
5
5
  module HieraData; end
6
6
  end
7
7
  end
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'abide_dev_utils/cem/hiera_data/mapping_data/map_data'
4
- require 'abide_dev_utils/cem/hiera_data/mapping_data/mixins'
3
+ require 'abide_dev_utils/sce/hiera_data/mapping_data/map_data'
4
+ require 'abide_dev_utils/sce/hiera_data/mapping_data/mixins'
5
5
 
6
6
  module AbideDevUtils
7
- module CEM
7
+ module Sce
8
8
  module Mapping
9
9
  ALL_TYPES = %w[hiera_title_num number hiera_title title vulnid ruleid].freeze
10
10
  FRAMEWORK_TYPES = {
11
11
  'cis' => %w[hiera_title_num number hiera_title title],
12
- 'stig' => %w[vulnid ruleid],
12
+ 'stig' => %w[vulnid ruleid]
13
13
  }.freeze
14
14
  CIS_TYPES = %w[hiera_title_num number hiera_title title].freeze
15
15
  STIG_TYPES = %w[vulnid ruleid].freeze
@@ -180,11 +180,11 @@ module AbideDevUtils
180
180
  def load_framework(framework)
181
181
  case framework.downcase
182
182
  when 'cis'
183
- self.class.include AbideDevUtils::CEM::Mapping::MixinCIS
184
- extend AbideDevUtils::CEM::Mapping::MixinCIS
183
+ self.class.include AbideDevUtils::Sce::Mapping::MixinCIS
184
+ extend AbideDevUtils::Sce::Mapping::MixinCIS
185
185
  when 'stig'
186
- self.class.include AbideDevUtils::CEM::Mapping::MixinSTIG
187
- extend AbideDevUtils::CEM::Mapping::MixinSTIG
186
+ self.class.include AbideDevUtils::Sce::Mapping::MixinSTIG
187
+ extend AbideDevUtils::Sce::Mapping::MixinSTIG
188
188
  else
189
189
  raise "Invalid framework: #{framework}"
190
190
  end
@@ -192,7 +192,10 @@ module AbideDevUtils
192
192
 
193
193
  def map_data_by_type(map_type)
194
194
  found_map_data = map_data.find { |x| x.type == map_type }
195
- raise "Failed to find map data with type #{map_type}; Meta: #{{framework: framework, module_name: module_name}}" unless found_map_data
195
+ unless found_map_data
196
+ raise "Failed to find map data with type #{map_type}; Meta: #{{ framework: framework,
197
+ module_name: module_name }}"
198
+ end
196
199
 
197
200
  found_map_data
198
201
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'abide_dev_utils/ppt'
4
- require 'abide_dev_utils/cem/benchmark'
4
+ require 'abide_dev_utils/sce/benchmark'
5
5
 
6
6
  module AbideDevUtils
7
- module CEM
7
+ module Sce
8
8
  module Validate
9
9
  # Validation methods for resource data
10
10
  module ResourceData
@@ -12,7 +12,7 @@ module AbideDevUtils
12
12
 
13
13
  def self.controls_without_maps(module_dir = Dir.pwd)
14
14
  pupmod = AbideDevUtils::Ppt::PuppetModule.new(module_dir)
15
- benchmarks = AbideDevUtils::CEM::Benchmark.benchmarks_from_puppet_module(pupmod)
15
+ benchmarks = AbideDevUtils::Sce::Benchmark.benchmarks_from_puppet_module(pupmod)
16
16
  without_maps = benchmarks.each_with_object({}) do |benchmark, hsh|
17
17
  puts "Validating #{benchmark.title}..."
18
18
  hsh[benchmark.title] = benchmark.controls.each_with_object([]) do |ctrl, no_maps|
@@ -3,7 +3,7 @@
3
3
  require_relative 'validation_finding'
4
4
 
5
5
  module AbideDevUtils
6
- module CEM
6
+ module Sce
7
7
  module Validate
8
8
  module Strings
9
9
  # Base class for validating Puppet Strings objects. This class can be used directly, but it is
@@ -4,7 +4,7 @@ require_relative 'base_validator'
4
4
  require_relative '../../../validate'
5
5
 
6
6
  module AbideDevUtils
7
- module CEM
7
+ module Sce
8
8
  module Validate
9
9
  module Strings
10
10
  # Validates a Puppet Class from a Puppet Strings hash
@@ -30,7 +30,7 @@ module AbideDevUtils
30
30
  new_finding(
31
31
  :error,
32
32
  :no_description_or_summary,
33
- finding_data(valid_description: valid_desc, valid_summary: valid_summary),
33
+ finding_data(valid_description: valid_desc, valid_summary: valid_summary)
34
34
  )
35
35
  end
36
36
 
@@ -90,7 +90,8 @@ module AbideDevUtils
90
90
  return true if def_val.nil?
91
91
 
92
92
  if param.types.first.start_with?('Optional[') && def_val != 'undef'
93
- new_finding(:error, :param_optional_without_undef_default, param: param.name, default_value: def_val, name: name, file: file)
93
+ new_finding(:error, :param_optional_without_undef_default, param: param.name, default_value: def_val,
94
+ name: name, file: file)
94
95
  return false
95
96
  end
96
97
  true
@@ -3,7 +3,7 @@
3
3
  require_relative 'puppet_class_validator'
4
4
 
5
5
  module AbideDevUtils
6
- module CEM
6
+ module Sce
7
7
  module Validate
8
8
  module Strings
9
9
  # Validates Puppet Defined Type strings objects
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AbideDevUtils
4
- module CEM
4
+ module Sce
5
5
  module Validate
6
6
  module Strings
7
7
  # Represents a validation finding (warning or error)
@@ -5,7 +5,7 @@ require_relative 'strings/puppet_class_validator'
5
5
  require_relative 'strings/puppet_defined_type_validator'
6
6
 
7
7
  module AbideDevUtils
8
- module CEM
8
+ module Sce
9
9
  module Validate
10
10
  # Validation objects and methods for Puppet Strings
11
11
  module Strings
@@ -62,7 +62,7 @@ module AbideDevUtils
62
62
  file: item.file,
63
63
  line: item.line,
64
64
  errors: item.errors,
65
- warnings: item.warnings,
65
+ warnings: item.warnings
66
66
  }
67
67
  end
68
68
 
@@ -4,8 +4,8 @@ require_relative 'validate/resource_data'
4
4
  require_relative 'validate/strings'
5
5
 
6
6
  module AbideDevUtils
7
- module CEM
8
- # Namespace for CEM validation modules / classes
7
+ module Sce
8
+ # Namespace for SCE validation modules / classes
9
9
  module Validate; end
10
10
  end
11
11
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'abide_dev_utils/xccdf'
4
- require 'abide_dev_utils/cem/generate'
5
- require 'abide_dev_utils/cem/validate'
4
+ require 'abide_dev_utils/sce/generate'
5
+ require 'abide_dev_utils/sce/validate'
6
6
 
7
7
  module AbideDevUtils
8
- # Methods for working with Compliance Enforcement Modules (CEM)
9
- module CEM
8
+ # Methods for working with Security Compliance Enforcement (SCE) modules
9
+ module Sce
10
10
  def self.xccdf
11
11
  return @xccdf if defined?(@xccdf)
12
12
 
@@ -33,7 +33,7 @@ module AbideDevUtils
33
33
  {
34
34
  number: xccdf.control_parts(rule_id).first,
35
35
  hiera_title: xccdf.name_normalize_control(rule_id),
36
- hiera_title_num: xccdf.number_normalize_control(rule_id),
36
+ hiera_title_num: xccdf.number_normalize_control(rule_id)
37
37
  }
38
38
  end
39
39
 
@@ -62,7 +62,7 @@ module AbideDevUtils
62
62
  change_report << {
63
63
  type: :identifier_update,
64
64
  from: key,
65
- to: new_key,
65
+ to: new_key
66
66
  }
67
67
  end
68
68
  new_control_configs[key] = val_hash unless changed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AbideDevUtils
4
- VERSION = "0.17.1"
4
+ VERSION = "0.18.0"
5
5
  end
@@ -10,13 +10,11 @@ require 'abide_dev_utils/output'
10
10
  module AbideDevUtils
11
11
  # Contains modules and classes for working with XCCDF files
12
12
  module XCCDF
13
- # Generate map for CEM
13
+ # Generate map for SCE
14
14
  def self.gen_map(xccdf_file, **opts)
15
15
  type = opts.fetch(:type, 'cis')
16
16
  case type.downcase
17
- when 'cis'
18
- Benchmark.new(xccdf_file).gen_map(**opts)
19
- when 'stig'
17
+ when /cis|stig/
20
18
  Benchmark.new(xccdf_file).gen_map(**opts)
21
19
  else
22
20
  raise AbideDevUtils::Errors::UnsupportedXCCDFError, "XCCDF type #{type} is unsupported!"
@@ -144,12 +142,11 @@ module AbideDevUtils
144
142
  # STIG control
145
143
  vuln_id = mdata[4]
146
144
  group = @benchmark.xpath("Group[@id='#{vuln_id}']")
147
- if group.xpath('Rule').length != 1
148
- raise AbideDevUtils::Errors::ControlPartsError, control
149
- end
145
+ raise AbideDevUtils::Errors::ControlPartsError, control if group.xpath('Rule').length != 1
146
+
150
147
  rule_id = group.xpath('Rule/@id').first.value
151
148
  title = group.xpath('Rule/title').text
152
- return [vuln_id, rule_id, title]
149
+ [vuln_id, rule_id, title]
153
150
  else
154
151
  raise AbideDevUtils::Errors::ControlPartsError, control
155
152
  end
@@ -263,7 +260,9 @@ module AbideDevUtils
263
260
  def map_indexed(indicies: [], index: 'title', framework: 'cis', key_prefix: '')
264
261
  c_map = profiles.each_with_object({}) do |profile, obj|
265
262
  obj[profile.level.downcase] = {} unless obj[profile.level.downcase].is_a?(Hash)
266
- obj[profile.level.downcase][profile.title.downcase] = map_controls_hash(profile, indicies, index).sort_by { |k, _| k }.to_h
263
+ obj[profile.level.downcase][profile.title.downcase] = map_controls_hash(profile, indicies, index).sort_by do |k, _|
264
+ k
265
+ end.to_h
267
266
  end
268
267
 
269
268
  c_map['benchmark'] = { 'title' => title, 'version' => version }
@@ -423,7 +422,8 @@ module AbideDevUtils
423
422
  elsif title.include?(CIS_TITLE_MARKER)
424
423
  return :cis
425
424
  end
426
- raise AbideDevUtils::Errors::UnsupportedXCCDFError, "XCCDF type is unsupported!"
425
+
426
+ raise AbideDevUtils::Errors::UnsupportedXCCDFError, 'XCCDF type is unsupported!'
427
427
  end
428
428
  end
429
429
 
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'abide_dev_utils/version'
4
- require 'abide_dev_utils/xccdf'
5
- require 'abide_dev_utils/ppt'
6
- require 'abide_dev_utils/jira'
7
- require 'abide_dev_utils/config'
8
- require 'abide_dev_utils/comply'
3
+ require_relative 'abide_dev_utils/version'
4
+ require_relative 'abide_dev_utils/xccdf'
5
+ require_relative 'abide_dev_utils/ppt'
6
+ require_relative 'abide_dev_utils/jira'
7
+ require_relative 'abide_dev_utils/config'
8
+ require_relative 'abide_dev_utils/comply'
9
+ require_relative 'abide_dev_utils/sce'
9
10
 
10
11
  # Root namespace all modules / classes
11
12
  module AbideDevUtils; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abide_dev_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.18.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: 2023-11-03 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.21'
153
+ - !ruby/object:Gem::Dependency
154
+ name: metadata-json-lint
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '4.0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '4.0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: bundler
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -341,6 +355,7 @@ executables:
341
355
  extensions: []
342
356
  extra_rdoc_files: []
343
357
  files:
358
+ - ".github/workflows/ci.yaml"
344
359
  - ".github/workflows/mend_ruby.yaml"
345
360
  - ".gitignore"
346
361
  - ".rspec"
@@ -359,33 +374,12 @@ files:
359
374
  - bin/setup
360
375
  - exe/abide
361
376
  - lib/abide_dev_utils.rb
362
- - lib/abide_dev_utils/cem.rb
363
- - lib/abide_dev_utils/cem/benchmark.rb
364
- - lib/abide_dev_utils/cem/generate.rb
365
- - lib/abide_dev_utils/cem/generate/coverage_report.rb
366
- - lib/abide_dev_utils/cem/generate/reference.rb
367
- - lib/abide_dev_utils/cem/hiera_data.rb
368
- - lib/abide_dev_utils/cem/hiera_data/mapping_data.rb
369
- - lib/abide_dev_utils/cem/hiera_data/mapping_data/map_data.rb
370
- - lib/abide_dev_utils/cem/hiera_data/mapping_data/mixins.rb
371
- - lib/abide_dev_utils/cem/hiera_data/resource_data.rb
372
- - lib/abide_dev_utils/cem/hiera_data/resource_data/control.rb
373
- - lib/abide_dev_utils/cem/hiera_data/resource_data/parameters.rb
374
- - lib/abide_dev_utils/cem/hiera_data/resource_data/resource.rb
375
- - lib/abide_dev_utils/cem/mapping/mapper.rb
376
- - lib/abide_dev_utils/cem/validate.rb
377
- - lib/abide_dev_utils/cem/validate/resource_data.rb
378
- - lib/abide_dev_utils/cem/validate/strings.rb
379
- - lib/abide_dev_utils/cem/validate/strings/base_validator.rb
380
- - lib/abide_dev_utils/cem/validate/strings/puppet_class_validator.rb
381
- - lib/abide_dev_utils/cem/validate/strings/puppet_defined_type_validator.rb
382
- - lib/abide_dev_utils/cem/validate/strings/validation_finding.rb
383
377
  - lib/abide_dev_utils/cli.rb
384
378
  - lib/abide_dev_utils/cli/abstract.rb
385
- - lib/abide_dev_utils/cli/cem.rb
386
379
  - lib/abide_dev_utils/cli/comply.rb
387
380
  - lib/abide_dev_utils/cli/jira.rb
388
381
  - lib/abide_dev_utils/cli/puppet.rb
382
+ - lib/abide_dev_utils/cli/sce.rb
389
383
  - lib/abide_dev_utils/cli/test.rb
390
384
  - lib/abide_dev_utils/cli/xccdf.rb
391
385
  - lib/abide_dev_utils/comply.rb
@@ -394,12 +388,12 @@ files:
394
388
  - lib/abide_dev_utils/dot_number_comparable.rb
395
389
  - lib/abide_dev_utils/errors.rb
396
390
  - lib/abide_dev_utils/errors/base.rb
397
- - lib/abide_dev_utils/errors/cem.rb
398
391
  - lib/abide_dev_utils/errors/comply.rb
399
392
  - lib/abide_dev_utils/errors/gcloud.rb
400
393
  - lib/abide_dev_utils/errors/general.rb
401
394
  - lib/abide_dev_utils/errors/jira.rb
402
395
  - lib/abide_dev_utils/errors/ppt.rb
396
+ - lib/abide_dev_utils/errors/sce.rb
403
397
  - lib/abide_dev_utils/errors/xccdf.rb
404
398
  - lib/abide_dev_utils/files.rb
405
399
  - lib/abide_dev_utils/gcloud.rb
@@ -436,6 +430,27 @@ files:
436
430
  - lib/abide_dev_utils/prompt.rb
437
431
  - lib/abide_dev_utils/puppet_strings.rb
438
432
  - lib/abide_dev_utils/resources/generic_spec.erb
433
+ - lib/abide_dev_utils/sce.rb
434
+ - lib/abide_dev_utils/sce/benchmark.rb
435
+ - lib/abide_dev_utils/sce/generate.rb
436
+ - lib/abide_dev_utils/sce/generate/coverage_report.rb
437
+ - lib/abide_dev_utils/sce/generate/reference.rb
438
+ - lib/abide_dev_utils/sce/hiera_data.rb
439
+ - lib/abide_dev_utils/sce/hiera_data/mapping_data.rb
440
+ - lib/abide_dev_utils/sce/hiera_data/mapping_data/map_data.rb
441
+ - lib/abide_dev_utils/sce/hiera_data/mapping_data/mixins.rb
442
+ - lib/abide_dev_utils/sce/hiera_data/resource_data.rb
443
+ - lib/abide_dev_utils/sce/hiera_data/resource_data/control.rb
444
+ - lib/abide_dev_utils/sce/hiera_data/resource_data/parameters.rb
445
+ - lib/abide_dev_utils/sce/hiera_data/resource_data/resource.rb
446
+ - lib/abide_dev_utils/sce/mapping/mapper.rb
447
+ - lib/abide_dev_utils/sce/validate.rb
448
+ - lib/abide_dev_utils/sce/validate/resource_data.rb
449
+ - lib/abide_dev_utils/sce/validate/strings.rb
450
+ - lib/abide_dev_utils/sce/validate/strings/base_validator.rb
451
+ - lib/abide_dev_utils/sce/validate/strings/puppet_class_validator.rb
452
+ - lib/abide_dev_utils/sce/validate/strings/puppet_defined_type_validator.rb
453
+ - lib/abide_dev_utils/sce/validate/strings/validation_finding.rb
439
454
  - lib/abide_dev_utils/validate.rb
440
455
  - lib/abide_dev_utils/version.rb
441
456
  - lib/abide_dev_utils/xccdf.rb
@@ -454,6 +469,7 @@ metadata:
454
469
  homepage_uri: https://github.com/puppetlabs/abide_dev_utils
455
470
  source_code_uri: https://github.com/puppetlabs/abide_dev_utils
456
471
  changelog_uri: https://github.com/puppetlabs/abide_dev_utils
472
+ rubygems_mfa_required: 'true'
457
473
  post_install_message:
458
474
  rdoc_options: []
459
475
  require_paths:
@@ -469,7 +485,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
485
  - !ruby/object:Gem::Version
470
486
  version: '0'
471
487
  requirements: []
472
- rubygems_version: 3.4.18
488
+ rubygems_version: 3.4.19
473
489
  signing_key:
474
490
  specification_version: 4
475
491
  summary: Helper utilities for developing compliance Puppet code
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'abide_dev_utils/cem/generate/reference'
4
- require 'abide_dev_utils/cem/generate/coverage_report'
5
-
6
- module AbideDevUtils
7
- module CEM
8
- # Namespace for objects and methods used in `abide cem generate` subcommands
9
- module Generate; end
10
- end
11
- end
File without changes