fix(misconf): handle of unresolvable values in checks #7764
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/misconfiguration
Issues relating to misconfiguration scanning
Milestone
If the value is equal to
cty.NilVal
(for terraform configurations) or is unknown, it is marked as unresolvable. Methods that check conditions return false if the value is unresolvable. For example, calling theEmpty
method for an unresolvable empty string will return false, and calling theEqualTo
method with an argument of 0 for an unresolvable number 0 will also return false. This helps avoid false positives when the value is unknown. Example of a configuration where the kms_master_key_id attribute is unknown because it references an attribute from a data block:Rego checks should use functions that take into account handling of unresolvable values instead of directly accessing them.
Discussed in #7760
The text was updated successfully, but these errors were encountered: