Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hartmann <[email protected]>
  • Loading branch information
chris-rock committed Apr 19, 2017
1 parent fc1bfc8 commit 1116e55
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ verifier:
You can also decide to only run specific controls, instead of a full profile. This is done by specifying a list of controls:
```
verifier:
name: inspec
controls:
- control-id1
- control-id4
suites:
- name: supermarket
run_list:
- recipe[apt]
- recipe[ssh-hardening]
verifier:
inspec_tests:
- name: dev-sec/ssh-baseline
controls:
- sshd-46
...
```

Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def runner_options(transport, state = {}, platform = nil, suite = nil) # rubocop
runner_options["format"] = config[:format] unless config[:format].nil?
runner_options["output"] = config[:output] % { platform: platform, suite: suite } unless config[:output].nil?
runner_options["profiles_path"] = config[:profiles_path] unless config[:profiles_path].nil?
runner_options["controls"] = config[:controls]
runner_options[:controls] = config[:controls]
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/kitchen/verifier/inspec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
expect(Inspec::Runner).to receive(:new)
.with(
hash_including(
"controls" => %w{a control}
controls: %w{a control}
)
)
.and_return(runner)
Expand Down

0 comments on commit 1116e55

Please sign in to comment.