Skip to content

Commit

Permalink
fix(terraform_plan): load terraform registry checks when using terraf…
Browse files Browse the repository at this point in the history
…orm plan (#5778)

add terraform registry when using terraform plan
  • Loading branch information
YaaraVerner authored Nov 21, 2023
1 parent d6e5744 commit da4c429
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
from typing import TYPE_CHECKING, Any, cast

from checkov.common.bridgecrew.check_type import CheckType
from checkov.common.checks_infra.registry import get_graph_checks_registry
from checkov.common.bridgecrew.integration_features.base_integration_feature import BaseIntegrationFeature
from checkov.common.bridgecrew.platform_integration import bc_integration
Expand Down Expand Up @@ -50,8 +51,10 @@ def pre_scan(self) -> None:

if self.config and self.config.framework and "all" not in self.config.framework:
registries = self.config.framework
if CheckType.TERRAFORM_PLAN in registries and CheckType.TERRAFORM not in registries:
registries.append(CheckType.TERRAFORM)
else:
registries = ('terraform', 'cloudformation', 'kubernetes', 'bicep', 'terraform_plan')
registries = (CheckType.TERRAFORM, CheckType.CLOUDFORMATION, CheckType.KUBERNETES, CheckType.BICEP, CheckType.TERRAFORM_PLAN)

for r in registries:
registry = get_graph_checks_registry(r)
Expand Down

0 comments on commit da4c429

Please sign in to comment.