inspec 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.rubocop.yml +65 -0
  4. data/.travis.yml +23 -0
  5. data/CHANGELOG.md +38 -0
  6. data/Gemfile +33 -0
  7. data/LICENSE +201 -0
  8. data/MAINTAINERS.md +28 -0
  9. data/MAINTAINERS.toml +42 -0
  10. data/README.md +257 -0
  11. data/Rakefile +47 -0
  12. data/bin/inspec +109 -0
  13. data/docs/ctl_inspec.rst +195 -0
  14. data/docs/dsl_inspec.rst +182 -0
  15. data/docs/readme.rst +100 -0
  16. data/docs/resources.rst +4319 -0
  17. data/docs/template.rst +51 -0
  18. data/examples/test-kitchen/.kitchen.yml +20 -0
  19. data/examples/test-kitchen/Berksfile +3 -0
  20. data/examples/test-kitchen/Gemfile +21 -0
  21. data/examples/test-kitchen/README.md +27 -0
  22. data/examples/test-kitchen/metadata.rb +7 -0
  23. data/examples/test-kitchen/recipes/default.rb +6 -0
  24. data/examples/test-kitchen/recipes/nginx.rb +30 -0
  25. data/examples/test-kitchen/test/integration/default/web_spec.rb +28 -0
  26. data/inspec.gemspec +30 -0
  27. data/lib/inspec.rb +20 -0
  28. data/lib/inspec/backend.rb +42 -0
  29. data/lib/inspec/dsl.rb +151 -0
  30. data/lib/inspec/log.rb +34 -0
  31. data/lib/inspec/metadata.rb +79 -0
  32. data/lib/inspec/plugins.rb +9 -0
  33. data/lib/inspec/plugins/resource.rb +62 -0
  34. data/lib/inspec/profile.rb +138 -0
  35. data/lib/inspec/profile_context.rb +170 -0
  36. data/lib/inspec/resource.rb +76 -0
  37. data/lib/inspec/rspec_json_formatter.rb +27 -0
  38. data/lib/inspec/rule.rb +170 -0
  39. data/lib/inspec/runner.rb +154 -0
  40. data/lib/inspec/shell.rb +66 -0
  41. data/lib/inspec/targets.rb +9 -0
  42. data/lib/inspec/targets/core.rb +27 -0
  43. data/lib/inspec/targets/dir.rb +67 -0
  44. data/lib/inspec/targets/file.rb +29 -0
  45. data/lib/inspec/targets/folder.rb +43 -0
  46. data/lib/inspec/targets/tar.rb +34 -0
  47. data/lib/inspec/targets/url.rb +39 -0
  48. data/lib/inspec/targets/zip.rb +47 -0
  49. data/lib/inspec/version.rb +7 -0
  50. data/lib/matchers/matchers.rb +221 -0
  51. data/lib/resources/apache.rb +29 -0
  52. data/lib/resources/apache_conf.rb +113 -0
  53. data/lib/resources/apt.rb +140 -0
  54. data/lib/resources/audit_policy.rb +63 -0
  55. data/lib/resources/auditd_conf.rb +56 -0
  56. data/lib/resources/auditd_rules.rb +53 -0
  57. data/lib/resources/bond.rb +65 -0
  58. data/lib/resources/bridge.rb +114 -0
  59. data/lib/resources/command.rb +57 -0
  60. data/lib/resources/csv.rb +32 -0
  61. data/lib/resources/directory.rb +15 -0
  62. data/lib/resources/etc_group.rb +150 -0
  63. data/lib/resources/file.rb +110 -0
  64. data/lib/resources/gem.rb +46 -0
  65. data/lib/resources/group.rb +132 -0
  66. data/lib/resources/host.rb +143 -0
  67. data/lib/resources/inetd_conf.rb +56 -0
  68. data/lib/resources/interface.rb +127 -0
  69. data/lib/resources/iptables.rb +65 -0
  70. data/lib/resources/json.rb +64 -0
  71. data/lib/resources/kernel_module.rb +40 -0
  72. data/lib/resources/kernel_parameter.rb +55 -0
  73. data/lib/resources/limits_conf.rb +55 -0
  74. data/lib/resources/login_def.rb +60 -0
  75. data/lib/resources/mysql.rb +81 -0
  76. data/lib/resources/mysql_conf.rb +116 -0
  77. data/lib/resources/mysql_session.rb +52 -0
  78. data/lib/resources/npm.rb +44 -0
  79. data/lib/resources/ntp_conf.rb +58 -0
  80. data/lib/resources/oneget.rb +63 -0
  81. data/lib/resources/os.rb +22 -0
  82. data/lib/resources/os_env.rb +34 -0
  83. data/lib/resources/package.rb +169 -0
  84. data/lib/resources/parse_config.rb +75 -0
  85. data/lib/resources/passwd.rb +93 -0
  86. data/lib/resources/pip.rb +75 -0
  87. data/lib/resources/port.rb +296 -0
  88. data/lib/resources/postgres.rb +37 -0
  89. data/lib/resources/postgres_conf.rb +87 -0
  90. data/lib/resources/postgres_session.rb +59 -0
  91. data/lib/resources/processes.rb +57 -0
  92. data/lib/resources/registry_key.rb +54 -0
  93. data/lib/resources/script.rb +34 -0
  94. data/lib/resources/security_policy.rb +73 -0
  95. data/lib/resources/service.rb +379 -0
  96. data/lib/resources/ssh_conf.rb +75 -0
  97. data/lib/resources/user.rb +374 -0
  98. data/lib/resources/windows_feature.rb +77 -0
  99. data/lib/resources/yaml.rb +23 -0
  100. data/lib/resources/yum.rb +154 -0
  101. data/lib/utils/convert.rb +12 -0
  102. data/lib/utils/detect.rb +15 -0
  103. data/lib/utils/find_files.rb +36 -0
  104. data/lib/utils/hash.rb +13 -0
  105. data/lib/utils/modulator.rb +12 -0
  106. data/lib/utils/parser.rb +61 -0
  107. data/lib/utils/simpleconfig.rb +115 -0
  108. data/tasks/maintainers.rb +213 -0
  109. data/test/docker_run.rb +156 -0
  110. data/test/docker_test.rb +51 -0
  111. data/test/helper.rb +200 -0
  112. data/test/integration/.kitchen.yml +42 -0
  113. data/test/integration/Berksfile +4 -0
  114. data/test/integration/cookbooks/os_prepare/metadata.rb +8 -0
  115. data/test/integration/cookbooks/os_prepare/recipes/apt.rb +20 -0
  116. data/test/integration/cookbooks/os_prepare/recipes/default.rb +9 -0
  117. data/test/integration/cookbooks/os_prepare/recipes/file.rb +21 -0
  118. data/test/integration/cookbooks/os_prepare/recipes/package.rb +26 -0
  119. data/test/integration/default/_debug_spec.rb +1 -0
  120. data/test/integration/default/apt_spec.rb +42 -0
  121. data/test/integration/default/file_spec.rb +109 -0
  122. data/test/integration/default/group_spec.rb +32 -0
  123. data/test/integration/default/kernel_module_spec.rb +17 -0
  124. data/test/integration/default/kernel_parameter_spec.rb +56 -0
  125. data/test/integration/default/package_spec.rb +11 -0
  126. data/test/integration/default/service_spec.rb +28 -0
  127. data/test/integration/default/user_spec.rb +44 -0
  128. data/test/resource/command_test.rb +33 -0
  129. data/test/resource/dsl_test.rb +45 -0
  130. data/test/resource/file_test.rb +130 -0
  131. data/test/resource/ssh_config.rb +9 -0
  132. data/test/resource/sshd_config.rb +9 -0
  133. data/test/test-extra.yaml +11 -0
  134. data/test/test.yaml +11 -0
  135. data/test/unit/mock/cmd/Get-NetAdapter +24 -0
  136. data/test/unit/mock/cmd/GetUserAccount +33 -0
  137. data/test/unit/mock/cmd/GetWin32Group +23 -0
  138. data/test/unit/mock/cmd/PATH +1 -0
  139. data/test/unit/mock/cmd/Resolve-DnsName +26 -0
  140. data/test/unit/mock/cmd/Test-NetConnection +4 -0
  141. data/test/unit/mock/cmd/auditctl +7 -0
  142. data/test/unit/mock/cmd/auditpol +2 -0
  143. data/test/unit/mock/cmd/brew-info-jq +1 -0
  144. data/test/unit/mock/cmd/chage-l-root +7 -0
  145. data/test/unit/mock/cmd/dpkg-s-curl +21 -0
  146. data/test/unit/mock/cmd/dscl +5 -0
  147. data/test/unit/mock/cmd/etc-apt +7 -0
  148. data/test/unit/mock/cmd/find-etc-rc-d-name-S +12 -0
  149. data/test/unit/mock/cmd/find-net-interface +9 -0
  150. data/test/unit/mock/cmd/gem-list-local-a-q-rubocop +1 -0
  151. data/test/unit/mock/cmd/get-net-tcpconnection +24 -0
  152. data/test/unit/mock/cmd/get-netadapter-binding-bridge +4 -0
  153. data/test/unit/mock/cmd/get-package-firefox +30 -0
  154. data/test/unit/mock/cmd/get-package-ruby +18 -0
  155. data/test/unit/mock/cmd/get-service-dhcp +10 -0
  156. data/test/unit/mock/cmd/get-windows-feature +7 -0
  157. data/test/unit/mock/cmd/getent-hosts-example.com +1 -0
  158. data/test/unit/mock/cmd/getent-passwd-root +1 -0
  159. data/test/unit/mock/cmd/id-chartmann +1 -0
  160. data/test/unit/mock/cmd/id-root +1 -0
  161. data/test/unit/mock/cmd/initctl-show-config-ssh +3 -0
  162. data/test/unit/mock/cmd/initctl-status-ssh +1 -0
  163. data/test/unit/mock/cmd/iptables-s +6 -0
  164. data/test/unit/mock/cmd/launchctl-list +3 -0
  165. data/test/unit/mock/cmd/ls-1-etc-init.d +2 -0
  166. data/test/unit/mock/cmd/ls-sys-class-net-br +2 -0
  167. data/test/unit/mock/cmd/lsmod +2 -0
  168. data/test/unit/mock/cmd/lsof-np-itcp +4 -0
  169. data/test/unit/mock/cmd/netstat-tulpen +5 -0
  170. data/test/unit/mock/cmd/npm-ls-g--json-bower +9 -0
  171. data/test/unit/mock/cmd/pacman-qi-curl +21 -0
  172. data/test/unit/mock/cmd/ping-example.com +6 -0
  173. data/test/unit/mock/cmd/pip-show-jinja2 +11 -0
  174. data/test/unit/mock/cmd/ps-aux +3 -0
  175. data/test/unit/mock/cmd/pw-usershow-root-7 +1 -0
  176. data/test/unit/mock/cmd/reg_schedule +1 -0
  177. data/test/unit/mock/cmd/rpm-qia-curl +24 -0
  178. data/test/unit/mock/cmd/sbin_sysctl +1 -0
  179. data/test/unit/mock/cmd/secedit-export +7 -0
  180. data/test/unit/mock/cmd/service-e +2 -0
  181. data/test/unit/mock/cmd/service-sendmail-onestatus +3 -0
  182. data/test/unit/mock/cmd/service-sshd-status +1 -0
  183. data/test/unit/mock/cmd/sockstat +5 -0
  184. data/test/unit/mock/cmd/success +0 -0
  185. data/test/unit/mock/cmd/systemctl-show-all-sshd +6 -0
  186. data/test/unit/mock/cmd/win32_product +8 -0
  187. data/test/unit/mock/cmd/yum-repolist-all +52 -0
  188. data/test/unit/mock/files/auditd.conf +4 -0
  189. data/test/unit/mock/files/bond0 +37 -0
  190. data/test/unit/mock/files/etcgroup +3 -0
  191. data/test/unit/mock/files/example.csv +6 -0
  192. data/test/unit/mock/files/inetd.conf +2 -0
  193. data/test/unit/mock/files/kitchen.yml +7 -0
  194. data/test/unit/mock/files/limits.conf +5 -0
  195. data/test/unit/mock/files/login.defs +5 -0
  196. data/test/unit/mock/files/mysql.conf +8 -0
  197. data/test/unit/mock/files/mysql2.conf +2 -0
  198. data/test/unit/mock/files/ntp.conf +5 -0
  199. data/test/unit/mock/files/passwd +2 -0
  200. data/test/unit/mock/files/policyfile.lock.json +12 -0
  201. data/test/unit/mock/files/ssh_config +5 -0
  202. data/test/unit/mock/files/sshd_config +7 -0
  203. data/test/unit/mock/profiles/empty/metadata.rb +0 -0
  204. data/test/unit/mock/profiles/metadata/metadata.rb +1 -0
  205. data/test/unit/profile_context_test.rb +140 -0
  206. data/test/unit/profile_test.rb +49 -0
  207. data/test/unit/resources/apt_test.rb +46 -0
  208. data/test/unit/resources/audit_policy_test.rb +13 -0
  209. data/test/unit/resources/auditd_conf_test.rb +15 -0
  210. data/test/unit/resources/auditd_rules_test.rb +21 -0
  211. data/test/unit/resources/bond_test.rb +24 -0
  212. data/test/unit/resources/bridge_test.rb +56 -0
  213. data/test/unit/resources/csv_test.rb +35 -0
  214. data/test/unit/resources/etc_group_test.rb +37 -0
  215. data/test/unit/resources/gem_test.rb +20 -0
  216. data/test/unit/resources/group_test.rb +96 -0
  217. data/test/unit/resources/host_test.rb +38 -0
  218. data/test/unit/resources/inetd_conf_test.rb +15 -0
  219. data/test/unit/resources/interface_test.rb +54 -0
  220. data/test/unit/resources/iptables_test.rb +30 -0
  221. data/test/unit/resources/json_test.rb +36 -0
  222. data/test/unit/resources/kernel_module_test.rb +23 -0
  223. data/test/unit/resources/kernel_parameter_test.rb +13 -0
  224. data/test/unit/resources/limits_conf_test.rb +14 -0
  225. data/test/unit/resources/login_def_test.rb +16 -0
  226. data/test/unit/resources/mysql_conf_test.rb +14 -0
  227. data/test/unit/resources/npm_test.rb +20 -0
  228. data/test/unit/resources/ntp_conf_test.rb +16 -0
  229. data/test/unit/resources/oneget_test.rb +45 -0
  230. data/test/unit/resources/os_env_test.rb +13 -0
  231. data/test/unit/resources/package_test.rb +51 -0
  232. data/test/unit/resources/passwd_test.rb +24 -0
  233. data/test/unit/resources/pip_test.rb +15 -0
  234. data/test/unit/resources/port_test.rb +46 -0
  235. data/test/unit/resources/processes_test.rb +32 -0
  236. data/test/unit/resources/registry_key_test.rb +19 -0
  237. data/test/unit/resources/script_test.rb +19 -0
  238. data/test/unit/resources/security_policy_test.rb +16 -0
  239. data/test/unit/resources/service_test.rb +116 -0
  240. data/test/unit/resources/ssh_conf_test.rb +33 -0
  241. data/test/unit/resources/user_test.rb +93 -0
  242. data/test/unit/resources/windows_feature.rb +17 -0
  243. data/test/unit/resources/yaml_test.rb +34 -0
  244. data/test/unit/resources/yum_test.rb +68 -0
  245. data/test/unit/simpleconfig_test.rb +80 -0
  246. data/test/unit/utils/content_parser_test.rb +30 -0
  247. metadata +555 -0
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+ # author: Christoph Hartmann
3
+ # author: Dominik Richter
4
+
5
+ require 'helper'
6
+ require 'inspec/resource'
7
+
8
+ describe 'Inspec::Resources::SshConf' do
9
+
10
+ describe 'ssh_config' do
11
+ it 'check ssh config parsing' do
12
+ resource = load_resource('ssh_config')
13
+ _(resource.Host).must_equal '*'
14
+ _(resource.Tunnel).must_equal nil
15
+ _(resource.SendEnv).must_equal 'LANG LC_*'
16
+ _(resource.HashKnownHosts).must_equal 'yes'
17
+ end
18
+ end
19
+
20
+ describe 'sshd_config' do
21
+ it 'check protocol version' do
22
+ resource = load_resource('sshd_config')
23
+ _(resource.Port).must_equal '22'
24
+ _(resource.UsePAM).must_equal 'yes'
25
+ _(resource.ListenAddress).must_equal nil
26
+ _(resource.HostKey).must_equal [
27
+ '/etc/ssh/ssh_host_rsa_key',
28
+ '/etc/ssh/ssh_host_dsa_key',
29
+ '/etc/ssh/ssh_host_ecdsa_key',
30
+ ]
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,93 @@
1
+ # encoding: utf-8
2
+ # author: Christoph Hartmann
3
+ # author: Dominik Richter
4
+
5
+ require 'helper'
6
+ require 'inspec/resource'
7
+
8
+ describe 'Inspec::Resources::User' do
9
+
10
+ # ubuntu 14.04 with upstart
11
+ it 'read user on ubuntu' do
12
+ resource = MockLoader.new(:ubuntu1404).load_resource('user', 'root')
13
+ _(resource.exists?).must_equal true
14
+ _(resource.group).must_equal 'root'
15
+ _(resource.groups).must_equal ['root']
16
+ _(resource.home).must_equal '/root'
17
+ _(resource.shell).must_equal '/bin/bash'
18
+ _(resource.mindays).must_equal 0
19
+ _(resource.maxdays).must_equal 99999
20
+ _(resource.warndays).must_equal 7
21
+ end
22
+
23
+ # serverspec compatibility tests (do not test matcher)
24
+ it 'verify serverspec compatibility' do
25
+ resource = MockLoader.new(:ubuntu1404).load_resource('user', 'root')
26
+ _(resource.has_uid?(0)).must_equal true
27
+ _(resource.has_home_directory?('/root')).must_equal true
28
+ _(resource.has_login_shell?('/bin/bash')).must_equal true
29
+ _(resource.minimum_days_between_password_change).must_equal 0
30
+ _(resource.maximum_days_between_password_change).must_equal 99999
31
+ # _(resource.has_authorized_key?('abc')).must_equal true
32
+ end
33
+
34
+ it 'read user on centos7' do
35
+ resource = MockLoader.new(:centos7).load_resource('user', 'root')
36
+ _(resource.exists?).must_equal true
37
+ _(resource.group).must_equal 'root'
38
+ _(resource.groups).must_equal ['root']
39
+ _(resource.home).must_equal '/root'
40
+ _(resource.shell).must_equal '/bin/bash'
41
+ _(resource.mindays).must_equal 0
42
+ _(resource.maxdays).must_equal 99999
43
+ _(resource.warndays).must_equal 7
44
+ end
45
+
46
+ it 'read user on freebsd' do
47
+ resource = MockLoader.new(:freebsd10).load_resource('user', 'root')
48
+ _(resource.exists?).must_equal true
49
+ _(resource.group).must_equal 'root'
50
+ _(resource.groups).must_equal ['root']
51
+ _(resource.home).must_equal '/root'
52
+ _(resource.shell).must_equal '/bin/csh'
53
+ _(resource.mindays).must_equal nil
54
+ _(resource.maxdays).must_equal nil
55
+ _(resource.warndays).must_equal nil
56
+ end
57
+
58
+ it 'read user on OSX' do
59
+ resource = MockLoader.new(:osx104).load_resource('user', 'chartmann')
60
+ _(resource.exists?).must_equal true
61
+ _(resource.group).must_equal 'staff'
62
+ _(resource.groups).must_equal ['staff', 'com.apple.sharepoint.group.1', 'everyone']
63
+ _(resource.home).must_equal '/Users/chartmann'
64
+ _(resource.shell).must_equal '/bin/zsh'
65
+ _(resource.mindays).must_equal nil
66
+ _(resource.maxdays).must_equal nil
67
+ _(resource.warndays).must_equal nil
68
+ end
69
+
70
+ it 'read user on Windows' do
71
+ resource = MockLoader.new(:windows).load_resource('user', 'example/Administrator')
72
+ _(resource.exists?).must_equal true
73
+ _(resource.group).must_equal nil
74
+ _(resource.groups).must_equal ['WIN-K0AKLED332V\\Administrators', 'EXAMPLE\\Domain Admins']
75
+ _(resource.home).must_equal nil
76
+ _(resource.shell).must_equal nil
77
+ _(resource.mindays).must_equal nil
78
+ _(resource.maxdays).must_equal nil
79
+ _(resource.warndays).must_equal nil
80
+ end
81
+
82
+ it 'read user on undefined os' do
83
+ resource = MockLoader.new(:undefined).load_resource('user', 'example/Administrator')
84
+ _(resource.exists?).must_equal false
85
+ _(resource.group).must_equal nil
86
+ _(resource.groups).must_equal nil
87
+ _(resource.home).must_equal nil
88
+ _(resource.shell).must_equal nil
89
+ _(resource.mindays).must_equal nil
90
+ _(resource.maxdays).must_equal nil
91
+ _(resource.warndays).must_equal nil
92
+ end
93
+ end
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ # author: Christoph Hartmann
3
+ # author: Dominik Richter
4
+
5
+ require 'helper'
6
+ require 'inspec/resource'
7
+
8
+ describe 'Inspec::Resources::Feature' do
9
+ describe 'feature' do
10
+ it 'verify windows feature parsing' do
11
+ resource = MockLoader.new(:windows).load_resource('windows_feature', 'dhcp')
12
+ pkg = { name: 'DHCP', description: 'Dynamic Host Configuration Protocol (DHCP) Server enables you to centrally configure, manage, and provide temporary IP addresses and related information for client computers.', installed: false, type: 'windows-feature' }
13
+ _(resource.info).must_equal pkg
14
+ _(resource.installed?).must_equal false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+
3
+ require 'helper'
4
+ require 'inspec/resource'
5
+
6
+ describe 'Inspec::Resources::YAML' do
7
+ describe 'when loading a valid yaml' do
8
+ let (:resource) { load_resource('yaml', 'kitchen.yml') }
9
+
10
+ it 'gets params as a hashmap' do
11
+ _(resource.params).must_be_kind_of Hash
12
+ end
13
+
14
+ it 'retrieves nil if a param is missing' do
15
+ _(resource.params['missing']).must_be_nil
16
+ end
17
+
18
+ it 'retrieves params by name' do
19
+ _(resource.send('name')).must_equal 'vagrant'
20
+ end
21
+
22
+ it 'retrieves an array by name' do
23
+ _(resource.send('platforms')).must_equal %w{linux mac}
24
+ end
25
+
26
+ it 'doesnt resolve dot-notation names' do
27
+ _(resource.send('driver.customize.memory')).must_be_nil
28
+ end
29
+
30
+ it 'doesnt resolve symbol-notation names' do
31
+ _(resource.send(:'driver.customize.memory')).must_be_nil
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # author: Christoph Hartmann
3
+ # author: Dominik Richter
4
+
5
+ require 'helper'
6
+ require 'inspec/resource'
7
+
8
+ describe 'Inspec::Resources::YumRepo' do
9
+ it 'get repository details' do
10
+ resource = MockLoader.new(:centos7).load_resource('yum')
11
+ _(resource.repositories).must_equal [{
12
+ 'id'=>'base/7/x86_64',
13
+ 'name'=>'CentOS-7 - Base',
14
+ 'status'=>'enabled',
15
+ 'revision'=>'1427842153',
16
+ 'updated'=>'Tue Mar 31 22:50:46 2015',
17
+ 'pkgs'=>'8652',
18
+ 'size'=>'6.3 G',
19
+ 'mirrors'=>'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock',
20
+ 'baseurl'=>'http://ftp.hosteurope.de/mirror/centos.org/7.1.1503/os/x86_64/ (9 more)',
21
+ 'expire'=>'21600 second(s) (last: Sun Sep 6 10:20:46 2015)',
22
+ 'filename'=>'/etc/yum.repos.d/CentOS-Base.repo',
23
+ }, {
24
+ 'id'=>'base-debuginfo/x86_64',
25
+ 'name'=>'CentOS-7 - Debuginfo',
26
+ 'status'=>'disabled',
27
+ 'baseurl'=>'http://debuginfo.centos.org/7/x86_64/',
28
+ 'expire'=>'21600 second(s) (last: Unknown)',
29
+ 'filename'=>'/etc/yum.repos.d/CentOS-Debuginfo.repo',
30
+ }, {
31
+ 'id'=>'extras/7/x86_64',
32
+ 'name'=>'CentOS-7 - Extras',
33
+ 'status'=>'enabled',
34
+ 'revision'=>'1441314199',
35
+ 'updated'=>'Thu Sep 3 21:03:33 2015',
36
+ 'pkgs'=>'181',
37
+ 'size'=>'742 M',
38
+ 'mirrors'=>'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock',
39
+ 'baseurl'=>'http://mirror.informatik.hs-fulda.de/centos7.1.1503/extras/x86_64/ (9 more)',
40
+ 'expire'=>'21600 second(s) (last: Sun Sep 6 10:20:48 2015)',
41
+ 'filename'=>'/etc/yum.repos.d/CentOS-Base.repo',
42
+ }]
43
+ _(resource.repos.length).must_equal 3
44
+ # get repository details
45
+ _(resource.repos).must_equal %w{base/7/x86_64 base-debuginfo/x86_64 extras/7/x86_64}
46
+ # test its syntax repo
47
+ _(resource.extras.exist?).must_equal true
48
+ _(resource.extras.enabled?).must_equal true
49
+ # test enabled extra repo
50
+ extras = resource.repo('extras/7/x86_64')
51
+ _(extras.exist?).must_equal true
52
+ _(extras.enabled?).must_equal true
53
+ # test enabled extra repo with short name
54
+ extras = resource.repo('extras')
55
+ _(extras.exist?).must_equal true
56
+ _(extras.enabled?).must_equal true
57
+ # test disabled extra-source repo
58
+ extras = resource.repo('base-debuginfo/x86_64')
59
+ _(extras.exist?).must_equal true
60
+ _(extras.enabled?).must_equal false
61
+ end
62
+
63
+ it 'test enabled extra repo (serverspec backwards comptability)' do
64
+ serverspec = load_resource('yumrepo', 'extras')
65
+ _(serverspec.exists?).must_equal true
66
+ _(serverspec.enabled?).must_equal true
67
+ end
68
+ end
@@ -0,0 +1,80 @@
1
+ # encoding: utf-8
2
+ # author: Christoph Hartmann
3
+ # author: Dominik Richter
4
+
5
+ require 'helper'
6
+
7
+ describe 'SimpleConfig Default Parser' do
8
+ it 'should parse an empty string' do
9
+ cur = SimpleConfig.new('')
10
+ cur.params.must_equal({})
11
+ end
12
+
13
+ it 'should parse only spaces' do
14
+ cur = SimpleConfig.new(' ')
15
+ cur.params.must_equal({})
16
+ end
17
+
18
+ it 'should parse only tabs' do
19
+ cur = SimpleConfig.new("\t")
20
+ cur.params.must_equal({})
21
+ end
22
+
23
+ it 'should parse only newlines' do
24
+ cur = SimpleConfig.new("\n")
25
+ cur.params.must_equal({})
26
+ end
27
+
28
+ it 'should parse a simple assignment' do
29
+ cur = SimpleConfig.new('a = b')
30
+ cur.params.must_equal({ 'a' => 'b' })
31
+ end
32
+
33
+ it 'should parse a multiple assignments' do
34
+ cur = SimpleConfig.new("a = b\n\nc = d")
35
+ cur.params.must_equal({ 'a' => 'b', 'c' => 'd' })
36
+ end
37
+
38
+ it 'handles files with only comments' do
39
+ cur = SimpleConfig.new('#a comment')
40
+ cur.params.must_equal({})
41
+ end
42
+
43
+ it 'handles separate comments and assignments' do
44
+ cur = SimpleConfig.new("# hello world\n\na = b")
45
+ cur.params.must_equal({ 'a' => 'b' })
46
+ end
47
+
48
+ it 'handles comments and assignments combined' do
49
+ cur = SimpleConfig.new('a = b# hello')
50
+ cur.params.must_equal({ 'a' => 'b' })
51
+ end
52
+
53
+ it 'handles groups' do
54
+ cur = SimpleConfig.new('[g]')
55
+ cur.params.must_equal({ 'g' => {} })
56
+ cur.groups.must_equal(['g'])
57
+ end
58
+
59
+ it 'handles non-group assignments and groups' do
60
+ cur = SimpleConfig.new("a = b\n[g]")
61
+ cur.params.must_equal({ 'a' => 'b', 'g' => {} })
62
+ cur.groups.must_equal(['g'])
63
+ end
64
+
65
+ it 'handles assignments in groups' do
66
+ cur = SimpleConfig.new("[g]\na = b")
67
+ cur.params.must_equal({ 'g' => { 'a' => 'b' } })
68
+ cur.groups.must_equal(['g'])
69
+ end
70
+
71
+ it 'handles multiple groups' do
72
+ cur = SimpleConfig.new("[g]\na = b\n[k]\n\nc = d")
73
+ res = {
74
+ 'g' => { 'a' => 'b' },
75
+ 'k' => { 'c' => 'd' },
76
+ }
77
+ cur.params.must_equal(res)
78
+ cur.groups.must_equal(['g', 'k'])
79
+ end
80
+ end
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ # author: Dominik Richter
3
+ # author: Christoph Hartmann
4
+
5
+ describe ContentParser do
6
+ let (:parser) { Class.new() { include ContentParser }.new }
7
+
8
+ describe '#parse_passwd' do
9
+ it 'parses nil content' do
10
+ parser.parse_passwd(nil).must_equal([])
11
+ end
12
+
13
+ it 'parses an empty passwd line' do
14
+ parser.parse_passwd('').must_equal([])
15
+ end
16
+
17
+ it 'parses a valid passwd line' do
18
+ info = [{
19
+ "name"=>"root",
20
+ "password"=>"x",
21
+ "uid"=>"0",
22
+ "gid"=>"0",
23
+ "desc"=>"root",
24
+ "home"=>"/root",
25
+ "shell"=>"/bin/sh"
26
+ }]
27
+ parser.parse_passwd('root:x:0:0:root:/root:/bin/sh').must_equal(info)
28
+ end
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,555 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: inspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Dominik Richter
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: r-train
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.19'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.19'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.8'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.8'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rainbow
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: method_source
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.8'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.8'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubyzip
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.3'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-its
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.2'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.10'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.10'
139
+ description: Validate Inspec compliance checks.
140
+ email:
141
+ - dominik.richter@gmail.com
142
+ executables:
143
+ - inspec
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - ".gitignore"
148
+ - ".rubocop.yml"
149
+ - ".travis.yml"
150
+ - CHANGELOG.md
151
+ - Gemfile
152
+ - LICENSE
153
+ - MAINTAINERS.md
154
+ - MAINTAINERS.toml
155
+ - README.md
156
+ - Rakefile
157
+ - bin/inspec
158
+ - docs/ctl_inspec.rst
159
+ - docs/dsl_inspec.rst
160
+ - docs/readme.rst
161
+ - docs/resources.rst
162
+ - docs/template.rst
163
+ - examples/test-kitchen/.kitchen.yml
164
+ - examples/test-kitchen/Berksfile
165
+ - examples/test-kitchen/Gemfile
166
+ - examples/test-kitchen/README.md
167
+ - examples/test-kitchen/metadata.rb
168
+ - examples/test-kitchen/recipes/default.rb
169
+ - examples/test-kitchen/recipes/nginx.rb
170
+ - examples/test-kitchen/test/integration/default/web_spec.rb
171
+ - inspec.gemspec
172
+ - lib/inspec.rb
173
+ - lib/inspec/backend.rb
174
+ - lib/inspec/dsl.rb
175
+ - lib/inspec/log.rb
176
+ - lib/inspec/metadata.rb
177
+ - lib/inspec/plugins.rb
178
+ - lib/inspec/plugins/resource.rb
179
+ - lib/inspec/profile.rb
180
+ - lib/inspec/profile_context.rb
181
+ - lib/inspec/resource.rb
182
+ - lib/inspec/rspec_json_formatter.rb
183
+ - lib/inspec/rule.rb
184
+ - lib/inspec/runner.rb
185
+ - lib/inspec/shell.rb
186
+ - lib/inspec/targets.rb
187
+ - lib/inspec/targets/core.rb
188
+ - lib/inspec/targets/dir.rb
189
+ - lib/inspec/targets/file.rb
190
+ - lib/inspec/targets/folder.rb
191
+ - lib/inspec/targets/tar.rb
192
+ - lib/inspec/targets/url.rb
193
+ - lib/inspec/targets/zip.rb
194
+ - lib/inspec/version.rb
195
+ - lib/matchers/matchers.rb
196
+ - lib/resources/apache.rb
197
+ - lib/resources/apache_conf.rb
198
+ - lib/resources/apt.rb
199
+ - lib/resources/audit_policy.rb
200
+ - lib/resources/auditd_conf.rb
201
+ - lib/resources/auditd_rules.rb
202
+ - lib/resources/bond.rb
203
+ - lib/resources/bridge.rb
204
+ - lib/resources/command.rb
205
+ - lib/resources/csv.rb
206
+ - lib/resources/directory.rb
207
+ - lib/resources/etc_group.rb
208
+ - lib/resources/file.rb
209
+ - lib/resources/gem.rb
210
+ - lib/resources/group.rb
211
+ - lib/resources/host.rb
212
+ - lib/resources/inetd_conf.rb
213
+ - lib/resources/interface.rb
214
+ - lib/resources/iptables.rb
215
+ - lib/resources/json.rb
216
+ - lib/resources/kernel_module.rb
217
+ - lib/resources/kernel_parameter.rb
218
+ - lib/resources/limits_conf.rb
219
+ - lib/resources/login_def.rb
220
+ - lib/resources/mysql.rb
221
+ - lib/resources/mysql_conf.rb
222
+ - lib/resources/mysql_session.rb
223
+ - lib/resources/npm.rb
224
+ - lib/resources/ntp_conf.rb
225
+ - lib/resources/oneget.rb
226
+ - lib/resources/os.rb
227
+ - lib/resources/os_env.rb
228
+ - lib/resources/package.rb
229
+ - lib/resources/parse_config.rb
230
+ - lib/resources/passwd.rb
231
+ - lib/resources/pip.rb
232
+ - lib/resources/port.rb
233
+ - lib/resources/postgres.rb
234
+ - lib/resources/postgres_conf.rb
235
+ - lib/resources/postgres_session.rb
236
+ - lib/resources/processes.rb
237
+ - lib/resources/registry_key.rb
238
+ - lib/resources/script.rb
239
+ - lib/resources/security_policy.rb
240
+ - lib/resources/service.rb
241
+ - lib/resources/ssh_conf.rb
242
+ - lib/resources/user.rb
243
+ - lib/resources/windows_feature.rb
244
+ - lib/resources/yaml.rb
245
+ - lib/resources/yum.rb
246
+ - lib/utils/convert.rb
247
+ - lib/utils/detect.rb
248
+ - lib/utils/find_files.rb
249
+ - lib/utils/hash.rb
250
+ - lib/utils/modulator.rb
251
+ - lib/utils/parser.rb
252
+ - lib/utils/simpleconfig.rb
253
+ - tasks/maintainers.rb
254
+ - test/docker_run.rb
255
+ - test/docker_test.rb
256
+ - test/helper.rb
257
+ - test/integration/.kitchen.yml
258
+ - test/integration/Berksfile
259
+ - test/integration/cookbooks/os_prepare/metadata.rb
260
+ - test/integration/cookbooks/os_prepare/recipes/apt.rb
261
+ - test/integration/cookbooks/os_prepare/recipes/default.rb
262
+ - test/integration/cookbooks/os_prepare/recipes/file.rb
263
+ - test/integration/cookbooks/os_prepare/recipes/package.rb
264
+ - test/integration/default/_debug_spec.rb
265
+ - test/integration/default/apt_spec.rb
266
+ - test/integration/default/file_spec.rb
267
+ - test/integration/default/group_spec.rb
268
+ - test/integration/default/kernel_module_spec.rb
269
+ - test/integration/default/kernel_parameter_spec.rb
270
+ - test/integration/default/package_spec.rb
271
+ - test/integration/default/service_spec.rb
272
+ - test/integration/default/user_spec.rb
273
+ - test/resource/command_test.rb
274
+ - test/resource/dsl_test.rb
275
+ - test/resource/file_test.rb
276
+ - test/resource/ssh_config.rb
277
+ - test/resource/sshd_config.rb
278
+ - test/test-extra.yaml
279
+ - test/test.yaml
280
+ - test/unit/mock/cmd/Get-NetAdapter
281
+ - test/unit/mock/cmd/GetUserAccount
282
+ - test/unit/mock/cmd/GetWin32Group
283
+ - test/unit/mock/cmd/PATH
284
+ - test/unit/mock/cmd/Resolve-DnsName
285
+ - test/unit/mock/cmd/Test-NetConnection
286
+ - test/unit/mock/cmd/auditctl
287
+ - test/unit/mock/cmd/auditpol
288
+ - test/unit/mock/cmd/brew-info-jq
289
+ - test/unit/mock/cmd/chage-l-root
290
+ - test/unit/mock/cmd/dpkg-s-curl
291
+ - test/unit/mock/cmd/dscl
292
+ - test/unit/mock/cmd/etc-apt
293
+ - test/unit/mock/cmd/find-etc-rc-d-name-S
294
+ - test/unit/mock/cmd/find-net-interface
295
+ - test/unit/mock/cmd/gem-list-local-a-q-rubocop
296
+ - test/unit/mock/cmd/get-net-tcpconnection
297
+ - test/unit/mock/cmd/get-netadapter-binding-bridge
298
+ - test/unit/mock/cmd/get-package-firefox
299
+ - test/unit/mock/cmd/get-package-ruby
300
+ - test/unit/mock/cmd/get-service-dhcp
301
+ - test/unit/mock/cmd/get-windows-feature
302
+ - test/unit/mock/cmd/getent-hosts-example.com
303
+ - test/unit/mock/cmd/getent-passwd-root
304
+ - test/unit/mock/cmd/id-chartmann
305
+ - test/unit/mock/cmd/id-root
306
+ - test/unit/mock/cmd/initctl-show-config-ssh
307
+ - test/unit/mock/cmd/initctl-status-ssh
308
+ - test/unit/mock/cmd/iptables-s
309
+ - test/unit/mock/cmd/launchctl-list
310
+ - test/unit/mock/cmd/ls-1-etc-init.d
311
+ - test/unit/mock/cmd/ls-sys-class-net-br
312
+ - test/unit/mock/cmd/lsmod
313
+ - test/unit/mock/cmd/lsof-np-itcp
314
+ - test/unit/mock/cmd/netstat-tulpen
315
+ - test/unit/mock/cmd/npm-ls-g--json-bower
316
+ - test/unit/mock/cmd/pacman-qi-curl
317
+ - test/unit/mock/cmd/ping-example.com
318
+ - test/unit/mock/cmd/pip-show-jinja2
319
+ - test/unit/mock/cmd/ps-aux
320
+ - test/unit/mock/cmd/pw-usershow-root-7
321
+ - test/unit/mock/cmd/reg_schedule
322
+ - test/unit/mock/cmd/rpm-qia-curl
323
+ - test/unit/mock/cmd/sbin_sysctl
324
+ - test/unit/mock/cmd/secedit-export
325
+ - test/unit/mock/cmd/service-e
326
+ - test/unit/mock/cmd/service-sendmail-onestatus
327
+ - test/unit/mock/cmd/service-sshd-status
328
+ - test/unit/mock/cmd/sockstat
329
+ - test/unit/mock/cmd/success
330
+ - test/unit/mock/cmd/systemctl-show-all-sshd
331
+ - test/unit/mock/cmd/win32_product
332
+ - test/unit/mock/cmd/yum-repolist-all
333
+ - test/unit/mock/files/auditd.conf
334
+ - test/unit/mock/files/bond0
335
+ - test/unit/mock/files/etcgroup
336
+ - test/unit/mock/files/example.csv
337
+ - test/unit/mock/files/inetd.conf
338
+ - test/unit/mock/files/kitchen.yml
339
+ - test/unit/mock/files/limits.conf
340
+ - test/unit/mock/files/login.defs
341
+ - test/unit/mock/files/mysql.conf
342
+ - test/unit/mock/files/mysql2.conf
343
+ - test/unit/mock/files/ntp.conf
344
+ - test/unit/mock/files/passwd
345
+ - test/unit/mock/files/policyfile.lock.json
346
+ - test/unit/mock/files/ssh_config
347
+ - test/unit/mock/files/sshd_config
348
+ - test/unit/mock/profiles/empty/metadata.rb
349
+ - test/unit/mock/profiles/metadata/metadata.rb
350
+ - test/unit/profile_context_test.rb
351
+ - test/unit/profile_test.rb
352
+ - test/unit/resources/apt_test.rb
353
+ - test/unit/resources/audit_policy_test.rb
354
+ - test/unit/resources/auditd_conf_test.rb
355
+ - test/unit/resources/auditd_rules_test.rb
356
+ - test/unit/resources/bond_test.rb
357
+ - test/unit/resources/bridge_test.rb
358
+ - test/unit/resources/csv_test.rb
359
+ - test/unit/resources/etc_group_test.rb
360
+ - test/unit/resources/gem_test.rb
361
+ - test/unit/resources/group_test.rb
362
+ - test/unit/resources/host_test.rb
363
+ - test/unit/resources/inetd_conf_test.rb
364
+ - test/unit/resources/interface_test.rb
365
+ - test/unit/resources/iptables_test.rb
366
+ - test/unit/resources/json_test.rb
367
+ - test/unit/resources/kernel_module_test.rb
368
+ - test/unit/resources/kernel_parameter_test.rb
369
+ - test/unit/resources/limits_conf_test.rb
370
+ - test/unit/resources/login_def_test.rb
371
+ - test/unit/resources/mysql_conf_test.rb
372
+ - test/unit/resources/npm_test.rb
373
+ - test/unit/resources/ntp_conf_test.rb
374
+ - test/unit/resources/oneget_test.rb
375
+ - test/unit/resources/os_env_test.rb
376
+ - test/unit/resources/package_test.rb
377
+ - test/unit/resources/passwd_test.rb
378
+ - test/unit/resources/pip_test.rb
379
+ - test/unit/resources/port_test.rb
380
+ - test/unit/resources/processes_test.rb
381
+ - test/unit/resources/registry_key_test.rb
382
+ - test/unit/resources/script_test.rb
383
+ - test/unit/resources/security_policy_test.rb
384
+ - test/unit/resources/service_test.rb
385
+ - test/unit/resources/ssh_conf_test.rb
386
+ - test/unit/resources/user_test.rb
387
+ - test/unit/resources/windows_feature.rb
388
+ - test/unit/resources/yaml_test.rb
389
+ - test/unit/resources/yum_test.rb
390
+ - test/unit/simpleconfig_test.rb
391
+ - test/unit/utils/content_parser_test.rb
392
+ homepage: https://github.com/chef/inspec
393
+ licenses:
394
+ - Apache 2.0
395
+ metadata: {}
396
+ post_install_message:
397
+ rdoc_options: []
398
+ require_paths:
399
+ - lib
400
+ required_ruby_version: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - ">="
403
+ - !ruby/object:Gem::Version
404
+ version: '0'
405
+ required_rubygems_version: !ruby/object:Gem::Requirement
406
+ requirements:
407
+ - - ">="
408
+ - !ruby/object:Gem::Version
409
+ version: '0'
410
+ requirements: []
411
+ rubyforge_project:
412
+ rubygems_version: 2.4.5.1
413
+ signing_key:
414
+ specification_version: 4
415
+ summary: Validate Inspec compliance checks
416
+ test_files:
417
+ - test/docker_run.rb
418
+ - test/docker_test.rb
419
+ - test/helper.rb
420
+ - test/integration/.kitchen.yml
421
+ - test/integration/Berksfile
422
+ - test/integration/cookbooks/os_prepare/metadata.rb
423
+ - test/integration/cookbooks/os_prepare/recipes/apt.rb
424
+ - test/integration/cookbooks/os_prepare/recipes/default.rb
425
+ - test/integration/cookbooks/os_prepare/recipes/file.rb
426
+ - test/integration/cookbooks/os_prepare/recipes/package.rb
427
+ - test/integration/default/_debug_spec.rb
428
+ - test/integration/default/apt_spec.rb
429
+ - test/integration/default/file_spec.rb
430
+ - test/integration/default/group_spec.rb
431
+ - test/integration/default/kernel_module_spec.rb
432
+ - test/integration/default/kernel_parameter_spec.rb
433
+ - test/integration/default/package_spec.rb
434
+ - test/integration/default/service_spec.rb
435
+ - test/integration/default/user_spec.rb
436
+ - test/resource/command_test.rb
437
+ - test/resource/dsl_test.rb
438
+ - test/resource/file_test.rb
439
+ - test/resource/ssh_config.rb
440
+ - test/resource/sshd_config.rb
441
+ - test/test-extra.yaml
442
+ - test/test.yaml
443
+ - test/unit/mock/cmd/Get-NetAdapter
444
+ - test/unit/mock/cmd/GetUserAccount
445
+ - test/unit/mock/cmd/GetWin32Group
446
+ - test/unit/mock/cmd/PATH
447
+ - test/unit/mock/cmd/Resolve-DnsName
448
+ - test/unit/mock/cmd/Test-NetConnection
449
+ - test/unit/mock/cmd/auditctl
450
+ - test/unit/mock/cmd/auditpol
451
+ - test/unit/mock/cmd/brew-info-jq
452
+ - test/unit/mock/cmd/chage-l-root
453
+ - test/unit/mock/cmd/dpkg-s-curl
454
+ - test/unit/mock/cmd/dscl
455
+ - test/unit/mock/cmd/etc-apt
456
+ - test/unit/mock/cmd/find-etc-rc-d-name-S
457
+ - test/unit/mock/cmd/find-net-interface
458
+ - test/unit/mock/cmd/gem-list-local-a-q-rubocop
459
+ - test/unit/mock/cmd/get-net-tcpconnection
460
+ - test/unit/mock/cmd/get-netadapter-binding-bridge
461
+ - test/unit/mock/cmd/get-package-firefox
462
+ - test/unit/mock/cmd/get-package-ruby
463
+ - test/unit/mock/cmd/get-service-dhcp
464
+ - test/unit/mock/cmd/get-windows-feature
465
+ - test/unit/mock/cmd/getent-hosts-example.com
466
+ - test/unit/mock/cmd/getent-passwd-root
467
+ - test/unit/mock/cmd/id-chartmann
468
+ - test/unit/mock/cmd/id-root
469
+ - test/unit/mock/cmd/initctl-show-config-ssh
470
+ - test/unit/mock/cmd/initctl-status-ssh
471
+ - test/unit/mock/cmd/iptables-s
472
+ - test/unit/mock/cmd/launchctl-list
473
+ - test/unit/mock/cmd/ls-1-etc-init.d
474
+ - test/unit/mock/cmd/ls-sys-class-net-br
475
+ - test/unit/mock/cmd/lsmod
476
+ - test/unit/mock/cmd/lsof-np-itcp
477
+ - test/unit/mock/cmd/netstat-tulpen
478
+ - test/unit/mock/cmd/npm-ls-g--json-bower
479
+ - test/unit/mock/cmd/pacman-qi-curl
480
+ - test/unit/mock/cmd/ping-example.com
481
+ - test/unit/mock/cmd/pip-show-jinja2
482
+ - test/unit/mock/cmd/ps-aux
483
+ - test/unit/mock/cmd/pw-usershow-root-7
484
+ - test/unit/mock/cmd/reg_schedule
485
+ - test/unit/mock/cmd/rpm-qia-curl
486
+ - test/unit/mock/cmd/sbin_sysctl
487
+ - test/unit/mock/cmd/secedit-export
488
+ - test/unit/mock/cmd/service-e
489
+ - test/unit/mock/cmd/service-sendmail-onestatus
490
+ - test/unit/mock/cmd/service-sshd-status
491
+ - test/unit/mock/cmd/sockstat
492
+ - test/unit/mock/cmd/success
493
+ - test/unit/mock/cmd/systemctl-show-all-sshd
494
+ - test/unit/mock/cmd/win32_product
495
+ - test/unit/mock/cmd/yum-repolist-all
496
+ - test/unit/mock/files/auditd.conf
497
+ - test/unit/mock/files/bond0
498
+ - test/unit/mock/files/etcgroup
499
+ - test/unit/mock/files/example.csv
500
+ - test/unit/mock/files/inetd.conf
501
+ - test/unit/mock/files/kitchen.yml
502
+ - test/unit/mock/files/limits.conf
503
+ - test/unit/mock/files/login.defs
504
+ - test/unit/mock/files/mysql.conf
505
+ - test/unit/mock/files/mysql2.conf
506
+ - test/unit/mock/files/ntp.conf
507
+ - test/unit/mock/files/passwd
508
+ - test/unit/mock/files/policyfile.lock.json
509
+ - test/unit/mock/files/ssh_config
510
+ - test/unit/mock/files/sshd_config
511
+ - test/unit/mock/profiles/empty/metadata.rb
512
+ - test/unit/mock/profiles/metadata/metadata.rb
513
+ - test/unit/profile_context_test.rb
514
+ - test/unit/profile_test.rb
515
+ - test/unit/resources/apt_test.rb
516
+ - test/unit/resources/audit_policy_test.rb
517
+ - test/unit/resources/auditd_conf_test.rb
518
+ - test/unit/resources/auditd_rules_test.rb
519
+ - test/unit/resources/bond_test.rb
520
+ - test/unit/resources/bridge_test.rb
521
+ - test/unit/resources/csv_test.rb
522
+ - test/unit/resources/etc_group_test.rb
523
+ - test/unit/resources/gem_test.rb
524
+ - test/unit/resources/group_test.rb
525
+ - test/unit/resources/host_test.rb
526
+ - test/unit/resources/inetd_conf_test.rb
527
+ - test/unit/resources/interface_test.rb
528
+ - test/unit/resources/iptables_test.rb
529
+ - test/unit/resources/json_test.rb
530
+ - test/unit/resources/kernel_module_test.rb
531
+ - test/unit/resources/kernel_parameter_test.rb
532
+ - test/unit/resources/limits_conf_test.rb
533
+ - test/unit/resources/login_def_test.rb
534
+ - test/unit/resources/mysql_conf_test.rb
535
+ - test/unit/resources/npm_test.rb
536
+ - test/unit/resources/ntp_conf_test.rb
537
+ - test/unit/resources/oneget_test.rb
538
+ - test/unit/resources/os_env_test.rb
539
+ - test/unit/resources/package_test.rb
540
+ - test/unit/resources/passwd_test.rb
541
+ - test/unit/resources/pip_test.rb
542
+ - test/unit/resources/port_test.rb
543
+ - test/unit/resources/processes_test.rb
544
+ - test/unit/resources/registry_key_test.rb
545
+ - test/unit/resources/script_test.rb
546
+ - test/unit/resources/security_policy_test.rb
547
+ - test/unit/resources/service_test.rb
548
+ - test/unit/resources/ssh_conf_test.rb
549
+ - test/unit/resources/user_test.rb
550
+ - test/unit/resources/windows_feature.rb
551
+ - test/unit/resources/yaml_test.rb
552
+ - test/unit/resources/yum_test.rb
553
+ - test/unit/simpleconfig_test.rb
554
+ - test/unit/utils/content_parser_test.rb
555
+ has_rdoc: