inspec 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -2
  3. data/Gemfile +2 -3
  4. data/README.md +2 -0
  5. data/Rakefile +8 -0
  6. data/bin/inspec +1 -157
  7. data/docs/resources.rst +79 -78
  8. data/examples/profile/controls/example.rb +3 -1
  9. data/lib/fetchers/mock.rb +27 -0
  10. data/lib/fetchers/tar.rb +3 -2
  11. data/lib/fetchers/zip.rb +3 -1
  12. data/lib/inspec/cli.rb +164 -0
  13. data/lib/inspec/plugins/resource.rb +6 -2
  14. data/lib/inspec/profile.rb +28 -17
  15. data/lib/inspec/resource.rb +5 -1
  16. data/lib/inspec/rspec_json_formatter.rb +42 -0
  17. data/lib/inspec/rule.rb +24 -1
  18. data/lib/inspec/runner.rb +15 -7
  19. data/lib/inspec/runner_mock.rb +6 -1
  20. data/lib/inspec/runner_rspec.rb +29 -1
  21. data/lib/inspec/version.rb +1 -1
  22. data/lib/resources/{script.rb → powershell.rb} +19 -5
  23. data/lib/resources/registry_key.rb +1 -1
  24. data/test/{integration/cookbooks → cookbooks}/os_prepare/files/empty.iso +0 -0
  25. data/test/{integration/cookbooks → cookbooks}/os_prepare/files/example.csv +0 -0
  26. data/test/{integration/cookbooks → cookbooks}/os_prepare/files/example.ini +0 -0
  27. data/test/{integration/cookbooks → cookbooks}/os_prepare/files/example.json +0 -0
  28. data/test/{integration/cookbooks → cookbooks}/os_prepare/files/example.yml +0 -0
  29. data/test/{integration/cookbooks → cookbooks}/os_prepare/metadata.rb +0 -0
  30. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/_runit_service_centos.rb +0 -0
  31. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/_upstart_service_centos.rb +0 -0
  32. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/apache.rb +0 -0
  33. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/apt.rb +0 -0
  34. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/auditctl.rb +0 -0
  35. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/default.rb +0 -0
  36. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/file.rb +0 -0
  37. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/iptables.rb +0 -0
  38. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/json_yaml_csv_ini.rb +0 -0
  39. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/mount.rb +2 -2
  40. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/package.rb +0 -0
  41. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/postgres.rb +6 -0
  42. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/registry_key.rb +0 -0
  43. data/test/{integration/cookbooks → cookbooks}/os_prepare/recipes/service.rb +0 -0
  44. data/test/{integration/cookbooks → cookbooks}/os_prepare/templates/default/sv-default-svlog-run.erb +0 -0
  45. data/test/functional/command_test.rb +390 -0
  46. data/test/helper.rb +6 -0
  47. data/test/integration/{test/integration/default → default}/_debug_spec.rb +0 -0
  48. data/test/integration/{test/integration/default → default}/apache_conf_spec.rb +0 -0
  49. data/test/integration/{test/integration/default → default}/apt_spec.rb +0 -0
  50. data/test/integration/{test/integration/default → default}/auditd_rules_spec.rb +0 -0
  51. data/test/integration/{test/integration/default → default}/compare_matcher_spec.rb +0 -0
  52. data/test/integration/{test/integration/default → default}/csv_spec.rb +0 -0
  53. data/test/integration/{test/integration/default → default}/etc_group_spec.rb +0 -0
  54. data/test/integration/{test/integration/default → default}/file_spec.rb +3 -2
  55. data/test/integration/{test/integration/default → default}/group_spec.rb +0 -0
  56. data/test/integration/{test/integration/default → default}/ini_spec.rb +0 -0
  57. data/test/integration/{test/integration/default → default}/iptables_spec.rb +0 -0
  58. data/test/integration/{test/integration/default → default}/json_spec.rb +0 -0
  59. data/test/integration/{test/integration/default → default}/kernel_module_spec.rb +0 -0
  60. data/test/integration/{test/integration/default → default}/kernel_parameter_spec.rb +0 -0
  61. data/test/integration/{test/integration/default → default}/mount_spec.rb +1 -1
  62. data/test/integration/{test/integration/default → default}/os_spec.rb +0 -0
  63. data/test/integration/{test/integration/default → default}/package_spec.rb +0 -0
  64. data/test/integration/{test/integration/default → default}/port_spec.rb +0 -0
  65. data/test/integration/{test/integration/default → default}/postgres_session_spec.rb +0 -0
  66. data/test/integration/default/powershell_spec.rb +13 -0
  67. data/test/integration/{test/integration/default → default}/registry_key_spec.rb +0 -0
  68. data/test/integration/{test/integration/default → default}/secpol_spec.rb +0 -0
  69. data/test/integration/{test/integration/default → default}/service_spec.rb +0 -0
  70. data/test/integration/{test/integration/default → default}/user_spec.rb +0 -0
  71. data/test/integration/{test/integration/default → default}/yaml_spec.rb +0 -0
  72. data/test/unit/control_test.rb +58 -0
  73. data/test/unit/fetchers/mock_test.rb +43 -0
  74. data/test/unit/plugins/resource_test.rb +60 -0
  75. data/test/unit/resources/{script_test.rb → powershell_test.rb} +10 -1
  76. metadata +107 -101
  77. data/test/integration/.kitchen.ec2.yml +0 -75
  78. data/test/integration/.kitchen.yml +0 -45
  79. data/test/integration/Berksfile +0 -5
@@ -1,75 +0,0 @@
1
- driver:
2
- name: ec2
3
- region: eu-central-1
4
- instance_type: m3.medium
5
- associate_public_ip: true
6
- security_group_ids: ["travis-ci"]
7
- interface: dns
8
- tags:
9
- Name: kitchen-test-inspec
10
-
11
- transport:
12
- username: ec2-user
13
- ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>
14
-
15
- platforms:
16
- - name: windows-2008
17
- driver:
18
- image_id: ami-58918e34
19
- transport:
20
- username: administrator
21
- - name: windows-2012
22
- driver:
23
- image_id: ami-44918e28
24
- transport:
25
- username: administrator
26
- - name: windows-2012r2
27
- driver:
28
- image_id: ami-8a918ee6
29
- transport:
30
- username: administrator
31
- - name: suse-11sp3
32
- driver:
33
- image_id: ami-fc0033e1
34
- - name: suse-12
35
- driver:
36
- image_id: ami-a22610bf
37
- - name: redhat-65
38
- driver:
39
- image_id: ami-008ebf1d
40
- - name: redhat-71
41
- driver:
42
- image_id: ami-dafdcfc7
43
- - name: ubuntu-1204
44
- driver:
45
- image_id: ami-24232f39
46
- transport:
47
- username: ubuntu
48
- - name: ubuntu-1404
49
- driver:
50
- image_id: ami-48272b55
51
- transport:
52
- username: ubuntu
53
- - name: ubuntu-1510
54
- driver:
55
- image_id: ami-1b4a5977
56
- transport:
57
- username: ubuntu
58
- - name: fedora-22
59
- driver:
60
- image_id: ami-a88eb0b5
61
- transport:
62
- username: fedora
63
- - name: debian-8
64
- driver:
65
- image_id: ami-b092aaad
66
- transport:
67
- username: admin
68
- - name: centos-7
69
- driver:
70
- image_id: ami-e68f82fb
71
- transport:
72
- username: centos
73
- - name: aws-linux
74
- driver:
75
- image_id: ami-daaeaec7
@@ -1,45 +0,0 @@
1
- ---
2
- driver:
3
- name: vagrant
4
-
5
- provisioner:
6
- name: chef_solo
7
-
8
- verifier:
9
- name: inspec
10
- sudo: true
11
-
12
- platforms:
13
- - name: centos-7.1
14
- - name: centos-6.7
15
- - name: centos-6.7-i386
16
- - name: centos-5.11
17
- - name: centos-5.11-i386
18
- - name: debian-6.0.10
19
- - name: debian-6.0.10-i386
20
- - name: debian-7.8
21
- - name: debian-7.8-i386
22
- - name: debian-8.1
23
- - name: debian-8.1-i386
24
- - name: fedora-21
25
- - name: fedora-21-i386
26
- - name: fedora-22
27
- - name: freebsd-9.3
28
- - name: freebsd-10.2
29
- - name: opensuse-13.2-x86_64
30
- - name: opensuse-13.2-i386
31
- - name: ubuntu-14.04
32
- - name: ubuntu-14.04-i386
33
- - name: ubuntu-12.04
34
- - name: ubuntu-12.04-i386
35
- - name: ubuntu-10.04
36
- - name: ubuntu-10.04-i386
37
- - name: mint-17.2-cinnamon
38
- driver_config:
39
- box: artem-sidorenko/mint-17.2-cinnamon
40
-
41
- suites:
42
- - name: default
43
- run_list:
44
- - recipe[os_prepare]
45
- attributes:
@@ -1,5 +0,0 @@
1
- source 'https://supermarket.chef.io'
2
-
3
- cookbook 'apt'
4
- cookbook 'os_prepare', path: './cookbooks/os_prepare'
5
- cookbook 'runit', github: 'hw-cookbooks/runit'