'checkov custom policy working only with terraform code and not with cloudformation
I created a Checkov custom YAML policy and noticed that only terraform files are getting scanned with the custom policy. Did not find any documentation that confirms this as the expected behavior. How can I scan cloudformation code with custom policy?
Here is the custom policy I used (Basic query) - https://www.checkov.io/3.Custom%20Policies/Examples.html
Below are the commands
# cd to cfn folder
# my custom policy is in my_extra_checks folder
checkov -d . --external-checks-dir my_extra_checks
output has other scans but not the custom scan.
cloudformation scan results:
Passed checks: 1, Failed checks: 1, Skipped checks: 0
Solution 1:[1]
It all depends how you define your resources, I had a similar problem. I removed the scope
, and also set my attributes
to Tags
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | shearn89 |