inspec 4.7.24 → 4.10.4

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.24
4
+ version: 4.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef InSpec Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-25 00:00:00.000000000 Z
11
+ date: 2019-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train
@@ -637,7 +637,6 @@ files:
637
637
  - lib/inspec/utils/find_files.rb
638
638
  - lib/inspec/utils/hash.rb
639
639
  - lib/inspec/utils/json_log.rb
640
- - lib/inspec/utils/latest_version.rb
641
640
  - lib/inspec/utils/modulator.rb
642
641
  - lib/inspec/utils/nginx_parser.rb
643
642
  - lib/inspec/utils/object_traversal.rb
@@ -678,9 +677,6 @@ files:
678
677
  - lib/plugins/inspec-habitat/lib/inspec-habitat.rb
679
678
  - lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb
680
679
  - lib/plugins/inspec-habitat/lib/inspec-habitat/profile.rb
681
- - lib/plugins/inspec-habitat/templates/habitat/config/inspec_exec_config.json.erb
682
- - lib/plugins/inspec-habitat/templates/habitat/default.toml.erb
683
- - lib/plugins/inspec-habitat/templates/habitat/hooks/run.erb
684
680
  - lib/plugins/inspec-habitat/templates/habitat/plan.sh.erb
685
681
  - lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/Berksfile
686
682
  - lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/README.md
@@ -1,13 +0,0 @@
1
- require "json"
2
- require "open-uri"
3
-
4
- class LatestInSpecVersion
5
- # fetches the latest version from rubygems server
6
- def latest
7
- uri = URI("https://rubygems.org/api/v1/gems/inspec.json")
8
- inspec_info = JSON.parse(uri.read(open_timeout: 1.5, read_timeout: 1.5))
9
- inspec_info["version"]
10
- rescue StandardError
11
- nil
12
- end
13
- end
@@ -1,25 +0,0 @@
1
- {
2
- "target_id": "{{ sys.member_id }}",
3
- "reporter": {
4
- "cli": {
5
- "stdout": {{cfg.report_to_stdout}}
6
- },
7
- "json": {
8
- "file": "{{pkg.svc_path}}/logs/inspec_last_run.json"
9
- }{{#if cfg.automate.token ~}},
10
- "automate" : {
11
- "url": "{{cfg.automate.url}}/data-collector/v0/",
12
- "token": "{{cfg.automate.token}}",
13
- "node_name": "{{ sys.hostname }}",
14
- "verify_ssl": false
15
- }{{/if ~}}
16
- }
17
- {{#if cfg.automate.token }},
18
- "compliance": {
19
- "server" : "{{cfg.automate.url}}",
20
- "token" : "{{cfg.automate.token}}",
21
- "user" : "{{cfg.automate.user}}",
22
- "insecure" : true,
23
- "ent" : "automate"
24
- }{{/if }}
25
- }
@@ -1,9 +0,0 @@
1
- interval = 300
2
- report_to_stdout = true
3
-
4
- # Uncomment and replace values to report to Automate.
5
- # This can also be applied at runtime via `hab config apply`
6
- #[automate]
7
- #url = 'https://chef-automate.test'
8
- #token = 'TOKEN'
9
- #user = 'admin'
@@ -1,32 +0,0 @@
1
- #!/bin/sh
2
-
3
- exec 2>&1
4
-
5
- CONFIG="{{pkg.svc_config_path}}/inspec_exec_config.json"
6
- INTERVAL="{{cfg.interval}}"
7
- LOG_FILE="{{pkg.svc_path}}/logs/inspec_log.txt"
8
- PROFILE_IDENT="{{pkg.origin}}/{{pkg.name}}"
9
- PROFILE_PATH="{{pkg.path}}/{{pkg.name}}-{{pkg.version}}.tar.gz"
10
-
11
- while true; do
12
- echo "Executing ${PROFILE_IDENT}"
13
- exec <%= Inspec::Dist::EXEC_NAME %> exec ${PROFILE_PATH} --json-config ${CONFIG} 2>&1 | tee ${LOG_FILE}
14
-
15
- exit_code=$?
16
- if [ $exit_code -eq 1 ]; then
17
- echo "<%= Inspec::Dist::PRODUCT_NAME %> run failed."
18
- else
19
- echo "<%= Inspec::Dist::PRODUCT_NAME %> run completed successfully."
20
- if [ $exit_code -eq 0 ]; then
21
- echo "No controls failed or were skipped."
22
- elif [ $exit_code -eq 100 ]; then
23
- echo "At least 1 control failed."
24
- elif [ $exit_code -eq 101 ]; then
25
- echo "No controls failed but at least 1 skipped."
26
- fi
27
- fi
28
- echo "Results are logged here: ${LOG_FILE}"
29
-
30
- echo "Sleeping for ${INTERVAL} seconds"
31
- sleep ${INTERVAL}
32
- done