-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Checkov ignores terraform tfvars file specified in --var-file
flag
#4321
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
Comments
@bridgecrew-bot Can you assign someone to this? |
@gruebel - Hi, I would like to pick this issue up. |
@StevePerezUK sure go ahead 🙂 |
Does the Based on OP's' example I would assume the following, similar to how terraform includes $ checkov -d checkov_debug/ -c CKV_AZURE_44 --var-file=vars/terraform.tfvars |
@cbcoutinho - This is the requirement to fix --var-file so it works in the same way as terraform. |
Thanks for contributing to Checkov! We've automatically marked this issue as stale to keep our issues list tidy, because it has not had any activity for 6 months. It will be closed in 14 days if no further activity occurs. Commenting on this issue will remove the stale tag. If you want to talk through the issue or help us understand the priority and context, feel free to add a comment or join us in the Checkov slack channel at codifiedsecurity.slack.com |
Not stale. |
I'm still seeing this issue, even when adding a file which does not exist, no error or warning is thrown. |
@StevePerezUK any updates in this? |
Thanks for contributing to Checkov! We've automatically marked this issue as stale to keep our issues list tidy, because it has not had any activity for 6 months. It will be closed in 14 days if no further activity occurs. Commenting on this issue will remove the stale tag. If you want to talk through the issue or help us understand the priority and context, feel free to add a comment or join us in the Checkov slack channel at codifiedsecurity.slack.com |
Hello |
Do we have any update on this? or any workaround on how to include .tfvars in the same or different directory while scanning? |
The severity of this issue is severely under-considered. This defect causes tests to be skipped, and in many scenarios, it causes checkov to issue misleading and erroneous reports. As an end-user, I had no idea this was happening, resulting in the deployment of nonconforming IAC. |
Describe the issue
Checkov ignores path to tfvars file specified in
--var-file
when file is in different directory than terraform root module.Deep analysis has been made in other PR discussion: #3580 (comment)
Examples
main.tf:
terraform.tfvars:
Directory structure:
checkov execution (irrevelant output omitted):
Expected checkov output (irrevelant output omitted):
Version:
The text was updated successfully, but these errors were encountered: