Skip to content

Instantly share code, notes, and snippets.

@schosterbarak
Created March 1, 2022 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schosterbarak/dae7ed1154a7be8fb08e4aa766598cec to your computer and use it in GitHub Desktop.
Save schosterbarak/dae7ed1154a7be8fb08e4aa766598cec to your computer and use it in GitHub Desktop.
from typing import Dict, List, Any
from checkov.common.models.enums import CheckResult, CheckCategories
from checkov.terraform.checks.data.base_check import BaseDataCheck
class ExternalData(BaseDataCheck):
def __init__(self) -> None:
name = 'Ensure terraform external data blocks runs vetted code'
id = "CKV_TF_DATA_EXTERNAL_1"
supported_data = ["external"]
categories = [CheckCategories.SUPPLY_CHAIN]
super().__init__(name=name, id=id, categories=categories, supported_data=supported_data)
def scan_data_conf(self, conf: Dict[str, List[Any]]) -> CheckResult:
# based on https://hackingthe.cloud/terraform/terraform_enterprise_metadata_service/
return CheckResult.FAILED
check = ExternalData()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment