Closed jbstans closed 1 week ago
@jbstans Hi, I was able to replicate this issue by taking a .tf file, and just changing the extension to .tf.json and certain files give that error upon being scanned. So potentially theres some format issue with that file, it's possible that the file is not exactly formatted correctly for the .tf.json format and hence we see that error.
Interesting. In this instance the json is valid. My best guess from looking at the file was that it was because terraform loads the binary from the zip into the json. And the unicode from that breaks it.
I'm not sure if there's much you can do. We've been able to work around it, but I thought it worth flagging as you might be able to handle or ignore the unicode.
Thanks @jbstans . I'll close the issue for now. If by any chance anyone else encounters this issue in the future, please reference to this thread.
Describe the issue
If you have a section of terraform like this:
In the Terraform Plan it uses the output of the plan and transforms it into JSON using the
terraform show
commandin the resulting terraform.json file there is a section like this.... notice the
"content"
sectionCheckov then fails with:
Error parsing file /path/to/the.json