bridgecrewio / checkov

Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
https://www.checkov.io/
Apache License 2.0
6.71k stars 1.08k forks source link

Added the jq requirement note #6447

Open kyle9021 opened 2 weeks ago

kyle9021 commented 2 weeks ago

the plan file needs to be pretty printed in order to see the issue in the code block. If the plan file is in raw json then the code block doesn't appear. This isn't obvious in the documentation. I added a note.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

[//]: # "

Plan file JQ clarification

Be aware that we use the title to create changelog automatically and therefore only allow specific prefixes
- docs:     to indicate an update to our documentation

Description

the plan file needs to be pretty printed in order to see the issue in the code block. If the plan file is in raw json then the code block doesn't appear. This isn't obvious in the documentation. I added a note.

If you have installed jq, you can convert a JSON file into multiple lines with the command terraform show -json tf.plan | jq '.' > tf.json, making it easier to read the scan result. NOTE: jq is required to show the code block as seen below.