aquasecurity/tfsec-pr-commenter-action

tfsec not returning anything after being invoked

Closed this issue · 6 comments

As soon as tfsec --format=json . is printed, the action moves directly onto the Post Clone repo workflow

Screen Shot 2021-10-29 at 11 04 49 AM

It appears that if I manually change the working_directory it works, but in the . it does not navigate to other sub folders and returns

{
	"results": null
}

I am experiencing the same issue on some (not all) of my repositories. Can copy the same workflow file, and a folder that flags in a repository, over to another 'problem' repository and I see the exact same behavior you do. No known workarounds other than 'use a different repository'

I was actually able to find a workaround with the working_directory flag, is there a way to recursively search folders?

I have run into this same issue as well and have found that if I have all my terraform files at just the root level, things work ok, or if I have them all in subfolders, it works, ok, but if I have a terraform file at the root level as well as in subfolder, then things stop working for me with the behavior from the original poster.

So this layout works:
./main.tf

and this layout works:
./infrastructure/module1/main.tf

and even this layout works:
./infrastructure/module1/main.tf
./infrastructure/module2/main.tf

but having the following doesn't work:
./main.tf
./infrastructure/module1/main.tf

also having the following doesn't work:
./infrastructure/main.tf
./infrastructure/module1/main.tf

I can confirm I've been able to replicate the situations dictated above by @breaman

Hey @cody-carlson @breaman @brandon-bailey-rc - I've been neglecting this project a bit - it should be way more robust with v1.0.2

Is this issue still occurring?

Again, apologies for the tardiness :-)