2016-09-21 16:58:25 +00:00
---
title: About kitchen-inspec
---
# kitchen-inspec
2017-10-03 21:25:27 +00:00
Use InSpec as a Kitchen verifier with `kitchen-inspec` .
2016-09-21 16:58:25 +00:00
2017-10-03 21:25:27 +00:00
Add the InSpec verifier to the `.kitchen.yml` file:
2016-09-21 16:58:25 +00:00
2018-07-19 18:31:38 +00:00
```YML
verifier:
name: inspec
```
2016-09-21 16:58:25 +00:00
2017-10-03 21:25:27 +00:00
Use a compliance profile from the Chef Compliance server:
2016-09-21 16:58:25 +00:00
2018-07-19 18:31:38 +00:00
```YML
suites:
- name: compliance
run_list:
- recipe[ssh-hardening::default]
verifier:
inspec_tests:
- compliance://base/ssh
```
2016-09-21 16:58:25 +00:00
and then run the following command:
2018-07-19 18:31:38 +00:00
```bash
$ inspec compliance login https://compliance.test --user admin --insecure --token ''
```
2016-09-21 16:58:25 +00:00
where `--insecure` is required when using self-signed certificates.
2017-10-03 21:25:27 +00:00
Use a compliance profile from the Chef Supermarket:
2016-09-21 16:58:25 +00:00
2018-07-19 18:31:38 +00:00
```YML
suites:
- name: supermarket
run_list:
- recipe[ssh-hardening::default]
verifier:
inspec_tests:
- supermarket://dev-sec/ssh-baseline
```
2017-10-03 21:25:27 +00:00
Use InSpec tests from the local file system:
2018-07-19 18:31:38 +00:00
```YML
suites:
- name: local
run_list:
- recipe[my_cookbook::default]
verifier:
inspec_tests:
- test/integration/default
```
2017-10-03 21:25:27 +00:00
2018-03-14 15:01:12 +00:00
Check out [Detect and correct with Test Kitchen ](https://learn.chef.io/modules/detect-correct-kitchen#/ ) on Learn Chef Rally for a hands-on look at how to use Test Kitchen to run InSpec profiles.