Is there a way to list all of the controls in an inspec profile?

Hi there,

My question is just what it says on the box : Is there a way to list all of the controls in a profile?

Preferably, in some human-readable or document-friendly way (ie, markdown).

I would like to have a README that contains the section Controls listing the name and description of the controls implemented in the profile. It seems like copy/pasting them from the profile itself is not very DRY.

Thanks!

You could use inspec json to get the content of the profile as JSON and pipe to jq

e.g. inspec json . | jq '.controls[] | .id'

1 Like

Much obliged @stocksy, this is exactly what I was looking for :clap: