inspec-core 5.22.65 → 6.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Chef-EULA +9 -0
- data/Gemfile +24 -32
- data/etc/features.sig +6 -0
- data/etc/features.yaml +94 -0
- data/inspec-core.gemspec +15 -14
- data/lib/inspec/backend.rb +2 -0
- data/lib/inspec/base_cli.rb +80 -4
- data/lib/inspec/cached_fetcher.rb +24 -3
- data/lib/inspec/cli.rb +292 -235
- data/lib/inspec/config.rb +24 -11
- data/lib/inspec/dependencies/cache.rb +33 -0
- data/lib/inspec/dependencies/dependency_set.rb +2 -2
- data/lib/inspec/dsl.rb +1 -1
- data/lib/inspec/enhanced_outcomes.rb +1 -0
- data/lib/inspec/errors.rb +5 -0
- data/lib/inspec/exceptions.rb +2 -0
- data/lib/inspec/feature/config.rb +75 -0
- data/lib/inspec/feature/runner.rb +26 -0
- data/lib/inspec/feature.rb +34 -0
- data/lib/inspec/fetcher/git.rb +5 -0
- data/lib/inspec/fetcher/url.rb +7 -29
- data/lib/inspec/globals.rb +6 -0
- data/lib/inspec/input_registry.rb +1 -5
- data/lib/inspec/plugin/v1/plugin_types/fetcher.rb +7 -0
- data/lib/inspec/plugin/v2/plugin_types/streaming_reporter.rb +30 -2
- data/lib/inspec/profile.rb +46 -3
- data/lib/inspec/reporters/cli.rb +1 -1
- data/lib/inspec/reporters.rb +67 -54
- data/lib/inspec/resources/nftables.rb +1 -14
- data/lib/inspec/resources/oracledb_session.rb +3 -9
- data/lib/inspec/resources/postgres_session.rb +1 -1
- data/lib/inspec/resources/sybase_session.rb +2 -11
- data/lib/inspec/resources/virtualization.rb +1 -1
- data/lib/inspec/rule.rb +9 -14
- data/lib/inspec/run_data.rb +7 -5
- data/lib/inspec/runner.rb +35 -6
- data/lib/inspec/runner_rspec.rb +12 -9
- data/lib/inspec/secrets/yaml.rb +9 -3
- data/lib/inspec/shell.rb +10 -0
- data/lib/inspec/ui.rb +4 -0
- data/lib/inspec/utils/licensing_config.rb +9 -0
- data/lib/inspec/utils/profile_ast_helpers.rb +2 -1
- data/lib/inspec/utils/waivers/csv_file_reader.rb +1 -1
- data/lib/inspec/utils/waivers/excel_file_reader.rb +1 -1
- data/lib/inspec/version.rb +1 -1
- data/lib/inspec/waiver_file_reader.rb +68 -27
- data/lib/inspec.rb +2 -1
- data/lib/matchers/matchers.rb +3 -3
- data/lib/plugins/inspec-compliance/README.md +1 -11
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb +189 -170
- data/lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb +10 -3
- data/lib/plugins/inspec-init/lib/inspec-init/cli.rb +1 -0
- data/lib/plugins/inspec-init/lib/inspec-init/cli_plugin.rb +23 -21
- data/lib/plugins/inspec-init/lib/inspec-init/cli_profile.rb +15 -13
- data/lib/plugins/inspec-init/lib/inspec-init/cli_resource.rb +15 -13
- data/lib/plugins/inspec-license/README.md +16 -0
- data/lib/plugins/inspec-license/inspec-license.gemspec +6 -0
- data/lib/plugins/inspec-license/lib/inspec-license/cli.rb +26 -0
- data/lib/plugins/inspec-license/lib/inspec-license.rb +14 -0
- data/lib/plugins/inspec-parallel/README.md +27 -0
- data/lib/plugins/inspec-parallel/inspec-parallel.gemspec +6 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/child_status_reporter.rb +61 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/cli.rb +39 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/command.rb +219 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/runner.rb +265 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/base.rb +24 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/silent.rb +7 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/status.rb +124 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/text.rb +23 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel/validator.rb +170 -0
- data/lib/plugins/inspec-parallel/lib/inspec-parallel.rb +18 -0
- data/lib/plugins/inspec-sign/lib/inspec-sign/base.rb +10 -11
- data/lib/plugins/inspec-sign/lib/inspec-sign/cli.rb +11 -4
- data/lib/plugins/inspec-streaming-reporter-progress-bar/lib/inspec-streaming-reporter-progress-bar/streaming_reporter.rb +6 -13
- data/lib/source_readers/inspec.rb +1 -1
- metadata +45 -19
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative "base"
|
2
2
|
require "inspec/dist"
|
3
|
+
require "inspec/feature"
|
3
4
|
|
4
5
|
#
|
5
6
|
# Notes:
|
@@ -85,8 +86,10 @@ module InspecPlugins
|
|
85
86
|
option :keydir, type: :string, default: "./",
|
86
87
|
desc: "Directory to search for keys"
|
87
88
|
def generate_keys
|
88
|
-
|
89
|
-
|
89
|
+
Inspec.with_feature("inspec-cli-sign-generate-keys") {
|
90
|
+
puts "Generating keys"
|
91
|
+
InspecPlugins::Sign::Base.keygen(options)
|
92
|
+
}
|
90
93
|
end
|
91
94
|
|
92
95
|
desc "profile PATH", "sign the profile in PATH and generate .iaf artifact."
|
@@ -95,12 +98,16 @@ module InspecPlugins
|
|
95
98
|
option :profile_content_id, type: :string,
|
96
99
|
desc: "UUID of the profile. This will write the profile_content_id in the metadata file if it does not already exist in the metadata file."
|
97
100
|
def profile(profile_path)
|
98
|
-
|
101
|
+
Inspec.with_feature("inspec-cli-sign-profile") {
|
102
|
+
InspecPlugins::Sign::Base.profile_sign(profile_path, options)
|
103
|
+
}
|
99
104
|
end
|
100
105
|
|
101
106
|
desc "verify PATH", "Verify a signed profile .iaf artifact at given path."
|
102
107
|
def verify(signed_profile_path)
|
103
|
-
|
108
|
+
Inspec.with_feature("inspec-cli-sign-verify") {
|
109
|
+
InspecPlugins::Sign::Base.profile_verify(signed_profile_path)
|
110
|
+
}
|
104
111
|
end
|
105
112
|
end
|
106
113
|
end
|
@@ -91,23 +91,20 @@ module InspecPlugins::StreamingReporterProgressBar
|
|
91
91
|
|
92
92
|
set_status_mapping(control_id, status)
|
93
93
|
collect_notifications(notification, control_id, status)
|
94
|
-
|
95
|
-
if control_ended
|
96
|
-
control_outcome = add_enhanced_outcomes(control_id) if enhanced_outcomes
|
97
|
-
show_progress(control_id, title, full_description, control_outcome)
|
98
|
-
end
|
94
|
+
show_progress(control_id, title, full_description) if control_ended?(notification, control_id)
|
99
95
|
end
|
100
96
|
|
101
|
-
def show_progress(control_id, title, full_description
|
97
|
+
def show_progress(control_id, title, full_description)
|
102
98
|
@bar ||= ProgressBar.new(controls_count, :bar, :counter, :percentage)
|
103
99
|
sleep 0.1
|
104
100
|
@bar.increment!
|
105
|
-
@bar.puts format_it(control_id, title, full_description
|
101
|
+
@bar.puts format_it(control_id, title, full_description)
|
106
102
|
rescue StandardError => e
|
107
103
|
raise "Exception in Progress Bar streaming reporter: #{e}"
|
108
104
|
end
|
109
105
|
|
110
|
-
def format_it(control_id, title, full_description
|
106
|
+
def format_it(control_id, title, full_description)
|
107
|
+
control_outcome = control_outcome(control_id)
|
111
108
|
if control_outcome
|
112
109
|
control_status = control_outcome
|
113
110
|
else
|
@@ -121,11 +118,7 @@ module InspecPlugins::StreamingReporterProgressBar
|
|
121
118
|
end
|
122
119
|
end
|
123
120
|
indicator = INDICATORS[control_status]
|
124
|
-
message_to_format =
|
125
|
-
message_to_format += "#{indicator} "
|
126
|
-
message_to_format += "#{control_id.to_s.strip.dup.force_encoding(Encoding::UTF_8)} "
|
127
|
-
message_to_format += "#{title.gsub(/\n*\s+/, " ").to_s.force_encoding(Encoding::UTF_8)} " if title
|
128
|
-
message_to_format += "#{full_description.gsub(/\n*\s+/, " ").to_s.force_encoding(Encoding::UTF_8)} " unless title
|
121
|
+
message_to_format = format_message(indicator, control_id, title, full_description)
|
129
122
|
format_with_color(control_status, message_to_format)
|
130
123
|
rescue Exception => e
|
131
124
|
raise "Exception in show_progress: #{e}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef InSpec Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-telemetry
|
@@ -325,7 +325,7 @@ dependencies:
|
|
325
325
|
version: '1.5'
|
326
326
|
- - "<"
|
327
327
|
- !ruby/object:Gem::Version
|
328
|
-
version: '
|
328
|
+
version: '2.0'
|
329
329
|
type: :runtime
|
330
330
|
prerelease: false
|
331
331
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -335,7 +335,7 @@ dependencies:
|
|
335
335
|
version: '1.5'
|
336
336
|
- - "<"
|
337
337
|
- !ruby/object:Gem::Version
|
338
|
-
version: '
|
338
|
+
version: '2.0'
|
339
339
|
- !ruby/object:Gem::Dependency
|
340
340
|
name: semverse
|
341
341
|
requirement: !ruby/object:Gem::Requirement
|
@@ -365,47 +365,53 @@ dependencies:
|
|
365
365
|
- !ruby/object:Gem::Version
|
366
366
|
version: '2.0'
|
367
367
|
- !ruby/object:Gem::Dependency
|
368
|
-
name:
|
368
|
+
name: train-core
|
369
369
|
requirement: !ruby/object:Gem::Requirement
|
370
370
|
requirements:
|
371
371
|
- - ">="
|
372
372
|
- !ruby/object:Gem::Version
|
373
|
-
version:
|
373
|
+
version: 3.11.0
|
374
374
|
type: :runtime
|
375
375
|
prerelease: false
|
376
376
|
version_requirements: !ruby/object:Gem::Requirement
|
377
377
|
requirements:
|
378
378
|
- - ">="
|
379
379
|
- !ruby/object:Gem::Version
|
380
|
-
version:
|
380
|
+
version: 3.11.0
|
381
381
|
- !ruby/object:Gem::Dependency
|
382
|
-
name:
|
382
|
+
name: chef-licensing
|
383
383
|
requirement: !ruby/object:Gem::Requirement
|
384
384
|
requirements:
|
385
|
-
- - "
|
385
|
+
- - ">="
|
386
386
|
- !ruby/object:Gem::Version
|
387
|
-
version:
|
387
|
+
version: 0.7.5
|
388
388
|
type: :runtime
|
389
389
|
prerelease: false
|
390
390
|
version_requirements: !ruby/object:Gem::Requirement
|
391
391
|
requirements:
|
392
|
-
- - "
|
392
|
+
- - ">="
|
393
393
|
- !ruby/object:Gem::Version
|
394
|
-
version:
|
395
|
-
description:
|
396
|
-
You can use it for integration or even compliance testing. Create fully portable
|
397
|
-
test profiles and use them in your workflow to ensure stability and security. Integrate
|
398
|
-
InSpec in your change lifecycle for local testing, CI/CD, and deployment verification.
|
394
|
+
version: 0.7.5
|
395
|
+
description: |+
|
396
|
+
InSpec provides a framework for creating end-to-end infrastructure tests. You can use it for integration or even compliance testing. Create fully portable test profiles and use them in your workflow to ensure stability and security. Integrate InSpec in your change lifecycle for local testing, CI/CD, and deployment verification.
|
399
397
|
This has local support only. See the `inspec` gem for full support.
|
398
|
+
|
399
|
+
Packaged distributions of Progress® Chef® products obtained from RubyGems are made available pursuant to the Progress Chef EULA at https://www.chef.io/end-user-license-agreement, unless there is an executed agreement in effect between you and Progress that covers the Progress Chef products ("Master Agreement"), in which case the Master Agreement shall govern.
|
400
|
+
|
401
|
+
Source code obtained from the Chef GitHub repository is made available under Apache-2.0, a copy of which is included.
|
402
|
+
|
400
403
|
email:
|
401
404
|
- inspec@chef.io
|
402
405
|
executables: []
|
403
406
|
extensions: []
|
404
407
|
extra_rdoc_files: []
|
405
408
|
files:
|
409
|
+
- Chef-EULA
|
406
410
|
- Gemfile
|
407
411
|
- LICENSE
|
408
412
|
- etc/deprecations.json
|
413
|
+
- etc/features.sig
|
414
|
+
- etc/features.yaml
|
409
415
|
- etc/keys/progress-2022-05-04.pem.pub
|
410
416
|
- etc/plugin_filters.json
|
411
417
|
- inspec-core.gemspec
|
@@ -448,6 +454,9 @@ files:
|
|
448
454
|
- lib/inspec/errors.rb
|
449
455
|
- lib/inspec/exceptions.rb
|
450
456
|
- lib/inspec/expect.rb
|
457
|
+
- lib/inspec/feature.rb
|
458
|
+
- lib/inspec/feature/config.rb
|
459
|
+
- lib/inspec/feature/runner.rb
|
451
460
|
- lib/inspec/fetcher.rb
|
452
461
|
- lib/inspec/fetcher/git.rb
|
453
462
|
- lib/inspec/fetcher/local.rb
|
@@ -724,6 +733,7 @@ files:
|
|
724
733
|
- lib/inspec/utils/install_context.rb
|
725
734
|
- lib/inspec/utils/json_log.rb
|
726
735
|
- lib/inspec/utils/json_profile_summary.rb
|
736
|
+
- lib/inspec/utils/licensing_config.rb
|
727
737
|
- lib/inspec/utils/modulator.rb
|
728
738
|
- lib/inspec/utils/nginx_parser.rb
|
729
739
|
- lib/inspec/utils/object_traversal.rb
|
@@ -808,6 +818,22 @@ files:
|
|
808
818
|
- lib/plugins/inspec-init/templates/resources/basic/libraries/inspec-resource-template.erb
|
809
819
|
- lib/plugins/inspec-init/templates/resources/plural/docs/resource-doc.erb
|
810
820
|
- lib/plugins/inspec-init/templates/resources/plural/libraries/inspec-resource-template.erb
|
821
|
+
- lib/plugins/inspec-license/README.md
|
822
|
+
- lib/plugins/inspec-license/inspec-license.gemspec
|
823
|
+
- lib/plugins/inspec-license/lib/inspec-license.rb
|
824
|
+
- lib/plugins/inspec-license/lib/inspec-license/cli.rb
|
825
|
+
- lib/plugins/inspec-parallel/README.md
|
826
|
+
- lib/plugins/inspec-parallel/inspec-parallel.gemspec
|
827
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel.rb
|
828
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/child_status_reporter.rb
|
829
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/cli.rb
|
830
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/command.rb
|
831
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/runner.rb
|
832
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/base.rb
|
833
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/silent.rb
|
834
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/status.rb
|
835
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/super_reporter/text.rb
|
836
|
+
- lib/plugins/inspec-parallel/lib/inspec-parallel/validator.rb
|
811
837
|
- lib/plugins/inspec-plugin-manager-cli/README.md
|
812
838
|
- lib/plugins/inspec-plugin-manager-cli/inspec-plugin-manager-cli.gemspec
|
813
839
|
- lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli.rb
|
@@ -851,7 +877,7 @@ files:
|
|
851
877
|
- lib/source_readers/inspec.rb
|
852
878
|
homepage: https://github.com/inspec/inspec
|
853
879
|
licenses:
|
854
|
-
-
|
880
|
+
- LicenseRef-Chef-EULA
|
855
881
|
metadata: {}
|
856
882
|
post_install_message:
|
857
883
|
rdoc_options: []
|
@@ -861,14 +887,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
861
887
|
requirements:
|
862
888
|
- - ">="
|
863
889
|
- !ruby/object:Gem::Version
|
864
|
-
version:
|
890
|
+
version: '2.7'
|
865
891
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
866
892
|
requirements:
|
867
893
|
- - ">="
|
868
894
|
- !ruby/object:Gem::Version
|
869
895
|
version: '0'
|
870
896
|
requirements: []
|
871
|
-
rubygems_version: 3.
|
897
|
+
rubygems_version: 3.1.4
|
872
898
|
signing_key:
|
873
899
|
specification_version: 4
|
874
900
|
summary: Infrastructure and compliance testing. Core library.
|