Here are the steps to create, upload, and run a custom InSpec profile via Chef Automate.

  1. (Optional) Have the ChefDK installed, or InSpec installed.
  2. Create a skeleton profile: inspec init profile <name>
  3. Edit the <name>/inspec.yml with everything you might need, including any dependencies.
  4. Add a control to <name>/controls/example.rb. (You probably want to change this file name.)
  5. Verify the controls after you are done: inspec check <name>.
  6. (Optional) Run the profile locally: inspec exec <name>.
  7. Login to the Chef Automate instance via InSpec: inspec compliance login.
  8. Upload the profile to Automate: inspec compliance upload <name>.
  9. Verify the profile is uploaded correctly: inspec compliance profiles.
  10. Run the profile via Automate: inspec compliance exec YOURUSERNAME/<name>.