inspec 1.19.1 → 1.19.2

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
  SHA1:
3
- metadata.gz: 81fa0375920db3ff8e7229d8c1e2a68c439a28b6
4
- data.tar.gz: e41c9d5ae3ee7821dea25685080899cd18ce533a
3
+ metadata.gz: e175f1b4f521dfa8107012a2ce9887a71af34717
4
+ data.tar.gz: 9c14b1a99c50557cdefa23076f3926c1dabe5192
5
5
  SHA512:
6
- metadata.gz: e15c7e2e1d8188bc172274bb9085dd412b9bac7b54e7ad62a9ff964da7c34e8e98c277c8380f8011392f44258f9ac6e3c838a6d784dda356d9e2dc94203eb1e2
7
- data.tar.gz: 7242ed1d922644e611ba6dd1e7cd9e92afa0b7bf0aaf1fc8dbb9f955213543ff47e4097ab40060fb5096b091e3ba969e9a625bb5bd2d244930babb774450b298
6
+ metadata.gz: e29e205b839e1de3732c2395a280b9c3b1c21fb450dbf01a9cf6db306aaa60ebb3ae8915f5cb8da6ce09e63a11be3553de5c9c8de63640379d3c3fc04b51cc49
7
+ data.tar.gz: ef28f083bc1b0bd7aea60d9bc4fd15b1a0878f7b5130abd567d45535cd8ee01ad7cfb3d318bcf94d2d51b40275f9e3ae100535452e8f3d21b4b29d153c896388
data/CHANGELOG.md CHANGED
@@ -1,10 +1,27 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.19.2](https://github.com/chef/inspec/tree/v1.19.2) (2017-04-07)
4
+ [Full Changelog](https://github.com/chef/inspec/compare/v1.19.1...v1.19.2)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Bug or doc problem with `registry\_key` [\#1268](https://github.com/chef/inspec/issues/1268)
9
+
10
+ **Closed issues:**
11
+
12
+ - Strange `registry\_key` behavior \(Unable to get .NET Version\) [\#1131](https://github.com/chef/inspec/issues/1131)
13
+
14
+ **Merged pull requests:**
15
+
16
+ - Fix and document registry issues [\#1635](https://github.com/chef/inspec/pull/1635) ([chris-rock](https://github.com/chris-rock))
17
+ - \[www\] Add warning to the http resource documentation [\#1623](https://github.com/chef/inspec/pull/1623) ([adamleff](https://github.com/adamleff))
18
+
3
19
  ## [v1.19.1](https://github.com/chef/inspec/tree/v1.19.1) (2017-04-04)
4
20
  [Full Changelog](https://github.com/chef/inspec/compare/v1.19.0...v1.19.1)
5
21
 
6
22
  **Merged pull requests:**
7
23
 
24
+ - Releasing v1.19.1 [\#1628](https://github.com/chef/inspec/pull/1628) ([adamleff](https://github.com/adamleff))
8
25
  - Loosen addressable version pin [\#1627](https://github.com/chef/inspec/pull/1627) ([adamleff](https://github.com/adamleff))
9
26
 
10
27
  ## [v1.19.0](https://github.com/chef/inspec/tree/v1.19.0) (2017-04-04)
@@ -13,13 +30,22 @@
13
30
  **Implemented enhancements:**
14
31
 
15
32
  - dh\_params resource \(proposed\) [\#1617](https://github.com/chef/inspec/issues/1617)
33
+ - Fix \#1617 Add dh\_params resource [\#1618](https://github.com/chef/inspec/pull/1618) ([4-20ma](https://github.com/4-20ma))
16
34
  - Allow apache\_conf to include symlinked configuration files [\#1406](https://github.com/chef/inspec/pull/1406) ([carldjohnston](https://github.com/carldjohnston))
17
35
 
36
+ **Closed issues:**
37
+
38
+ - SSL Resource - Protocols Filter has wrong description [\#1620](https://github.com/chef/inspec/issues/1620)
39
+ - Inspec multi-server queries [\#1616](https://github.com/chef/inspec/issues/1616)
40
+
18
41
  **Merged pull requests:**
19
42
 
43
+ - Releasing v1.19.0 [\#1626](https://github.com/chef/inspec/pull/1626) ([adamleff](https://github.com/adamleff))
20
44
  - Fix protocols matcher text on ssl resource docs [\#1622](https://github.com/chef/inspec/pull/1622) ([adamleff](https://github.com/adamleff))
21
45
  - Replace Nokogiri with REXML in the JUnit formatter [\#1621](https://github.com/chef/inspec/pull/1621) ([adamleff](https://github.com/adamleff))
22
46
  - obvious fix in README.md [\#1619](https://github.com/chef/inspec/pull/1619) ([lucky-sideburn](https://github.com/lucky-sideburn))
47
+ - \[www\] Fixing rake www:release task [\#1611](https://github.com/chef/inspec/pull/1611) ([adamleff](https://github.com/adamleff))
48
+ - \[www\] Resurrect global message, promote ChefConf and NYC Meetup [\#1607](https://github.com/chef/inspec/pull/1607) ([adamleff](https://github.com/adamleff))
23
49
 
24
50
  ## [v1.18.0](https://github.com/chef/inspec/tree/v1.18.0) (2017-03-30)
25
51
  [Full Changelog](https://github.com/chef/inspec/compare/v1.17.0...v1.18.0)
@@ -36,13 +62,18 @@
36
62
 
37
63
  **Closed issues:**
38
64
 
65
+ - Cannot install on CentOS 7 [\#1609](https://github.com/chef/inspec/issues/1609)
39
66
  - port should be\_listening busted in 1.17.0? [\#1602](https://github.com/chef/inspec/issues/1602)
40
67
  - inspec fails to install on centos 7 [\#1597](https://github.com/chef/inspec/issues/1597)
68
+ - Invalid name argument error after upgrading Inspec [\#1588](https://github.com/chef/inspec/issues/1588)
69
+ - Fix-up www build processes due to Gemfile change [\#1586](https://github.com/chef/inspec/issues/1586)
41
70
  - inspec outputs full hash when testing ini style file option with \[header\] [\#1541](https://github.com/chef/inspec/issues/1541)
71
+ - inspec compliance upload fails on automate server [\#1360](https://github.com/chef/inspec/issues/1360)
42
72
  - Add JSON Schema validation [\#884](https://github.com/chef/inspec/issues/884)
43
73
 
44
74
  **Merged pull requests:**
45
75
 
76
+ - Release v1.18.0 [\#1610](https://github.com/chef/inspec/pull/1610) ([adamleff](https://github.com/adamleff))
46
77
  - Fix port resource for invalid IP address in netstat output [\#1603](https://github.com/chef/inspec/pull/1603) ([adamleff](https://github.com/adamleff))
47
78
  - Remove errant puts in inspec habitat CLI command [\#1601](https://github.com/chef/inspec/pull/1601) ([adamleff](https://github.com/adamleff))
48
79
  - Add docs for habitat CLI commands [\#1600](https://github.com/chef/inspec/pull/1600) ([adamleff](https://github.com/adamleff))
@@ -6,6 +6,10 @@ title: About the http Resource
6
6
 
7
7
  Use the `http` InSpec audit resource to test an http endpoint.
8
8
 
9
+ <p class="warning">Currently, this resource always executes on the host on which <code>inspec exec</code> is run, even if you use the <code>--target</code> option to remotely scan a different host.<br>
10
+ <br>
11
+ This will be corrected in a future version of InSpec. New InSpec releases are posted in the <a href="https://discourse.chef.io/c/chef-release" target="_blank">Release Announcements Category in Discourse</a>.</p>
12
+
9
13
  ## Syntax
10
14
 
11
15
  An `http` resource block declares the configuration settings to be tested:
@@ -48,6 +48,19 @@ or may be enclosed in a double-quoted string with an extra backslash as an escap
48
48
  "HKCU\\SOFTWARE\\path\\to\\key\\Themes"
49
49
 
50
50
 
51
+ <p class="warning">
52
+ Please make sure that you use backslashes instead of forward slashes. Forward slashes will not work for registry keys.
53
+ </p>
54
+
55
+ # The following will not work:
56
+ # describe registry_key('HKLM/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Full/1033') do
57
+ # its('Release') { should eq 378675 }
58
+ # end
59
+ # You should use:
60
+ describe registry_key('HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1033') do
61
+ its('Release') { should eq 378675 }
62
+ end
63
+
51
64
  ## Matchers
52
65
 
53
66
  This InSpec audit resource has the following matchers:
@@ -126,6 +139,17 @@ The `name` matcher tests the value for the specified registry setting:
126
139
 
127
140
  its('name') { should eq 'value' }
128
141
 
142
+
143
+ <p class="warning">
144
+ Any name with a dot will not work as expected: <code>its('explorer.exe') { should eq 'test' }</code>. This issue is tracked in <a href="https://github.com/chef/inspec/issues/1281">https://github.com/chef/inspec/issues/1281</a>
145
+ </p>
146
+
147
+ # instead of:
148
+ # its('explorer.exe') { should eq 'test' }
149
+ # use the following solution:
150
+ it { should have_property_value('explorer.exe', :string, 'test') }
151
+
152
+
129
153
  ## Examples
130
154
 
131
155
  The following examples show how to use this InSpec audit resource.
@@ -4,5 +4,5 @@
4
4
  # author: Christoph Hartmann
5
5
 
6
6
  module Inspec
7
- VERSION = '1.19.1'.freeze
7
+ VERSION = '1.19.2'.freeze
8
8
  end
@@ -63,15 +63,15 @@ module Inspec::Resources
63
63
  @options = {}
64
64
  if reg_key && reg_key.is_a?(Hash)
65
65
  @options = @options.merge!(reg_key)
66
+
66
67
  # generate registry_key if we do not have a regular expression
67
- @options[:path] = @options[:hive]
68
- # add optional key path
69
- @options[:path] += '\\' + @options[:key] if @options[:key]
68
+ @options[:path] = generate_registry_key_path_from_options
70
69
  @options[:name] ||= @options[:path]
71
70
  else
72
71
  @options[:name] = name
73
72
  @options[:path] = reg_key
74
73
  end
74
+
75
75
  return skip_resource 'The `registry_key` resource is not supported on your OS yet.' if !inspec.os.windows?
76
76
  end
77
77
 
@@ -165,7 +165,7 @@ module Inspec::Resources
165
165
  $properties
166
166
  }
167
167
  $path = '#{path}'
168
- InSpec-GetRegistryKey($path) | ConvertTo-Json
168
+ InSpec-GetRegistryKey($path) | ConvertTo-Json -Compress
169
169
  EOH
170
170
 
171
171
  cmd = inspec.powershell(script)
@@ -255,6 +255,20 @@ module Inspec::Resources
255
255
 
256
256
  options[symbol]
257
257
  end
258
+
259
+ def generate_registry_key_path_from_options
260
+ path = @options[:hive]
261
+ path += format_key_from_options
262
+
263
+ path
264
+ end
265
+
266
+ def format_key_from_options
267
+ key = @options[:key]
268
+ return '' unless key
269
+
270
+ key.start_with?('\\') ? key : "\\#{key}"
271
+ end
258
272
  end
259
273
 
260
274
  # for compatability with serverspec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.1
4
+ version: 1.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-04 00:00:00.000000000 Z
11
+ date: 2017-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train