inspec 1.42.3 → 1.43.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6253ad47423d8b2a7bfc56409b61d31c0065aa6e
4
- data.tar.gz: 7e3e02b74a6a6af95e62c09b62e949bf95eea242
3
+ metadata.gz: a4a6aec95f739ef20fa3418d47abd60a5ff8a48d
4
+ data.tar.gz: 48384f2eaf4146c12db4fd990751552d5070f1c8
5
5
  SHA512:
6
- metadata.gz: 85007c9bc4574c090be7315dc133d21a364afd72af9115ea470fe026aeed18443d50271523ce2ea64d5c729315a0f0dd4433b807b23f4285ce3b8a1537174274
7
- data.tar.gz: 8a1cc9ab25dd32116be49e3a05c67234040cb47d7db36629ff2fe38bfdb85684b3a9a9846900ea997054c8ac2ce140f4e27e0f4b5998980714382446e6d0a6de
6
+ metadata.gz: 3406d2fd4c9762d58f710d96a65c6805e1e61bb0c11e0d205bab6c77cdf0cac25ce68d244c095c2ccea0814595c579774629a1eaf635654aa45706be08fb7853
7
+ data.tar.gz: 4153ccfbbd14258b3bcb3e981abbc74dc15a2217ca0c4d7cecc9996c8e9839d32627512e62974e001292018e2f62d88f9d25b97f86fb7a5ccea63d5178c87bc0
@@ -1,37 +1,52 @@
1
1
  # Change Log
2
2
  <!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
3
- <!-- latest_release 1.42.3 -->
4
- ## [v1.42.3](https://github.com/chef/inspec/tree/v1.42.3) (2017-10-18)
3
+ <!-- latest_release 1.43.5 -->
4
+ ## [v1.43.5](https://github.com/chef/inspec/tree/v1.43.5) (2017-10-26)
5
5
 
6
6
  #### Enhancements
7
- - windows_hotfix resource: Replace WMI query with PowerShell cmdlet &quot;get-hotfix&quot; [#2252](https://github.com/chef/inspec/pull/2252) ([mattray](https://github.com/mattray))
7
+ - Add Chef Automate support to `inspec compliance login` [#2203](https://github.com/chef/inspec/pull/2203) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
8
8
  <!-- latest_release -->
9
9
 
10
- <!-- release_rollup since=1.41.0 -->
11
- ### Changes since 1.41.0 release
10
+ <!-- release_rollup since=1.42.3 -->
11
+ ### Changes since 1.42.3 release
12
12
 
13
- #### Merged Pull Requests
14
- - Squashed some unit test warnings [#2242](https://github.com/chef/inspec/pull/2242) ([username-is-already-taken2](https://github.com/username-is-already-taken2)) <!-- 1.41.9 -->
15
- - Fix documentation of `split` matcher [#2240](https://github.com/chef/inspec/pull/2240) ([eramoto](https://github.com/eramoto)) <!-- 1.41.4 -->
16
- - Update the profile tempate [#2238](https://github.com/chef/inspec/pull/2238) ([nathenharvey](https://github.com/nathenharvey)) <!-- 1.41.3 -->
13
+ #### Enhancements
14
+ - Add Chef Automate support to `inspec compliance login` [#2203](https://github.com/chef/inspec/pull/2203) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 1.43.5 -->
15
+ - Include ref when writing out inspec control objects [#2259](https://github.com/chef/inspec/pull/2259) ([arlimus](https://github.com/arlimus)) <!-- 1.43.2 -->
17
16
 
18
17
  #### Bug Fixes
19
- - Fix `only_if` behavior when used outside controls [#2216](https://github.com/chef/inspec/pull/2216) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 1.41.8 -->
20
- - Fix port ressource ss line parsing [#2243](https://github.com/chef/inspec/pull/2243) ([narkaTee](https://github.com/narkaTee)) <!-- 1.41.7 -->
21
- - Support PAX-formatted tar files, standardize file lists [#2225](https://github.com/chef/inspec/pull/2225) ([adamleff](https://github.com/adamleff)) <!-- 1.41.2 -->
22
- - Fix typo in error message in postgres resource [#2248](https://github.com/chef/inspec/pull/2248) ([rndmh3ro](https://github.com/rndmh3ro)) <!-- 1.42.2 -->
23
- - Resolve the weird encoding issue within inspec shell [#2234](https://github.com/chef/inspec/pull/2234) ([username-is-already-taken2](https://github.com/username-is-already-taken2)) <!-- 1.41.10 -->
18
+ - Fix regression when uploading compliance profiles [#2264](https://github.com/chef/inspec/pull/2264) ([jerryaldrichiii](https://github.com/jerryaldrichiii)) <!-- 1.43.1 -->
24
19
 
25
- #### Enhancements
26
- - windows_hotfix resource: Replace WMI query with PowerShell cmdlet &quot;get-hotfix&quot; [#2252](https://github.com/chef/inspec/pull/2252) ([mattray](https://github.com/mattray)) <!-- 1.42.3 -->
27
- - Extend Windows ACL matchers [#1744](https://github.com/chef/inspec/pull/1744) ([TheLonelyGhost](https://github.com/TheLonelyGhost)) <!-- 1.42.1 -->
28
- - Add inspec habitat profile setup command [#2239](https://github.com/chef/inspec/pull/2239) ([adamleff](https://github.com/adamleff)) <!-- 1.42.0 -->
29
- - Add missed &#39;html&#39; to &#39;format&#39; option explanation and arrange formatters in alphabetical order [#2244](https://github.com/chef/inspec/pull/2244) ([strangeman](https://github.com/strangeman)) <!-- 1.41.6 -->
30
- - Uses netstat to detect open ports on AIX [#2210](https://github.com/chef/inspec/pull/2210) ([cattywampus](https://github.com/cattywampus)) <!-- 1.41.1 -->
31
- - etc_fstab resource: properly namespace the resource, add nfs_file_systems documentation [#2190](https://github.com/chef/inspec/pull/2190) ([jburns12](https://github.com/jburns12)) <!-- 1.41.5 -->
20
+ #### New Resources
21
+ - cran resource: check for R module installation [#2255](https://github.com/chef/inspec/pull/2255) ([mgrobelin](https://github.com/mgrobelin)) <!-- 1.43.4 -->
22
+ - cpan resource: check for Perl module installation [#2254](https://github.com/chef/inspec/pull/2254) ([mgrobelin](https://github.com/mgrobelin)) <!-- 1.43.3 -->
23
+ - new resource: elasticsearch resource, test cluster/node state [#2261](https://github.com/chef/inspec/pull/2261) ([adamleff](https://github.com/adamleff)) <!-- 1.43.0 -->
32
24
  <!-- release_rollup -->
33
25
 
34
26
  <!-- latest_stable_release -->
27
+ ## [v1.42.3](https://github.com/chef/inspec/tree/v1.42.3) (2017-10-19)
28
+
29
+ #### Enhancements
30
+ - etc_fstab resource: properly namespace the resource, add nfs_file_systems documentation [#2190](https://github.com/chef/inspec/pull/2190) ([jburns12](https://github.com/jburns12))
31
+ - Uses netstat to detect open ports on AIX [#2210](https://github.com/chef/inspec/pull/2210) ([cattywampus](https://github.com/cattywampus))
32
+ - Add missed &#39;html&#39; to &#39;format&#39; option explanation and arrange formatters in alphabetical order [#2244](https://github.com/chef/inspec/pull/2244) ([strangeman](https://github.com/strangeman))
33
+ - Add inspec habitat profile setup command [#2239](https://github.com/chef/inspec/pull/2239) ([adamleff](https://github.com/adamleff))
34
+ - Extend Windows ACL matchers [#1744](https://github.com/chef/inspec/pull/1744) ([TheLonelyGhost](https://github.com/TheLonelyGhost))
35
+ - windows_hotfix resource: Replace WMI query with PowerShell cmdlet &quot;get-hotfix&quot; [#2252](https://github.com/chef/inspec/pull/2252) ([mattray](https://github.com/mattray))
36
+
37
+ #### Bug Fixes
38
+ - Resolve the weird encoding issue within inspec shell [#2234](https://github.com/chef/inspec/pull/2234) ([username-is-already-taken2](https://github.com/username-is-already-taken2))
39
+ - Fix typo in error message in postgres resource [#2248](https://github.com/chef/inspec/pull/2248) ([rndmh3ro](https://github.com/rndmh3ro))
40
+ - Support PAX-formatted tar files, standardize file lists [#2225](https://github.com/chef/inspec/pull/2225) ([adamleff](https://github.com/adamleff))
41
+ - Fix port ressource ss line parsing [#2243](https://github.com/chef/inspec/pull/2243) ([narkaTee](https://github.com/narkaTee))
42
+ - Fix `only_if` behavior when used outside controls [#2216](https://github.com/chef/inspec/pull/2216) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
43
+
44
+ #### Merged Pull Requests
45
+ - Update the profile tempate [#2238](https://github.com/chef/inspec/pull/2238) ([nathenharvey](https://github.com/nathenharvey))
46
+ - Fix documentation of `split` matcher [#2240](https://github.com/chef/inspec/pull/2240) ([eramoto](https://github.com/eramoto))
47
+ - Squashed some unit test warnings [#2242](https://github.com/chef/inspec/pull/2242) ([username-is-already-taken2](https://github.com/username-is-already-taken2))
48
+ <!-- latest_stable_release -->
49
+
35
50
  ## [v1.41.0](https://github.com/chef/inspec/tree/v1.41.0) (2017-10-09)
36
51
 
37
52
  #### Enhancements
@@ -47,7 +62,6 @@
47
62
  - Support symbol keys in ObjectTraverser [#2221](https://github.com/chef/inspec/pull/2221) ([adamleff](https://github.com/adamleff))
48
63
  - Fix loading profile files when executing multiple profiles [#2223](https://github.com/chef/inspec/pull/2223) ([adamleff](https://github.com/adamleff))
49
64
  - ssl resource: properly raise error when unable to determine if port is enabled [#2205](https://github.com/chef/inspec/pull/2205) ([jquick](https://github.com/jquick))
50
- <!-- latest_stable_release -->
51
65
 
52
66
  ## [v1.40.0](https://github.com/chef/inspec/tree/v1.40.0) (2017-09-28)
53
67
 
@@ -323,7 +323,7 @@ The tests in `example.rb` can now access this file:
323
323
  my_services = yaml(content: inspec.profile.file('services.yml')).params
324
324
 
325
325
  my_services.each do |s|
326
- describe service(s['name']) do
326
+ describe service(s['service_name']) do
327
327
  it { should be_running }
328
328
  end
329
329
 
@@ -0,0 +1,62 @@
1
+ ---
2
+ title: About the cpan Resource
3
+ ---
4
+
5
+ # cpan
6
+
7
+ Use the `cpan` InSpec audit resource to test Perl modules that are installed by system packages or the CPAN installer.
8
+
9
+ ## Syntax
10
+
11
+ A `cpan` resource block declares a package and (optionally) a package version:
12
+
13
+ describe cpan('package_name') do
14
+ it { should be_installed }
15
+ end
16
+
17
+ where
18
+
19
+ * `'package_name'` is the name of the package, such as `'DBD::Pg'`
20
+ * `be_installed` tests to see if the package described above is installed
21
+
22
+
23
+ ## Matchers
24
+
25
+ This InSpec audit resource has the following matchers:
26
+
27
+ ### be_installed
28
+
29
+ The `be_installed` matcher tests if the named package is installed on the system:
30
+
31
+ it { should be_installed }
32
+
33
+ ### version
34
+
35
+ The `version` matcher tests if the named package version is on the system:
36
+
37
+ its('version') { should eq '1.2.3' }
38
+
39
+ ## Examples
40
+
41
+ The following examples show how to use this InSpec audit resource.
42
+
43
+ ### Test if DBD::Pg is installed on the system
44
+
45
+ describe cpan('DBD:Pg') do
46
+ it { should be_installed }
47
+ end
48
+
49
+ ### Test if DBD::Pg 3.7.0 is installed on the system
50
+
51
+ describe cpan('DBD::Pg') do
52
+ it { should be_installed }
53
+ its('version') { should eq '3.7.0' }
54
+ end
55
+
56
+ ### Test if DBD::Pg is installed within a custom PERL5LIB path on the system
57
+
58
+ Hint: You can pass multiple path's separated by colon `/path/to/perl5/lib:/usr/share/perl5/vendor_perl/lib/perl5`
59
+
60
+ describe cpan('DBD::Pg', '/home/jdoe/perl5/lib/perl5') do
61
+ it { should be_installed }
62
+ end
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: About the cran Resource
3
+ ---
4
+
5
+ # cran
6
+
7
+ Use the `cran` InSpec audit resource to test R modules that are installed from CRAN package repository.
8
+
9
+ ## Syntax
10
+
11
+ A `cran` resource block declares a package and (optionally) a package version:
12
+
13
+ describe cran('package_name') do
14
+ it { should be_installed }
15
+ end
16
+
17
+ where
18
+
19
+ * `'package_name'` is the name of the package, such as `'DBI'`
20
+ * `be_installed` tests to see if the package described above is installed
21
+
22
+
23
+ ## Matchers
24
+
25
+ This InSpec audit resource has the following matchers:
26
+
27
+ ### be_installed
28
+
29
+ The `be_installed` matcher tests if the named package is installed on the system:
30
+
31
+ it { should be_installed }
32
+
33
+ ### version
34
+
35
+ The `version` matcher tests if the named package version is on the system:
36
+
37
+ its('version') { should eq '1.2.3' }
38
+
39
+ ## Examples
40
+
41
+ The following examples show how to use this InSpec audit resource.
42
+
43
+ ### Test if DBI is installed on the system
44
+
45
+ describe cran('DBI') do
46
+ it { should be_installed }
47
+ end
48
+
49
+ ### Test if DBI 0.5.1 is installed on the system
50
+
51
+ describe cran('DBI') do
52
+ it { should be_installed }
53
+ its('version') { should eq '0.5.1' }
54
+ end
@@ -0,0 +1,245 @@
1
+ ---
2
+ title: The Elasticsearch Resource
3
+ ---
4
+
5
+ # elasticsearch
6
+
7
+ The `elasticsearch` resource allows testing of a node status against a running
8
+ Elasticsearch cluster. InSpec will retrieve the node list from the cluster node URL
9
+ provided (defaults to `http://localhost:9200`) and provide the ability to query
10
+ a variety of settings and statuses.
11
+
12
+ ## Syntax
13
+
14
+ describe elasticsearch do
15
+ its('property') { should cmp 'value' }
16
+ end
17
+
18
+ The `elasticsearch` resource accepts a number of optional values:
19
+
20
+ * `url`: the top-level URL of an Elasticsearch node in the cluster. If your Elasticsearch installation is not served out of the top-level directory at the host, be sure to specific the full URL; for example: `http://my-load-balancer/elasticsearch`. Default: `http://localhost:9200`
21
+ * `username`: a username to use to log in with HTTP-Basic authentication. If `username` is provided, a `password` must also be provided.
22
+ * `password`: a password to use to log in with HTTP-Basic authentication. If `password` is provided, a `username` must also be provided.
23
+ * `ssl_verify`: if `false`, SSL certificate validation will be disabled. Default: `true`
24
+
25
+ In addition, the `elasticsearch` resource allows for filtering the nodes returned by property before executing the tests:
26
+
27
+ describe elasticsearch.where { node_name == 'one-off-node' } do
28
+ its('version') { should eq '1.2.3' }
29
+ end
30
+
31
+ describe elasticsearch.where { process.mlockall == false } do
32
+ its('count') { should cmp 0 }
33
+ end
34
+
35
+ To simply check if nodes exist that match the criteria, use the `exist` matcher:
36
+
37
+ describe elasticsearch.where { cluster_name == 'my_cluster' } do
38
+ it { should exist }
39
+ end
40
+
41
+ ## Supported Properties
42
+
43
+ The following properties are provided:
44
+
45
+ * build_hash
46
+ * cluster_name
47
+ * host
48
+ * http
49
+ * ingest
50
+ * ip
51
+ * jvm
52
+ * module_list
53
+ * modules
54
+ * node_name
55
+ * node_id
56
+ * os
57
+ * plugin_list
58
+ * plugins
59
+ * process
60
+ * roles
61
+ * settings
62
+ * total_indexing_buffer
63
+ * transport
64
+ * transport_address
65
+ * version
66
+
67
+ Since the `elasticsearch` resource is meant for use on a cluster, each property will return an array of the values for each node that matches any provided search criteria. Using InSpec's `cmp` matcher will help avoid any issues when trying to compare values for when a single match is returned (i.e. when the cluster only contains a single node, or the `where` filter criteria provided only returns a single node).
68
+
69
+ ## Property Examples
70
+
71
+ ### build_hash
72
+
73
+ Returns the build hash for each of the nodes.
74
+
75
+ describe elasticsearch do
76
+ its('build_hash') { should cmp 'b2f0c09' }
77
+ end
78
+
79
+ ### cluster_name
80
+
81
+ Returns the cluster names of each of the nodes.
82
+
83
+ describe elasticsearch do
84
+ its('cluster_name') { should cmp 'my_cluster' }
85
+ end
86
+
87
+ ### host
88
+
89
+ Returns the hostname of each of the nodes. This may return an IP address of the node is not properly performing DNS resolution or has no hostname set.
90
+
91
+ describe elasticsearch do
92
+ its('host') { should cmp 'my.hostname.mycompany.biz' }
93
+ end
94
+
95
+ ### http
96
+
97
+ Returns a hash of HTTP-related settings for each of the nodes. In this example, the `first` method is used to grab only the first node's HTTP-related info and is a way of removing the item from the Array if only one node is being queried.
98
+
99
+ describe elasticsearch do
100
+ its('http.first.max_content_length_in_bytes') { should cmp 123456 }
101
+ end
102
+
103
+ ### ingest
104
+
105
+ Returns ingest-related settings and capabilities, such as available processors.
106
+
107
+ describe elasticsearch do
108
+ its('ingest.first.processors.count') { should be >= 1 }
109
+ end
110
+
111
+ ### ip
112
+
113
+ Returns the IP address of each of the nodes.
114
+
115
+ describe elasticsearch do
116
+ its('ip') { should cmp '192.168.1.100' }
117
+ end
118
+
119
+ ### jvm
120
+
121
+ Returns Java Virtual Machine related parameters for each of the nodes.
122
+
123
+ describe elasticsearch do
124
+ its('jvm.first.version') { should cmp '1.8.0_141' }
125
+ end
126
+
127
+ ### module_list
128
+
129
+ Returns a list of enabled modules for each node in the cluster. For more additional information about each module, use the `modules` property.
130
+
131
+ describe elasticsearch do
132
+ its('module_list.first') { should include 'my_module' }
133
+ end
134
+
135
+ ### modules
136
+
137
+ Returns detailed information about each enabled module for each node in the cluster. For a succint list of the names of each of the modules enabled, use the `module_list` property. This example uses a bit of additional Ruby to find a specific module and assert a value.
138
+
139
+ modules = elasticsearch.modules.first
140
+ lang_groovy_module = modules.find { |mod| mod.name == 'lang-groovy' }
141
+
142
+ describe 'lang-groovy module version' do
143
+ subject { lang_groovy_module }
144
+ its('version') { should cmp '5.5.2' }
145
+ end
146
+
147
+ ### node_name
148
+
149
+ Returns the node name for each node in the cluster.
150
+
151
+ describe elasticsearch do
152
+ its('node_name') { should cmp 'node1' }
153
+ end
154
+
155
+ ### node_id
156
+
157
+ Returns the node IDs of each of the nodes in the cluster.
158
+
159
+ describe elasticsearch do
160
+ its('node_id') { should include 'my_node_id' }
161
+ end
162
+
163
+ ### os
164
+
165
+ Returns OS-related information about each node in the cluster.
166
+
167
+ describe elasticsearch do
168
+ its('os.first.arch') { should cmp 'amd64' }
169
+ end
170
+
171
+ ### plugin_list
172
+
173
+ Returns a list of enabled plugins for each node in the cluster. For more additional information about each plugin, use the `plugins` property.
174
+
175
+ describe elasticsearch do
176
+ its('plugin_list.first') { should include 'my_plugin' }
177
+ end
178
+
179
+ ### plugins
180
+
181
+ Returns detailed information about each enabled plugin for each node in the cluster. For a succint list of the names of each of the plugins enabled, use the `plugin_list` property. This example uses a bit of additional Ruby to find a specific plugin and assert a value.
182
+
183
+ plugins = elasticsearch.plugins.first
184
+ my_plugin = plugins.find { |plugin| plugin.name == 'my_plugin' }
185
+
186
+ describe 'my_plugin plugin version' do
187
+ subject { my_plugin }
188
+ its('version') { should cmp '1.2.3' }
189
+ end
190
+
191
+ ### process
192
+
193
+ Returns process information for each node in the cluster, such as the process ID.
194
+
195
+ describe elasticsearch do
196
+ its('process.first.mlockall') { should cmp true }
197
+ end
198
+
199
+ ### roles
200
+
201
+ Returns the role for each of the nodes in the cluster.
202
+
203
+ describe elasticsearch.where { node_name == 'my_master_node' } do
204
+ it { should include 'master' }
205
+ end
206
+
207
+ ### settings
208
+
209
+ Returns all the configuration settings for each node in the cluster. These settings usually include those set in the elasticsearch.yml as well as those set via `-Des.` or `-E` flags at startup. Use the `inspec shell` to explore the various setting keys that are available.
210
+
211
+ describe elasticsearch do
212
+ its('settings.first.path.home') { should cmp '/usr/share/elasticsearch' }
213
+ end
214
+
215
+ ### total_indexing_buffer
216
+
217
+ Returns the total indexing buffer for each node in the cluster.
218
+
219
+ describe elasticsearch do
220
+ its('total_indexing_buffer') { should cmp 123456 }
221
+ end
222
+
223
+ ### transport
224
+
225
+ Returns transport-related settings for each node in the cluster, such as the bound and published addresses.
226
+
227
+ describe elasticsearch do
228
+ its('transport.first.bound_address') { should cmp '1.2.3.4:9200' }
229
+ end
230
+
231
+ ### transport_address
232
+
233
+ Returns the bound transport address for each node in the cluster.
234
+
235
+ describe elasticsearch do
236
+ its('transport_address') { should cmp '1.2.3.4:9200' }
237
+ end
238
+
239
+ ### version
240
+
241
+ Returns the version of Elasticsearch running on each node of the cluster.
242
+
243
+ describe elasticsearch do
244
+ its('version') { should cmp '5.5.2' }
245
+ end