inspec-core 2.2.50 → 2.2.54

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6489175f1117e3dba0b922d9eaf9f39002e2ed0c468e1cbc4267dfe693a3d4f4
4
- data.tar.gz: b87768631db86ca80f6923f71f37abdcdff86f6e1692f9fb62c75b64d1c71754
3
+ metadata.gz: c90f578944eb5f074ecc0d5c8e8f00f1ac97041e8934eab84d891a20cd693707
4
+ data.tar.gz: 7dde3fb25a43ac5cc3e78afd619e299dfc2195e91135fa6bf5475db9c844a258
5
5
  SHA512:
6
- metadata.gz: efd63af6b912d2746862c77ce77d45e63ef3e364a985f9cd01cd39ad6756b42fca1fb8c31679256812bd62e072a10c1099d8242caf62e524ca5d1340f14e25c6
7
- data.tar.gz: e9ed1ead13cca8fa47e5bd1019b337acea5b472738bda7c6d3f48bdc2fa50466ef6dadd294dbe49475fc0154b9acab7b2bdb2be3671a75b38df7f0bc256324f1
6
+ metadata.gz: 274a064b7010424eb43996dcd96a6e480cb71b4f70d36bfcb591f83f030bd2bff8baa234184b5083d9360e485e730f647b6512e922e25936af0bd7932d672673
7
+ data.tar.gz: 59b16dbb6935455c531485d442b3e7c723bd5a7bdf9462dcafec98454486ff97bc6e54ab35576bf5b5be80c7435dc136a9e3765c098e9b1b69cf8225c8c043c4
@@ -1,32 +1,43 @@
1
1
  # Change Log
2
2
  <!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
3
- <!-- latest_release 2.2.50 -->
4
- ## [v2.2.50](https://github.com/inspec/inspec/tree/v2.2.50) (2018-07-26)
3
+ <!-- latest_release 2.2.54 -->
4
+ ## [v2.2.54](https://github.com/inspec/inspec/tree/v2.2.54) (2018-08-02)
5
5
 
6
6
  #### Enhancements
7
- - Since /proc/xen is an empty dir in Amazon Linux, inspec falsely detects docker instances as platform=&#39;xen&#39; [#3243](https://github.com/inspec/inspec/pull/3243) ([woneill](https://github.com/woneill))
7
+ - Escaping package names for windows packages [#3259](https://github.com/inspec/inspec/pull/3259) ([frezbo](https://github.com/frezbo))
8
8
  <!-- latest_release -->
9
9
 
10
- <!-- release_rollup since=2.2.41 -->
11
- ### Changes since 2.2.41 release
12
-
13
- #### New Features
14
- - windows_feature resource: Add DISM support [#3224](https://github.com/inspec/inspec/pull/3224) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 2.2.47 -->
10
+ <!-- release_rollup since=2.2.50 -->
11
+ ### Changes since 2.2.50 release
15
12
 
16
13
  #### Enhancements
17
- - Since /proc/xen is an empty dir in Amazon Linux, inspec falsely detects docker instances as platform=&#39;xen&#39; [#3243](https://github.com/inspec/inspec/pull/3243) ([woneill](https://github.com/woneill)) <!-- 2.2.50 -->
18
- - alpine resource: Fix small style issues [#3238](https://github.com/inspec/inspec/pull/3238) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 2.2.45 -->
19
- - Add extra fault checking to git fetcher [#3239](https://github.com/inspec/inspec/pull/3239) ([james-stocks](https://github.com/james-stocks)) <!-- 2.2.44 -->
14
+ - Escaping package names for windows packages [#3259](https://github.com/inspec/inspec/pull/3259) ([frezbo](https://github.com/frezbo)) <!-- 2.2.54 -->
15
+ - Populate report code for merged controls [#3264](https://github.com/inspec/inspec/pull/3264) ([jquick](https://github.com/jquick)) <!-- 2.2.53 -->
16
+ - Bump the chef client version for tests. [#3260](https://github.com/inspec/inspec/pull/3260) ([jquick](https://github.com/jquick)) <!-- 2.2.52 -->
20
17
 
21
18
  #### Merged Pull Requests
22
- - Fix for profile version not being included in the compliance upload c… [#3252](https://github.com/inspec/inspec/pull/3252) ([devoptimist](https://github.com/devoptimist)) <!-- 2.2.49 -->
23
- - Satisfy RuboCop by adding `x` bit to `bin/inspec` [#3249](https://github.com/inspec/inspec/pull/3249) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 2.2.48 -->
24
- - cli: Downcase supermarket tool name to match URL [#3242](https://github.com/inspec/inspec/pull/3242) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 2.2.46 -->
25
- - Fix the unit tests ssl issue [#3251](https://github.com/inspec/inspec/pull/3251) ([jquick](https://github.com/jquick)) <!-- 2.2.43 -->
26
- - update README.md to fix travis and appveyor&#39;s badges. [#3244](https://github.com/inspec/inspec/pull/3244) ([takahashim](https://github.com/takahashim)) <!-- 2.2.42 -->
19
+ - Ability to render contrib resource pack docs on main website [#3184](https://github.com/inspec/inspec/pull/3184) ([clintoncwolfe](https://github.com/clintoncwolfe)) <!-- 2.2.51 -->
27
20
  <!-- release_rollup -->
28
21
 
29
22
  <!-- latest_stable_release -->
23
+ ## [v2.2.50](https://github.com/inspec/inspec/tree/v2.2.50) (2018-07-26)
24
+
25
+ #### New Features
26
+ - windows_feature resource: Add DISM support [#3224](https://github.com/inspec/inspec/pull/3224) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
27
+
28
+ #### Enhancements
29
+ - Add extra fault checking to git fetcher [#3239](https://github.com/inspec/inspec/pull/3239) ([james-stocks](https://github.com/james-stocks))
30
+ - alpine resource: Fix small style issues [#3238](https://github.com/inspec/inspec/pull/3238) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
31
+ - Since /proc/xen is an empty dir in Amazon Linux, inspec falsely detects docker instances as platform=&#39;xen&#39; [#3243](https://github.com/inspec/inspec/pull/3243) ([woneill](https://github.com/woneill))
32
+
33
+ #### Merged Pull Requests
34
+ - update README.md to fix travis and appveyor&#39;s badges. [#3244](https://github.com/inspec/inspec/pull/3244) ([takahashim](https://github.com/takahashim))
35
+ - Fix the unit tests ssl issue [#3251](https://github.com/inspec/inspec/pull/3251) ([jquick](https://github.com/jquick))
36
+ - cli: Downcase supermarket tool name to match URL [#3242](https://github.com/inspec/inspec/pull/3242) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
37
+ - Satisfy RuboCop by adding `x` bit to `bin/inspec` [#3249](https://github.com/inspec/inspec/pull/3249) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
38
+ - Fix for profile version not being included in the compliance upload c… [#3252](https://github.com/inspec/inspec/pull/3252) ([devoptimist](https://github.com/devoptimist))
39
+ <!-- latest_stable_release -->
40
+
30
41
  ## [v2.2.41](https://github.com/inspec/inspec/tree/v2.2.41) (2018-07-20)
31
42
 
32
43
  #### New Features
@@ -40,7 +51,6 @@
40
51
  #### Merged Pull Requests
41
52
  - docs: Fix formatting/style on InSpec DSL page [#3201](https://github.com/inspec/inspec/pull/3201) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
42
53
  - Update hab package to use psql client [#3234](https://github.com/inspec/inspec/pull/3234) ([jquick](https://github.com/jquick))
43
- <!-- latest_stable_release -->
44
54
 
45
55
  ## [v2.2.35](https://github.com/inspec/inspec/tree/v2.2.35) (2018-07-12)
46
56
 
data/Gemfile CHANGED
@@ -40,6 +40,7 @@ group :tools do
40
40
  gem 'pry', '~> 0.10'
41
41
  gem 'rb-readline'
42
42
  gem 'license_finder'
43
+ gem 'git', '~> 1.4'
43
44
  end
44
45
 
45
46
  # gems for Maintainers.md generation
@@ -531,6 +531,17 @@ module Inspec
531
531
  source_location: location,
532
532
  }
533
533
 
534
+ # try and grab code text from merge locations
535
+ if controls[id][:code].empty? && Inspec::Rule.merge_count(rule) > 0
536
+ Inspec::Rule.merge_changes(rule).each do |merge_location|
537
+ code = Inspec::MethodSource.code_at(merge_location, source_reader)
538
+ if !code.empty?
539
+ controls[id][:code] = code
540
+ break
541
+ end
542
+ end
543
+ end
544
+
534
545
  groups[file] ||= {
535
546
  title: rule.instance_variable_get(:@__group_title),
536
547
  controls: [],
@@ -44,6 +44,7 @@ module Inspec
44
44
  @__checks = []
45
45
  @__skip_rule = nil
46
46
  @__merge_count = 0
47
+ @__merge_changes = []
47
48
  @__skip_only_if_eval = opts[:skip_only_if_eval]
48
49
 
49
50
  # evaluate the given definition
@@ -181,6 +182,10 @@ module Inspec
181
182
  rule.instance_variable_get(:@__merge_count)
182
183
  end
183
184
 
185
+ def self.merge_changes(rule)
186
+ rule.instance_variable_get(:@__merge_changes)
187
+ end
188
+
184
189
  def self.prepare_checks(rule)
185
190
  msg = skip_status(rule)
186
191
  return checks(rule) unless msg
@@ -211,12 +216,6 @@ module Inspec
211
216
  dst.tag(src.tag) unless src.tag.nil?
212
217
  dst.ref(src.ref) unless src.ref.nil?
213
218
 
214
- # use the most recent source location
215
- dst.instance_variable_set(
216
- :@__source_location,
217
- src.instance_variable_get(:@__source_location),
218
- )
219
-
220
219
  # merge indirect fields
221
220
  # checks defined in the source will completely eliminate
222
221
  # all checks that were defined in the destination
@@ -224,8 +223,13 @@ module Inspec
224
223
  dst.instance_variable_set(:@__checks, sc) unless sc.empty?
225
224
  sr = skip_status(src)
226
225
  set_skip_rule(dst, sr) unless sr.nil?
227
- # increment merge count
226
+
227
+ # Save merge history
228
228
  dst.instance_variable_set(:@__merge_count, merge_count(dst) + 1)
229
+ dst.instance_variable_set(
230
+ :@__merge_changes,
231
+ merge_changes(dst) << src.instance_variable_get(:@__source_location),
232
+ )
229
233
  end
230
234
 
231
235
  private
@@ -4,5 +4,5 @@
4
4
  # author: Christoph Hartmann
5
5
 
6
6
  module Inspec
7
- VERSION = '2.2.50'
7
+ VERSION = '2.2.54'
8
8
  end
@@ -288,7 +288,7 @@ module Inspec::Resources
288
288
  # Find the package
289
289
  cmd = inspec.command <<-EOF.gsub(/^\s*/, '')
290
290
  Get-ItemProperty (@("#{search_paths.join('", "')}") | Where-Object { Test-Path $_ }) |
291
- Where-Object { $_.DisplayName -match "^\\s*#{package_name}\\s*$" -or $_.PSChildName -match "^\\s*#{package_name}\\s*$" } |
291
+ Where-Object { $_.DisplayName -match "^\\s*#{package_name.shellescape}\\s*$" -or $_.PSChildName -match "^\\s*#{package_name.shellescape}\\s*$" } |
292
292
  Select-Object -Property DisplayName,DisplayVersion | ConvertTo-Json
293
293
  EOF
294
294
 
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: 2.2.50
4
+ version: 2.2.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-26 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train-core