inspec 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -2
- data/MAINTAINERS.md +2 -1
- data/MAINTAINERS.toml +9 -4
- data/lib/inspec/version.rb +1 -1
- data/lib/resources/.ssh_conf.rb.swp +0 -0
- data/lib/resources/packages.rb +16 -14
- data/lib/resources/users.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c359edd56805488af68139d6281b72e60991ee5
|
4
|
+
data.tar.gz: c06f8586568f4e29cb9b86f5a0b96b8ef58054f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f2d5d72a3e088374e6bd1186453d3d0302827289b10229f0ce736fbf91f3e65c8e5baf6f5cc1856bedf36e97f3f17a37d43a00ac23ac54be4ca3b04abe4c44
|
7
|
+
data.tar.gz: a91488295b33e93b04669a29166f32923305361dca7e455a8908787549ee9dbd16ac3f395ed22ad76762ea983a5556c03ee3badd1409f009d2b6c55bf5b50983
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [1.14.
|
4
|
-
[Full Changelog](https://github.com/chef/inspec/compare/v1.
|
3
|
+
## [1.14.1](https://github.com/chef/inspec/tree/1.14.1) (2017-02-10)
|
4
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.14.0...1.14.1)
|
5
|
+
|
6
|
+
**Closed issues:**
|
7
|
+
|
8
|
+
- go /profiles service modifications [\#1483](https://github.com/chef/inspec/issues/1483)
|
9
|
+
- inspec compliance login\* should support a hostname for the SERVER argument [\#1473](https://github.com/chef/inspec/issues/1473)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Skip packages resource for unsupported OS [\#1484](https://github.com/chef/inspec/pull/1484) ([alexpop](https://github.com/alexpop))
|
14
|
+
- add Alex Pop to the list of maintainers [\#1481](https://github.com/chef/inspec/pull/1481) ([arlimus](https://github.com/arlimus))
|
15
|
+
- remove Jason Reed from the list of maintainers [\#1480](https://github.com/chef/inspec/pull/1480) ([arlimus](https://github.com/arlimus))
|
16
|
+
- Add Adam Leff as a maintainer [\#1479](https://github.com/chef/inspec/pull/1479) ([adamleff](https://github.com/adamleff))
|
17
|
+
|
18
|
+
## [v1.14.0](https://github.com/chef/inspec/tree/v1.14.0) (2017-02-08)
|
19
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.13.0...v1.14.0)
|
5
20
|
|
6
21
|
**Fixed bugs:**
|
7
22
|
|
data/MAINTAINERS.md
CHANGED
data/MAINTAINERS.toml
CHANGED
@@ -25,7 +25,8 @@ project lead.
|
|
25
25
|
|
26
26
|
maintainers = [
|
27
27
|
"chris-rock",
|
28
|
-
"
|
28
|
+
"adamleff",
|
29
|
+
"alexpop"
|
29
30
|
]
|
30
31
|
|
31
32
|
[people]
|
@@ -37,6 +38,10 @@ project lead.
|
|
37
38
|
Name = "Christoph Hartmann"
|
38
39
|
GitHub = "chris-rock"
|
39
40
|
|
40
|
-
[people.
|
41
|
-
Name = "
|
42
|
-
GitHub = "
|
41
|
+
[people.adamleff]
|
42
|
+
Name = "Adam Leff"
|
43
|
+
GitHub = "adamleff"
|
44
|
+
|
45
|
+
[people.alexpop]
|
46
|
+
Name = "Alex Pop"
|
47
|
+
GitHub = "alexpop"
|
data/lib/inspec/version.rb
CHANGED
Binary file
|
data/lib/resources/packages.rb
CHANGED
@@ -23,10 +23,14 @@ module Inspec::Resources
|
|
23
23
|
"
|
24
24
|
|
25
25
|
def initialize(pattern)
|
26
|
+
@command = packages_command
|
27
|
+
|
28
|
+
return skip_resource "The packages resource is not yet supported on OS #{inspec.os.name}" unless @command
|
29
|
+
|
26
30
|
@pattern = pattern_regexp(pattern)
|
27
|
-
all_pkgs =
|
31
|
+
all_pkgs = build_package_list(@command)
|
28
32
|
@list = all_pkgs.find_all do |hm|
|
29
|
-
hm[:name] =~
|
33
|
+
hm[:name] =~ @pattern
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
@@ -44,31 +48,29 @@ module Inspec::Resources
|
|
44
48
|
|
45
49
|
private
|
46
50
|
|
51
|
+
def packages_command
|
52
|
+
os = inspec.os
|
53
|
+
if os.debian?
|
54
|
+
command = "dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version}\\n'"
|
55
|
+
end
|
56
|
+
command
|
57
|
+
end
|
58
|
+
|
47
59
|
def pattern_regexp(p)
|
48
60
|
if p.class == String
|
49
61
|
Regexp.new(Regexp.escape(p))
|
50
62
|
elsif p.class == Regexp
|
51
63
|
p
|
52
64
|
else
|
53
|
-
raise '
|
65
|
+
raise 'Invalid name argument to packages resource, please use a "string" or /regexp/'
|
54
66
|
end
|
55
67
|
end
|
56
68
|
|
57
69
|
def filtered_packages
|
70
|
+
warn "The packages resource is not yet supported on OS #{inspec.os.name}" unless @command
|
58
71
|
@list
|
59
72
|
end
|
60
73
|
|
61
|
-
def package_list
|
62
|
-
os = inspec.os
|
63
|
-
|
64
|
-
if os.debian?
|
65
|
-
command = "dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version}\\n'"
|
66
|
-
else
|
67
|
-
raise "packages resource is not yet supported on #{os.name}"
|
68
|
-
end
|
69
|
-
build_package_list(command)
|
70
|
-
end
|
71
|
-
|
72
74
|
Package = Struct.new(:status, :name, :version)
|
73
75
|
|
74
76
|
def build_package_list(command)
|
data/lib/resources/users.rb
CHANGED
@@ -57,7 +57,7 @@ module Inspec::Resources
|
|
57
57
|
name 'users'
|
58
58
|
desc 'Use the users InSpec audit resource to test local user profiles. Users can be filtered by groups to which they belong, the frequency of required password changes, the directory paths to home and shell.'
|
59
59
|
example "
|
60
|
-
describe users.where
|
60
|
+
describe users.where { uid == 0 }.entries do
|
61
61
|
it { should eq ['root'] }
|
62
62
|
its('uids') { should eq [1234] }
|
63
63
|
its('gids') { should eq [1234] }
|
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.14.
|
4
|
+
version: 1.14.1
|
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-02-
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train
|
@@ -474,6 +474,7 @@ files:
|
|
474
474
|
- lib/inspec/source_reader.rb
|
475
475
|
- lib/inspec/version.rb
|
476
476
|
- lib/matchers/matchers.rb
|
477
|
+
- lib/resources/.ssh_conf.rb.swp
|
477
478
|
- lib/resources/apache.rb
|
478
479
|
- lib/resources/apache_conf.rb
|
479
480
|
- lib/resources/apt.rb
|