Skip to content

Commit

Permalink
Replace Chef license agreement. Add more --enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
p-oneil committed Dec 10, 2024
1 parent a86bf72 commit 04a55cd
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions src/courses/user/06.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,7 @@ inspec exec https://github.com/mitre/nginx-stigready-baseline -t docker://nginx

In the above example, we are testing an NGINX server. We get the InSpec profile (all the tests) from GitHub by stating `https://github.com/mitre/nginx-stigready-baseline`. We use the NGINX target (`-t`) that is running via Docker in our Codespace environment by stating `docker://nginx`, and we report the results to the terminal (CLI output) with `enhanced-outcomes` enabled for readability. Not all the metadata generated by `inspec exec` is displayed in the CLI output. Instead, it is included in the results file so that we can explore it in more detail using Heimdall.

_Note: The first time you run InSpec, it will likely ask you to accept Chef's license like this:_

```sh
+---------------------------------------------+
Chef License Acceptance

Before you can continue, 1 product license
must be accepted. View the license at
https://www.chef.io/end-user-license-agreement/

License that need accepting:
* Chef InSpec

Do you accept the 1 product license (yes/no)?

>
```

You can type `yes` and press enter. This will only happen one time.

If you are using InSpec in a pipeline, you can silently accept the license. Refer to [Chef's documentation](https://docs.chef.io/licensing/accept/) for more information.

The SAF training lab environment uses [Cinc Auditor](https://cinc.sh/start/auditor/), an open source distribution of Inspec. When you run `inspec`, the command is redirected to `cinc-auditor` so you won't need to worry about what command to run. If you choose to use Chef Inspec instead of Cinc Auditor in a different environment, you will need to accept Chef's [license agreement](https://docs.chef.io/licensing/accept/).
:::

::: details Transports - Advanced Examples
Expand All @@ -121,6 +100,7 @@ The `-t` flag (or `--target` flag in long form) specifies **what** target you wa
inspec exec https://github.com/mitre/nginx-stigready-baseline
-t docker://instance_id
--input-file <path_to_your_input_file/name_of_your_input_file.yml>
--enhanced-outcomes
--reporter json:<path_to_your_output_file/name_of_your_output_file.json>
```

Expand All @@ -130,6 +110,7 @@ inspec exec https://github.com/mitre/nginx-stigready-baseline
inspec exec https://github.com/mitre/nginx-stigready-baseline
-t ssh://Username:Password@IP
--input-file <path_to_your_input_file/name_of_your_input_file.yml>
--enhanced-outcomes
--reporter json:<path_to_your_output_file/name_of_your_output_file.json>
```

Expand Down

0 comments on commit 04a55cd

Please sign in to comment.