Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfsec not returning anything after being invoked #33

Closed
brandon-bailey-rc opened this issue Oct 29, 2021 · 6 comments
Closed

tfsec not returning anything after being invoked #33

brandon-bailey-rc opened this issue Oct 29, 2021 · 6 comments

Comments

@brandon-bailey-rc
Copy link

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

@brandon-bailey-rc
Copy link
Author

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
}

@cody-carlson
Copy link

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'

@cody-carlson
Copy link

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

@breaman
Copy link

breaman commented Nov 17, 2021

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

@cody-carlson
Copy link

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

@owenrumney
Copy link
Member

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants