inspec 4.18.51 → 4.18.85

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) hide show
  1. checksums.yaml +4 -4
  2. data/inspec.gemspec +15 -37
  3. data/lib/resource_support/aws/aws_resource_mixin.rb +1 -1
  4. metadata +22 -709
  5. data/Gemfile +0 -61
  6. data/LICENSE +0 -14
  7. data/README.md +0 -474
  8. data/etc/deprecations.json +0 -125
  9. data/etc/plugin_filters.json +0 -45
  10. data/lib/bundles/README.md +0 -3
  11. data/lib/bundles/inspec-compliance/api.rb +0 -7
  12. data/lib/bundles/inspec-compliance/configuration.rb +0 -7
  13. data/lib/bundles/inspec-compliance/http.rb +0 -7
  14. data/lib/bundles/inspec-compliance/support.rb +0 -7
  15. data/lib/bundles/inspec-compliance/target.rb +0 -7
  16. data/lib/bundles/inspec-supermarket.rb +0 -9
  17. data/lib/bundles/inspec-supermarket/README.md +0 -45
  18. data/lib/bundles/inspec-supermarket/api.rb +0 -87
  19. data/lib/bundles/inspec-supermarket/cli.rb +0 -71
  20. data/lib/bundles/inspec-supermarket/target.rb +0 -31
  21. data/lib/inspec.rb +0 -30
  22. data/lib/inspec/archive/tar.rb +0 -25
  23. data/lib/inspec/archive/zip.rb +0 -15
  24. data/lib/inspec/backend.rb +0 -101
  25. data/lib/inspec/base_cli.rb +0 -318
  26. data/lib/inspec/cached_fetcher.rb +0 -65
  27. data/lib/inspec/cli.rb +0 -469
  28. data/lib/inspec/completions/bash.sh.erb +0 -45
  29. data/lib/inspec/completions/fish.sh.erb +0 -34
  30. data/lib/inspec/completions/zsh.sh.erb +0 -61
  31. data/lib/inspec/config.rb +0 -511
  32. data/lib/inspec/control_eval_context.rb +0 -248
  33. data/lib/inspec/dependencies/cache.rb +0 -74
  34. data/lib/inspec/dependencies/dependency_set.rb +0 -93
  35. data/lib/inspec/dependencies/lockfile.rb +0 -115
  36. data/lib/inspec/dependencies/requirement.rb +0 -135
  37. data/lib/inspec/dependencies/resolver.rb +0 -86
  38. data/lib/inspec/describe_base.rb +0 -53
  39. data/lib/inspec/dist.rb +0 -20
  40. data/lib/inspec/dsl.rb +0 -115
  41. data/lib/inspec/dsl_shared.rb +0 -32
  42. data/lib/inspec/env_printer.rb +0 -156
  43. data/lib/inspec/errors.rb +0 -18
  44. data/lib/inspec/exceptions.rb +0 -11
  45. data/lib/inspec/expect.rb +0 -42
  46. data/lib/inspec/fetcher.rb +0 -48
  47. data/lib/inspec/fetcher/git.rb +0 -211
  48. data/lib/inspec/fetcher/local.rb +0 -116
  49. data/lib/inspec/fetcher/mock.rb +0 -34
  50. data/lib/inspec/fetcher/url.rb +0 -281
  51. data/lib/inspec/file_provider.rb +0 -318
  52. data/lib/inspec/formatters.rb +0 -3
  53. data/lib/inspec/formatters/base.rb +0 -269
  54. data/lib/inspec/formatters/json_rspec.rb +0 -20
  55. data/lib/inspec/formatters/show_progress.rb +0 -12
  56. data/lib/inspec/globals.rb +0 -9
  57. data/lib/inspec/impact.rb +0 -36
  58. data/lib/inspec/input.rb +0 -421
  59. data/lib/inspec/input_dsl_helpers.rb +0 -26
  60. data/lib/inspec/input_registry.rb +0 -315
  61. data/lib/inspec/library_eval_context.rb +0 -55
  62. data/lib/inspec/log.rb +0 -7
  63. data/lib/inspec/metadata.rb +0 -253
  64. data/lib/inspec/method_source.rb +0 -20
  65. data/lib/inspec/objects.rb +0 -14
  66. data/lib/inspec/objects/control.rb +0 -85
  67. data/lib/inspec/objects/describe.rb +0 -106
  68. data/lib/inspec/objects/each_loop.rb +0 -41
  69. data/lib/inspec/objects/input.rb +0 -49
  70. data/lib/inspec/objects/list.rb +0 -15
  71. data/lib/inspec/objects/or_test.rb +0 -45
  72. data/lib/inspec/objects/ruby_helper.rb +0 -13
  73. data/lib/inspec/objects/tag.rb +0 -32
  74. data/lib/inspec/objects/test.rb +0 -94
  75. data/lib/inspec/objects/value.rb +0 -32
  76. data/lib/inspec/plugin/v1.rb +0 -2
  77. data/lib/inspec/plugin/v1/plugin_types/cli.rb +0 -22
  78. data/lib/inspec/plugin/v1/plugin_types/fetcher.rb +0 -83
  79. data/lib/inspec/plugin/v1/plugin_types/resource.rb +0 -176
  80. data/lib/inspec/plugin/v1/plugin_types/secret.rb +0 -11
  81. data/lib/inspec/plugin/v1/plugin_types/source_reader.rb +0 -36
  82. data/lib/inspec/plugin/v1/plugins.rb +0 -59
  83. data/lib/inspec/plugin/v1/registry.rb +0 -90
  84. data/lib/inspec/plugin/v2.rb +0 -46
  85. data/lib/inspec/plugin/v2/activator.rb +0 -40
  86. data/lib/inspec/plugin/v2/config_file.rb +0 -151
  87. data/lib/inspec/plugin/v2/filter.rb +0 -96
  88. data/lib/inspec/plugin/v2/installer.rb +0 -512
  89. data/lib/inspec/plugin/v2/loader.rb +0 -321
  90. data/lib/inspec/plugin/v2/plugin_base.rb +0 -112
  91. data/lib/inspec/plugin/v2/plugin_types/cli.rb +0 -49
  92. data/lib/inspec/plugin/v2/plugin_types/dsl.rb +0 -11
  93. data/lib/inspec/plugin/v2/plugin_types/input.rb +0 -34
  94. data/lib/inspec/plugin/v2/plugin_types/mock.rb +0 -12
  95. data/lib/inspec/plugin/v2/registry.rb +0 -98
  96. data/lib/inspec/plugin/v2/status.rb +0 -29
  97. data/lib/inspec/profile.rb +0 -658
  98. data/lib/inspec/profile_context.rb +0 -203
  99. data/lib/inspec/profile_vendor.rb +0 -84
  100. data/lib/inspec/reporters.rb +0 -73
  101. data/lib/inspec/reporters/automate.rb +0 -78
  102. data/lib/inspec/reporters/base.rb +0 -25
  103. data/lib/inspec/reporters/cli.rb +0 -370
  104. data/lib/inspec/reporters/json.rb +0 -113
  105. data/lib/inspec/reporters/json_automate.rb +0 -80
  106. data/lib/inspec/reporters/json_min.rb +0 -48
  107. data/lib/inspec/reporters/junit.rb +0 -77
  108. data/lib/inspec/reporters/yaml.rb +0 -20
  109. data/lib/inspec/require_loader.rb +0 -29
  110. data/lib/inspec/resource.rb +0 -114
  111. data/lib/inspec/resources.rb +0 -130
  112. data/lib/inspec/resources/aide_conf.rb +0 -153
  113. data/lib/inspec/resources/apache.rb +0 -47
  114. data/lib/inspec/resources/apache_conf.rb +0 -156
  115. data/lib/inspec/resources/apt.rb +0 -151
  116. data/lib/inspec/resources/audit_policy.rb +0 -64
  117. data/lib/inspec/resources/auditd.rb +0 -251
  118. data/lib/inspec/resources/auditd_conf.rb +0 -45
  119. data/lib/inspec/resources/bash.rb +0 -33
  120. data/lib/inspec/resources/bond.rb +0 -70
  121. data/lib/inspec/resources/bridge.rb +0 -125
  122. data/lib/inspec/resources/bsd_service.rb +0 -2
  123. data/lib/inspec/resources/chocolatey_package.rb +0 -82
  124. data/lib/inspec/resources/command.rb +0 -91
  125. data/lib/inspec/resources/cpan.rb +0 -58
  126. data/lib/inspec/resources/cran.rb +0 -64
  127. data/lib/inspec/resources/crontab.rb +0 -173
  128. data/lib/inspec/resources/csv.rb +0 -56
  129. data/lib/inspec/resources/dh_params.rb +0 -83
  130. data/lib/inspec/resources/directory.rb +0 -23
  131. data/lib/inspec/resources/docker.rb +0 -274
  132. data/lib/inspec/resources/docker_container.rb +0 -91
  133. data/lib/inspec/resources/docker_image.rb +0 -84
  134. data/lib/inspec/resources/docker_object.rb +0 -52
  135. data/lib/inspec/resources/docker_plugin.rb +0 -64
  136. data/lib/inspec/resources/docker_service.rb +0 -91
  137. data/lib/inspec/resources/elasticsearch.rb +0 -165
  138. data/lib/inspec/resources/etc_fstab.rb +0 -96
  139. data/lib/inspec/resources/etc_group.rb +0 -157
  140. data/lib/inspec/resources/etc_hosts.rb +0 -68
  141. data/lib/inspec/resources/etc_hosts_allow.rb +0 -2
  142. data/lib/inspec/resources/etc_hosts_allow_deny.rb +0 -114
  143. data/lib/inspec/resources/etc_hosts_deny.rb +0 -2
  144. data/lib/inspec/resources/file.rb +0 -339
  145. data/lib/inspec/resources/filesystem.rb +0 -139
  146. data/lib/inspec/resources/firewalld.rb +0 -148
  147. data/lib/inspec/resources/gem.rb +0 -80
  148. data/lib/inspec/resources/group.rb +0 -2
  149. data/lib/inspec/resources/groups.rb +0 -241
  150. data/lib/inspec/resources/grub_conf.rb +0 -230
  151. data/lib/inspec/resources/host.rb +0 -310
  152. data/lib/inspec/resources/http.rb +0 -275
  153. data/lib/inspec/resources/iis_app.rb +0 -101
  154. data/lib/inspec/resources/iis_app_pool.rb +0 -127
  155. data/lib/inspec/resources/iis_site.rb +0 -148
  156. data/lib/inspec/resources/iis_website.rb +0 -2
  157. data/lib/inspec/resources/inetd_conf.rb +0 -53
  158. data/lib/inspec/resources/ini.rb +0 -28
  159. data/lib/inspec/resources/interface.rb +0 -204
  160. data/lib/inspec/resources/ip6tables.rb +0 -79
  161. data/lib/inspec/resources/iptables.rb +0 -80
  162. data/lib/inspec/resources/json.rb +0 -116
  163. data/lib/inspec/resources/kernel_module.rb +0 -106
  164. data/lib/inspec/resources/kernel_parameter.rb +0 -54
  165. data/lib/inspec/resources/key_rsa.rb +0 -66
  166. data/lib/inspec/resources/ksh.rb +0 -33
  167. data/lib/inspec/resources/launchd_service.rb +0 -2
  168. data/lib/inspec/resources/limits_conf.rb +0 -45
  169. data/lib/inspec/resources/linux_kernel_parameter.rb +0 -2
  170. data/lib/inspec/resources/login_defs.rb +0 -56
  171. data/lib/inspec/resources/mount.rb +0 -88
  172. data/lib/inspec/resources/mssql_session.rb +0 -117
  173. data/lib/inspec/resources/mysql.rb +0 -81
  174. data/lib/inspec/resources/mysql_conf.rb +0 -128
  175. data/lib/inspec/resources/mysql_session.rb +0 -88
  176. data/lib/inspec/resources/nginx.rb +0 -96
  177. data/lib/inspec/resources/nginx_conf.rb +0 -232
  178. data/lib/inspec/resources/noop.rb +0 -9
  179. data/lib/inspec/resources/npm.rb +0 -68
  180. data/lib/inspec/resources/ntp_conf.rb +0 -51
  181. data/lib/inspec/resources/oneget.rb +0 -71
  182. data/lib/inspec/resources/oracledb_session.rb +0 -149
  183. data/lib/inspec/resources/os.rb +0 -34
  184. data/lib/inspec/resources/os_env.rb +0 -86
  185. data/lib/inspec/resources/package.rb +0 -391
  186. data/lib/inspec/resources/packages.rb +0 -111
  187. data/lib/inspec/resources/parse_config.rb +0 -112
  188. data/lib/inspec/resources/parse_config_file.rb +0 -2
  189. data/lib/inspec/resources/passwd.rb +0 -73
  190. data/lib/inspec/resources/pip.rb +0 -132
  191. data/lib/inspec/resources/platform.rb +0 -112
  192. data/lib/inspec/resources/port.rb +0 -791
  193. data/lib/inspec/resources/postfix_conf.rb +0 -35
  194. data/lib/inspec/resources/postgres.rb +0 -152
  195. data/lib/inspec/resources/postgres_conf.rb +0 -116
  196. data/lib/inspec/resources/postgres_hba_conf.rb +0 -86
  197. data/lib/inspec/resources/postgres_ident_conf.rb +0 -75
  198. data/lib/inspec/resources/postgres_session.rb +0 -70
  199. data/lib/inspec/resources/powershell.rb +0 -67
  200. data/lib/inspec/resources/ppa.rb +0 -2
  201. data/lib/inspec/resources/processes.rb +0 -219
  202. data/lib/inspec/resources/rabbitmq_conf.rb +0 -2
  203. data/lib/inspec/resources/rabbitmq_config.rb +0 -52
  204. data/lib/inspec/resources/registry_key.rb +0 -296
  205. data/lib/inspec/resources/runit_service.rb +0 -2
  206. data/lib/inspec/resources/script.rb +0 -1
  207. data/lib/inspec/resources/security_identifier.rb +0 -91
  208. data/lib/inspec/resources/security_policy.rb +0 -182
  209. data/lib/inspec/resources/service.rb +0 -820
  210. data/lib/inspec/resources/shadow.rb +0 -150
  211. data/lib/inspec/resources/ssh_config.rb +0 -98
  212. data/lib/inspec/resources/sshd_config.rb +0 -2
  213. data/lib/inspec/resources/ssl.rb +0 -99
  214. data/lib/inspec/resources/sys_info.rb +0 -119
  215. data/lib/inspec/resources/systemd_service.rb +0 -2
  216. data/lib/inspec/resources/sysv_service.rb +0 -2
  217. data/lib/inspec/resources/toml.rb +0 -30
  218. data/lib/inspec/resources/upstart_service.rb +0 -2
  219. data/lib/inspec/resources/user.rb +0 -1
  220. data/lib/inspec/resources/users.rb +0 -742
  221. data/lib/inspec/resources/vbscript.rb +0 -67
  222. data/lib/inspec/resources/virtualization.rb +0 -255
  223. data/lib/inspec/resources/windows_feature.rb +0 -126
  224. data/lib/inspec/resources/windows_hotfix.rb +0 -37
  225. data/lib/inspec/resources/windows_registry_key.rb +0 -2
  226. data/lib/inspec/resources/windows_task.rb +0 -112
  227. data/lib/inspec/resources/wmi.rb +0 -109
  228. data/lib/inspec/resources/x509_certificate.rb +0 -143
  229. data/lib/inspec/resources/xinetd_conf.rb +0 -103
  230. data/lib/inspec/resources/xml.rb +0 -48
  231. data/lib/inspec/resources/yaml.rb +0 -42
  232. data/lib/inspec/resources/yum.rb +0 -162
  233. data/lib/inspec/resources/zfs_dataset.rb +0 -62
  234. data/lib/inspec/resources/zfs_pool.rb +0 -50
  235. data/lib/inspec/rspec_extensions.rb +0 -116
  236. data/lib/inspec/rule.rb +0 -389
  237. data/lib/inspec/runner.rb +0 -333
  238. data/lib/inspec/runner_mock.rb +0 -37
  239. data/lib/inspec/runner_rspec.rb +0 -184
  240. data/lib/inspec/runtime_profile.rb +0 -23
  241. data/lib/inspec/schema.rb +0 -245
  242. data/lib/inspec/secrets.rb +0 -15
  243. data/lib/inspec/secrets/yaml.rb +0 -29
  244. data/lib/inspec/shell.rb +0 -211
  245. data/lib/inspec/shell_detector.rb +0 -89
  246. data/lib/inspec/source_reader.rb +0 -26
  247. data/lib/inspec/ui.rb +0 -213
  248. data/lib/inspec/ui_table_helper.rb +0 -12
  249. data/lib/inspec/utils/command_wrapper.rb +0 -23
  250. data/lib/inspec/utils/convert.rb +0 -8
  251. data/lib/inspec/utils/database_helpers.rb +0 -75
  252. data/lib/inspec/utils/deprecation.rb +0 -6
  253. data/lib/inspec/utils/deprecation/config_file.rb +0 -109
  254. data/lib/inspec/utils/deprecation/deprecator.rb +0 -118
  255. data/lib/inspec/utils/deprecation/errors.rb +0 -14
  256. data/lib/inspec/utils/deprecation/global_method.rb +0 -9
  257. data/lib/inspec/utils/enumerable_delegation.rb +0 -7
  258. data/lib/inspec/utils/erlang_parser.rb +0 -190
  259. data/lib/inspec/utils/file_reader.rb +0 -24
  260. data/lib/inspec/utils/filter.rb +0 -461
  261. data/lib/inspec/utils/filter_array.rb +0 -25
  262. data/lib/inspec/utils/find_files.rb +0 -44
  263. data/lib/inspec/utils/hash.rb +0 -37
  264. data/lib/inspec/utils/json_log.rb +0 -15
  265. data/lib/inspec/utils/modulator.rb +0 -9
  266. data/lib/inspec/utils/nginx_parser.rb +0 -101
  267. data/lib/inspec/utils/object_traversal.rb +0 -47
  268. data/lib/inspec/utils/parser.rb +0 -277
  269. data/lib/inspec/utils/pkey_reader.rb +0 -17
  270. data/lib/inspec/utils/simpleconfig.rb +0 -121
  271. data/lib/inspec/utils/spdx.rb +0 -10
  272. data/lib/inspec/utils/spdx.txt +0 -383
  273. data/lib/inspec/utils/telemetry.rb +0 -3
  274. data/lib/inspec/utils/telemetry/collector.rb +0 -81
  275. data/lib/inspec/utils/telemetry/data_series.rb +0 -44
  276. data/lib/inspec/utils/telemetry/global_methods.rb +0 -22
  277. data/lib/inspec/version.rb +0 -3
  278. data/lib/matchers/matchers.rb +0 -341
  279. data/lib/plugins/README.md +0 -16
  280. data/lib/plugins/inspec-artifact/lib/inspec-artifact.rb +0 -12
  281. data/lib/plugins/inspec-artifact/lib/inspec-artifact/base.rb +0 -170
  282. data/lib/plugins/inspec-artifact/lib/inspec-artifact/cli.rb +0 -116
  283. data/lib/plugins/inspec-artifact/test/functional/inspec_artifact_test.rb +0 -50
  284. data/lib/plugins/inspec-compliance/README.md +0 -207
  285. data/lib/plugins/inspec-compliance/lib/inspec-compliance.rb +0 -12
  286. data/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb +0 -362
  287. data/lib/plugins/inspec-compliance/lib/inspec-compliance/api/login.rb +0 -198
  288. data/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb +0 -269
  289. data/lib/plugins/inspec-compliance/lib/inspec-compliance/configuration.rb +0 -103
  290. data/lib/plugins/inspec-compliance/lib/inspec-compliance/http.rb +0 -117
  291. data/lib/plugins/inspec-compliance/lib/inspec-compliance/images/cc-token.png +0 -0
  292. data/lib/plugins/inspec-compliance/lib/inspec-compliance/support.rb +0 -34
  293. data/lib/plugins/inspec-compliance/lib/inspec-compliance/target.rb +0 -146
  294. data/lib/plugins/inspec-compliance/test/functional/inspec_compliance_test.rb +0 -53
  295. data/lib/plugins/inspec-compliance/test/integration/default/cli.rb +0 -91
  296. data/lib/plugins/inspec-compliance/test/unit/api/login_test.rb +0 -190
  297. data/lib/plugins/inspec-compliance/test/unit/api_test.rb +0 -386
  298. data/lib/plugins/inspec-compliance/test/unit/target_test.rb +0 -155
  299. data/lib/plugins/inspec-habitat/Berksfile +0 -5
  300. data/lib/plugins/inspec-habitat/README.md +0 -150
  301. data/lib/plugins/inspec-habitat/kitchen.yml +0 -28
  302. data/lib/plugins/inspec-habitat/lib/inspec-habitat.rb +0 -11
  303. data/lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb +0 -41
  304. data/lib/plugins/inspec-habitat/lib/inspec-habitat/profile.rb +0 -265
  305. data/lib/plugins/inspec-habitat/templates/habitat/plan.sh.erb +0 -6
  306. data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/Berksfile +0 -2
  307. data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/README.md +0 -3
  308. data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/files/hab_setup.exp +0 -28
  309. data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/metadata.rb +0 -9
  310. data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/recipes/default.rb +0 -61
  311. data/lib/plugins/inspec-habitat/test/functional/inspec_habitat_test.rb +0 -34
  312. data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/README.md +0 -3
  313. data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/controls/inspec_habitat.rb +0 -40
  314. data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/inspec.yml +0 -10
  315. data/lib/plugins/inspec-habitat/test/support/example_profile/README.md +0 -3
  316. data/lib/plugins/inspec-habitat/test/support/example_profile/controls/example.rb +0 -7
  317. data/lib/plugins/inspec-habitat/test/support/example_profile/inspec.yml +0 -10
  318. data/lib/plugins/inspec-habitat/test/unit/profile_test.rb +0 -242
  319. data/lib/plugins/inspec-init/README.md +0 -31
  320. data/lib/plugins/inspec-init/lib/inspec-init.rb +0 -12
  321. data/lib/plugins/inspec-init/lib/inspec-init/cli.rb +0 -15
  322. data/lib/plugins/inspec-init/lib/inspec-init/cli_plugin.rb +0 -243
  323. data/lib/plugins/inspec-init/lib/inspec-init/cli_profile.rb +0 -47
  324. data/lib/plugins/inspec-init/lib/inspec-init/renderer.rb +0 -97
  325. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Gemfile +0 -11
  326. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/LICENSE +0 -2
  327. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/README.md +0 -28
  328. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Rakefile +0 -40
  329. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template.rb +0 -14
  330. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/cli_command.rb +0 -62
  331. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/plugin.rb +0 -53
  332. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/version.rb +0 -8
  333. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/fixtures/README.md +0 -24
  334. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/functional/README.md +0 -12
  335. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/functional/inspec_plugin_template_test.rb +0 -110
  336. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/helper.rb +0 -24
  337. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/README.md +0 -17
  338. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/cli_args_test.rb +0 -67
  339. data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/plugin_def_test.rb +0 -51
  340. data/lib/plugins/inspec-init/templates/profiles/aws/libraries/.gitkeep +0 -0
  341. data/lib/plugins/inspec-init/templates/profiles/azure/libraries/.gitkeep +0 -0
  342. data/lib/plugins/inspec-init/templates/profiles/gcp/libraries/.gitkeep +0 -0
  343. data/lib/plugins/inspec-init/templates/profiles/os/README.md +0 -3
  344. data/lib/plugins/inspec-init/templates/profiles/os/controls/example.rb +0 -18
  345. data/lib/plugins/inspec-init/templates/profiles/os/inspec.yml +0 -10
  346. data/lib/plugins/inspec-init/templates/profiles/os/libraries/.gitkeep +0 -0
  347. data/lib/plugins/inspec-init/test/functional/inspec_init_plugin_test.rb +0 -184
  348. data/lib/plugins/inspec-init/test/functional/inspec_init_profile_test.rb +0 -121
  349. data/lib/plugins/inspec-plugin-manager-cli/README.md +0 -6
  350. data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli.rb +0 -17
  351. data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb +0 -518
  352. data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/plugin.rb +0 -12
  353. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/config_dirs/empty/.gitkeep +0 -0
  354. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-egg-white-omelette/lib/inspec-egg-white-omelette.rb +0 -2
  355. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-egg-white-omelette/lib/inspec-egg-white-omelette/.gitkeep +0 -0
  356. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-wrong-structure/.gitkeep +0 -0
  357. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/wrong-name/lib/wrong-name.rb +0 -1
  358. data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/wrong-name/lib/wrong-name/.gitkeep +0 -0
  359. data/lib/plugins/inspec-plugin-manager-cli/test/functional/help_test.rb +0 -23
  360. data/lib/plugins/inspec-plugin-manager-cli/test/functional/helper.rb +0 -62
  361. data/lib/plugins/inspec-plugin-manager-cli/test/functional/install_test.rb +0 -368
  362. data/lib/plugins/inspec-plugin-manager-cli/test/functional/list_test.rb +0 -101
  363. data/lib/plugins/inspec-plugin-manager-cli/test/functional/search_test.rb +0 -129
  364. data/lib/plugins/inspec-plugin-manager-cli/test/functional/uninstall_test.rb +0 -63
  365. data/lib/plugins/inspec-plugin-manager-cli/test/functional/update_test.rb +0 -84
  366. data/lib/plugins/inspec-plugin-manager-cli/test/unit/cli_args_test.rb +0 -77
  367. data/lib/plugins/inspec-plugin-manager-cli/test/unit/plugin_def_test.rb +0 -39
  368. data/lib/plugins/shared/core_plugin_test_helper.rb +0 -153
  369. data/lib/plugins/things-for-train-integration.rb +0 -14
  370. data/lib/source_readers/flat.rb +0 -36
  371. data/lib/source_readers/inspec.rb +0 -66
@@ -1,16 +0,0 @@
1
- # Core Plugins of InSpec
2
-
3
- This area contains the plugins that ship with InSpec. They are automatically detected by the plugin loader.
4
-
5
- ## inspec-* directories
6
-
7
- Each subdirectory here that begins with `inspec-` is intended to be a self-contained plugin project,
8
- with code, docs, and tests.
9
-
10
- ## shared directory
11
-
12
- This directory contains material that is reusable for core plugins, such as a test helper tuned to assisting
13
- core plugin testing.
14
-
15
-
16
-
@@ -1,12 +0,0 @@
1
- module InspecPlugins
2
- module Artifact
3
- class Plugin < Inspec.plugin(2)
4
- plugin_name :'inspec-artifact'
5
-
6
- cli_command :artifact do
7
- require_relative "inspec-artifact/cli"
8
- InspecPlugins::Artifact::CLI
9
- end
10
- end
11
- end
12
- end
@@ -1,170 +0,0 @@
1
- require "base64"
2
- require "openssl"
3
- require "pathname"
4
- require "set"
5
- require "tempfile"
6
- require "yaml"
7
- require "inspec/dist"
8
-
9
- module InspecPlugins
10
- module Artifact
11
- class Base
12
- include Inspec::Dist
13
-
14
- KEY_BITS = 2048
15
- KEY_ALG = OpenSSL::PKey::RSA
16
-
17
- INSPEC_PROFILE_VERSION_1 = "INSPEC-PROFILE-1".freeze
18
- INSPEC_REPORT_VERSION_1 = "INSPEC-REPORT-1".freeze
19
-
20
- ARTIFACT_DIGEST = OpenSSL::Digest::SHA512
21
- ARTIFACT_DIGEST_NAME = "SHA512".freeze
22
-
23
- VALID_PROFILE_VERSIONS = Set.new [INSPEC_PROFILE_VERSION_1]
24
- VALID_PROFILE_DIGESTS = Set.new [ARTIFACT_DIGEST_NAME]
25
-
26
- SIGNED_PROFILE_SUFFIX = "iaf".freeze
27
- SIGNED_REPORT_SUFFIX = "iar".freeze
28
-
29
- def self.keygen(options)
30
- key = KEY_ALG.new KEY_BITS
31
- puts "Generating private key"
32
- open "#{options["keyname"]}.pem.key", "w" do |io|
33
- io.write key.to_pem
34
- end
35
- puts "Generating public key"
36
- open "#{options["keyname"]}.pem.pub", "w" do |io|
37
- io.write key.public_key.to_pem
38
- end
39
- end
40
-
41
- def self.profile_sign(options)
42
- artifact = new
43
- Dir.mktmpdir do |workdir|
44
- puts "Signing #{options["profile"]} with key #{options["keyname"]}"
45
- path_to_profile = options["profile"]
46
- profile_md = artifact.read_profile_metadata(path_to_profile)
47
- artifact_filename = "#{profile_md["name"]}-#{profile_md["version"]}.#{SIGNED_PROFILE_SUFFIX}"
48
- tarfile = artifact.profile_compress(path_to_profile, profile_md, workdir)
49
- content = IO.binread(tarfile)
50
- signing_key = KEY_ALG.new File.read "#{options["keyname"]}.pem.key"
51
- sha = ARTIFACT_DIGEST.new
52
- signature = signing_key.sign sha, content
53
- # convert the signature to Base64
54
- signature_base64 = Base64.encode64(signature)
55
- tar_content = IO.binread(tarfile)
56
- File.open(artifact_filename, "wb") do |f|
57
- f.puts(INSPEC_PROFILE_VERSION_1)
58
- f.puts(options["keyname"])
59
- f.puts(ARTIFACT_DIGEST_NAME)
60
- f.puts(signature_base64)
61
- f.puts("") # newline separates artifact header with body
62
- f.write(tar_content)
63
- end
64
- puts "Successfully generated #{artifact_filename}"
65
- end
66
- end
67
-
68
- def self.profile_verify(options)
69
- artifact = new
70
- file_to_verifiy = options["infile"]
71
- puts "Verifying #{file_to_verifiy}"
72
- artifact.verify(file_to_verifiy) do ||
73
- puts "Artifact is valid"
74
- end
75
- end
76
-
77
- def self.profile_install(options)
78
- artifact = new
79
- puts "Installing profile"
80
- file_to_verifiy = options["infile"]
81
- dest_dir = options["destdir"]
82
- artifact.verify(file_to_verifiy) do |content|
83
- Dir.mktmpdir do |workdir|
84
- tmpfile = Pathname.new(workdir).join("artifact_to_install.tar.gz")
85
- File.write(tmpfile, content)
86
- puts "Installing to #{dest_dir}"
87
- `tar xzf #{tmpfile} -C #{dest_dir}`
88
- end
89
- end
90
- end
91
-
92
- def read_profile_metadata(path_to_profile)
93
- begin
94
- p = Pathname.new(path_to_profile)
95
- p = p.join("inspec.yml")
96
- unless p.exist?
97
- raise "#{path_to_profile} doesn't appear to be a valid #{PRODUCT_NAME} profile"
98
- end
99
-
100
- yaml = YAML.load_file(p.to_s)
101
- yaml = yaml.to_hash
102
-
103
- unless yaml.key? "name"
104
- raise "Profile is invalid, name is not defined"
105
- end
106
-
107
- unless yaml.key? "version"
108
- raise "Profile is invalid, version is not defined"
109
- end
110
- rescue => e
111
- # rewrap it and pass it up to the CLI
112
- raise "Error reading #{PRODUCT_NAME} profile metadata: #{e}"
113
- end
114
-
115
- yaml
116
- end
117
-
118
- def profile_compress(path_to_profile, profile_md, workdir)
119
- profile_name = profile_md["name"]
120
- profile_version = profile_md["version"]
121
- outfile_name = "#{workdir}/#{profile_name}-#{profile_version}.tar.gz"
122
- `tar czf #{outfile_name} -C #{path_to_profile} .`
123
- outfile_name
124
- end
125
-
126
- def valid_header?(file_alg, file_version, file_keyname)
127
- public_keyfile = "#{file_keyname}.pem.pub"
128
- puts "Looking for #{public_keyfile} to verify artifact"
129
- unless File.exist? public_keyfile
130
- raise "Can't find #{public_keyfile}"
131
- end
132
-
133
- raise "Invalid artifact digest algorithm detected" unless VALID_PROFILE_DIGESTS.member?(file_alg)
134
- raise "Invalid artifact version detected" unless VALID_PROFILE_VERSIONS.member?(file_version)
135
- end
136
-
137
- def verify(file_to_verifiy, &content_block)
138
- f = File.open(file_to_verifiy, "r")
139
- file_version = f.readline.strip!
140
- file_keyname = f.readline.strip!
141
- file_alg = f.readline.strip!
142
-
143
- file_sig = ""
144
- # the signature is multi-line
145
- while (line = f.readline) != "\n"
146
- file_sig += line
147
- end
148
- file_sig.strip!
149
- f.close
150
-
151
- valid_header?(file_alg, file_version, file_keyname)
152
-
153
- public_keyfile = "#{file_keyname}.pem.pub"
154
- verification_key = KEY_ALG.new File.read public_keyfile
155
-
156
- f = File.open(file_to_verifiy, "r")
157
- while f.readline != "\n" do end
158
- content = f.read
159
-
160
- signature = Base64.decode64(file_sig)
161
- digest = ARTIFACT_DIGEST.new
162
- if verification_key.verify digest, signature, content
163
- content_block.yield(content)
164
- else
165
- raise "Artifact is invalid"
166
- end
167
- end
168
- end
169
- end
170
- end
@@ -1,116 +0,0 @@
1
- require_relative "base"
2
- require "inspec/dist"
3
-
4
- #
5
- # Notes:
6
- #
7
- # Generate keys
8
- # The initial implementation uses 2048 bit RSA key pairs (public + private).
9
- # Public keys must be available for a customer to install and verify an artifact.
10
- # Private keys should be stored in a secure location and NOT be distributed.
11
- # (They're only for creating artifacts).
12
- #
13
- #
14
- # .IAF file format
15
- # .iaf = "InSpec Artifact File", easy to rename if you'd like something more appropriate.
16
- # The iaf file wraps a binary artifact with some metadata. The first implementation
17
- # looks like this:
18
- #
19
- # INSPEC-PROFILE-1
20
- # name_of_signing_key
21
- # algorithm
22
- # signature
23
- # <empty line>
24
- # binary-blob
25
- # <eof>
26
- #
27
- # Let's look at each line:
28
- # INSPEC-PROFILE-1:
29
- # This is the artifact version descriptor. It should't change unless the
30
- # format of the archive changes.
31
- #
32
- # name_of_signing_key
33
- # The name of the public key that can be used to verify an artifact
34
- #
35
- # algorithm
36
- # The digest used to sign, I picked SHA512 to start with.
37
- # If we support multiple digests, we'll need to have the verify() method
38
- # support each digest.
39
- #
40
- # signature
41
- # The result of passing the binary artifact through the digest algorithm above.
42
- # Result is base64 encoded.
43
- #
44
- # <empty line>
45
- # We use an empty line to separate artifact header from artifact body (binary blob).
46
- # The artifact body can be anything you like.
47
- #
48
- # binary-blob
49
- # A binary blob, most likely a .tar.gz or tar.xz file. We'll need to pick one and
50
- # stick with it as part of the "INSPEC-PROFILE-1" artifact version. If we change block
51
- # format, the artifact version descriptor must be incremented, and the sign()
52
- # and verify() methods must be updated to support a newer version.
53
- #
54
- #
55
- # Key revocation
56
- # This implementation doesn't support key revocation. However, a customer
57
- # can remove the public cert file before installation, and artifacts will then
58
- # fail verification.
59
- #
60
- # Key locations
61
- # This implementation uses the current working directory to find public and
62
- # private keys. We should establish a common key directory (similar to /hab/cache/keys
63
- # or ~/.hab/cache/keys in Habitat).
64
- #
65
- # Extracting artifacts outside of InSpec
66
- # As in Habitat, the artifact format for InSpec allows the use of common
67
- # Unix tools to read the header and body of an artifact.
68
- # To extract the header from a .iaf:
69
- # sed '/^$/q' foo.iaf
70
- # To extract the raw content from a .iaf:
71
- # sed '1,/^$/d' foo.iaf
72
-
73
- module InspecPlugins
74
- module Artifact
75
- class CLI < Inspec.plugin(2, :cli_command)
76
- include Inspec::Dist
77
-
78
- subcommand_desc "artifact SUBCOMMAND", "Manage #{PRODUCT_NAME} Artifacts"
79
-
80
- desc "generate", "Generate a RSA key pair for signing and verification"
81
- option :keyname, type: :string, required: true,
82
- desc: "Desriptive name of key"
83
- option :keydir, type: :string, default: "./",
84
- desc: "Directory to search for keys"
85
- def generate_keys
86
- puts "Generating keys"
87
- InspecPlugins::Artifact::Base.keygen(options)
88
- end
89
-
90
- desc "sign-profile", "Create a signed .iaf artifact"
91
- option :profile, type: :string, required: true,
92
- desc: "Path to profile directory"
93
- option :keyname, type: :string, required: true,
94
- desc: "Desriptive name of key"
95
- def sign_profile
96
- InspecPlugins::Artifact::Base.profile_sign(options)
97
- end
98
-
99
- desc "verify-profile", "Verify a signed .iaf artifact"
100
- option :infile, type: :string, required: true,
101
- desc: ".iaf file to verify"
102
- def verify_profile
103
- InspecPlugins::Artifact::Base.profile_verify(options)
104
- end
105
-
106
- desc "install-profile", "Verify and install a signed .iaf artifact"
107
- option :infile, type: :string, required: true,
108
- desc: ".iaf file to install"
109
- option :destdir, type: :string, required: true,
110
- desc: "Installation directory"
111
- def install_profile
112
- InspecPlugins::Artifact::Base.profile_install(options)
113
- end
114
- end
115
- end
116
- end
@@ -1,50 +0,0 @@
1
- require "fileutils"
2
- require "plugins/shared/core_plugin_test_helper"
3
- require "securerandom"
4
-
5
- class ArtifactCli < Minitest::Test
6
- include CorePluginFunctionalHelper
7
-
8
- def test_generating_archive_keys
9
- prepare_examples do |dir|
10
- unique_key_name = SecureRandom.uuid
11
- out = run_inspec_process("artifact generate --keyname #{unique_key_name}", prefix: "cd #{dir};")
12
-
13
- stdout = out.stdout.force_encoding(Encoding::UTF_8)
14
- assert_includes stdout, "Generating private key"
15
- assert_includes stdout, "Generating public key"
16
-
17
- assert_exit_code 0, out
18
- end
19
- end
20
-
21
- def test_verify_and_install_signed_profile
22
- prepare_examples do |dir|
23
- unique_key_name = SecureRandom.uuid
24
- install_dir = File.join(dir, SecureRandom.uuid)
25
- FileUtils.mkdir(install_dir)
26
-
27
- # create profile
28
- profile = File.join(dir, "artifact-profile")
29
- run_inspec_process("init profile artifact-profile", prefix: "cd #{dir};")
30
-
31
- out = run_inspec_process("artifact generate --keyname #{unique_key_name}", prefix: "cd #{dir};")
32
- assert_exit_code 0, out
33
-
34
- out = run_inspec_process("artifact sign-profile --profile #{profile} --keyname #{unique_key_name}", prefix: "cd #{dir};")
35
- assert_exit_code 0, out
36
-
37
- # The archive install commands do not currently support windows
38
- # and use specific linux extract tar commands. Since artifact is
39
- # still experimental we are skipping it for now.
40
- return if is_windows?
41
-
42
- out = run_inspec_process("artifact install-profile --infile artifact-profile-0.1.0.iaf --destdir #{install_dir}", prefix: "cd #{dir};")
43
- assert_exit_code 0, out
44
-
45
- assert_includes out.stdout.force_encoding(Encoding::UTF_8), "Installing to #{install_dir}"
46
- assert_includes Dir.entries(install_dir).join, "inspec.yml"
47
- assert_exit_code 0, out
48
- end
49
- end
50
- end
@@ -1,207 +0,0 @@
1
- # InSpec Extension for Chef Compliance
2
-
3
- This extensions offers the following features:
4
-
5
- - list available profiles in Chef Automate/Chef Compliance
6
- - execute profiles directly from Chef Automate/Chef Compliance locally
7
- - upload a local profile to Chef Automate/Chef Compliance
8
-
9
- To use the CLI, this InSpec add-on adds the following commands:
10
-
11
- * `$ inspec compliance login` - authentication of the API token against Chef Automate/Chef Compliance
12
- * `$ inspec compliance profiles` - list all available Compliance profiles
13
- * `$ inspec exec compliance://profile` - runs a Compliance profile
14
- * `$ inspec compliance upload path/to/local/profile` - uploads a local profile to Chef Automate/Chef Compliance
15
- * `$ inspec compliance logout` - logout of Chef Automate/Chef Compliance
16
-
17
- Compliance profiles can be executed in two ways:
18
-
19
- - via compliance exec: `inspec compliance exec profile`
20
- - via compliance scheme: `inspec exec compliance://profile`
21
-
22
-
23
- ## Usage
24
-
25
- ### Command options
26
-
27
- ```
28
- $ inspec compliance
29
- Commands:
30
- inspec compliance download PROFILE # downloads a profile from Chef Compliance
31
- inspec compliance exec PROFILE # executes a Chef Compliance profile
32
- inspec compliance help [COMMAND] # Describe subcommands or one specific subcommand
33
- inspec compliance login SERVER # Log in to a Chef Automate/Chef Compliance SERVER
34
- inspec compliance logout # user logout from Chef Compliance
35
- inspec compliance profiles # list all available profiles in Chef Compliance
36
- inspec compliance upload PATH # uploads a local profile to Chef Compliance
37
- inspec compliance version # displays the version of the Chef Compliance server
38
- ```
39
-
40
- ### Login with Chef Automate 2
41
-
42
- You will need an API token for authentication. You can retrieve one via the admin section of your A2 web gui.
43
-
44
- ```
45
- $ inspec compliance login https://automate2.compliance.test --insecure --user 'admin' --token 'zuop..._KzE'
46
- ```
47
-
48
- #### Login with Chef Automate 2 via json-config
49
-
50
- With automate 2 you can automatically login by passing a json config via `--json-config`
51
-
52
- Example:
53
- ```json
54
- "compliance": {
55
- "server" : "https://YOUR_A2_URL",
56
- "token" : "YOUR_A2_ADMIN_TOKEN",
57
- "user" : "YOUR_A2_USER",
58
- "insecure" : true
59
- }
60
- ```
61
-
62
- ### Login with Chef Automate
63
-
64
- You will need an access token for authentication. You can retrieve one via [UI](https://docs.chef.io/api_delivery.html) or [CLI](https://docs.chef.io/ctl_delivery.html#delivery-token).
65
-
66
- ```
67
- $ inspec compliance login https://automate.compliance.test --insecure --user 'admin' --ent 'brewinc' --token 'zuop..._KzE'
68
- ```
69
-
70
- ### Login with Chef Compliance
71
-
72
- You will need an access token for authentication. You can retrieve one via:
73
-
74
- ![Chef Compliance Token](images/cc-token.png)
75
-
76
- You can choose the access token (`--token`) or the refresh token (`--refresh_token`)
77
-
78
- ```
79
- $ inspec compliance login https://compliance.test --user admin --insecure --token '...'
80
- ```
81
-
82
- ### List available profiles via Chef Compliance / Automate
83
-
84
- ```
85
- $ inspec compliance profiles
86
- Available profiles:
87
- -------------------
88
- * base/apache
89
- * base/linux
90
- * base/mysql
91
- * base/postgres
92
- * base/ssh
93
- * base/windows
94
- * cis/cis-centos6-level1
95
- * cis/cis-centos6-level2
96
- * cis/cis-centos7-level1
97
- * cis/cis-centos7-level2
98
- * cis/cis-rhel7-level1
99
- * cis/cis-rhel7-level2
100
- * cis/cis-ubuntu12.04lts-level1
101
- * cis/cis-ubuntu12.04lts-level2
102
- * cis/cis-ubuntu14.04lts-level1
103
- * cis/cis-ubuntu14.04lts-level2
104
- ```
105
-
106
- ### Upload a profile to Chef Compliance / Automate
107
-
108
- ```
109
- $ inspec compliance version
110
- Chef Compliance version: 1.0.11
111
- ➜ inspec git:(chris-rock/cc-error-not-loggedin) ✗ b inspec compliance upload examples/profile
112
- I, [2016-05-06T14:27:20.907547 #37592] INFO -- : Checking profile in examples/profile
113
- I, [2016-05-06T14:27:20.907668 #37592] INFO -- : Metadata OK.
114
- I, [2016-05-06T14:27:20.968584 #37592] INFO -- : Found 4 controls.
115
- I, [2016-05-06T14:27:20.968638 #37592] INFO -- : Control definitions OK.
116
- Profile is valid
117
- Generate temporary profile archive at /var/folders/jy/2bnrfb4s36jbjtzllvhhyqhw0000gn/T/profile20160506-37592-1tf326f.tar.gz
118
- I, [2016-05-06T14:27:21.020017 #37592] INFO -- : Generate archive /var/folders/jy/2bnrfb4s36jbjtzllvhhyqhw0000gn/T/profile20160506-37592-1tf326f.tar.gz.
119
- I, [2016-05-06T14:27:21.024837 #37592] INFO -- : Finished archive generation.
120
- Start upload to admin/profile
121
- Uploading to Chef Compliance
122
- Successfully uploaded profile
123
-
124
- # display all profiles
125
- $ inspec compliance profiles
126
- Available profiles:
127
- -------------------
128
- * admin/profile
129
- * base/apache
130
- * base/linux
131
- * base/mysql
132
- * base/postgres
133
- * base/ssh
134
- * base/windows
135
- * cis/cis-centos6-level1
136
- * cis/cis-centos6-level2
137
- * cis/cis-centos7-level1
138
- * cis/cis-centos7-level2
139
- * cis/cis-rhel7-level1
140
- * cis/cis-rhel7-level2
141
- * cis/cis-ubuntu12.04lts-level1
142
- * cis/cis-ubuntu12.04lts-level2
143
- * cis/cis-ubuntu14.04lts-level1
144
- * cis/cis-ubuntu14.04lts-level2
145
- ```
146
-
147
- ### Run a profile from Chef Compliance / Chef Automate on Workstation
148
-
149
- ```
150
- $ inspec exec compliance://admin/profile
151
- .*...
152
-
153
- Pending: (Failures listed here are expected and do not affect your suite's status)
154
-
155
- 1) example_config Can't find file "/tmp/example/config.yaml"
156
- # Not yet implemented
157
- # ./lib/inspec/runner.rb:157
158
-
159
-
160
- Finished in 0.02862 seconds (files took 0.62628 seconds to load)
161
- 5 examples, 0 failures, 1 pending
162
- ```
163
-
164
- Exec a specific version(2.0.1) of a profile when logged in with Automate:
165
-
166
- ```
167
- $ inspec exec compliance://admin/apache-baseline#2.0.1
168
- ```
169
-
170
- Download a specific version(2.0.2) of a profile when logged in with Automate:
171
- ```
172
- $ inspec compliance download compliance://admin/apache-baseline#2.0.2
173
- ```
174
-
175
- ### To Logout from Chef Compliance
176
-
177
- ```
178
- $ inspec compliance logout
179
- Successfully logged out
180
- ```
181
-
182
- ## Integration Tests
183
-
184
- At this point of time, InSpec is not able to pick up the token directly, therefore the integration test is semi-automatic at this point of time:
185
-
186
- * run `kitchen converge`
187
- * open https://192.168.251.2 and log in with user `admin` and password `admin`
188
- * click on user->about and obtain the access token and the refresh token
189
- * run `kitchen verify` with the required env variables:
190
-
191
- ```
192
- # both token need to be set, since the test suite runs for each token type
193
- export COMPLIANCE_ACCESSTOKEN='mycompliancetoken'
194
- export COMPLIANCE_REFRESHTOKEN='myrefreshtoken'
195
- kitchen verify
196
- -----> Starting Kitchen (v1.7.3)
197
- -----> Verifying <default-ubuntu-1404>...
198
- Search `/Users/chartmann/Development/compliance/inspec/lib/bundles/inspec-compliance/test/integration/default` for tests
199
- ..................................
200
-
201
- Finished in 6.35 seconds (files took 0.40949 seconds to load)
202
- 34 examples, 0 failures
203
-
204
- Finished verifying <default-ubuntu-1404> (0m6.62s).
205
- -----> Kitchen is finished. (0m7.02s)
206
- zlib(finalizer): the stream was freed prematurely.
207
- ```