Skip to content

Instantly share code, notes, and snippets.

@schosterbarak
Created March 1, 2022 18:28
Show Gist options
  • Select an option

  • Save schosterbarak/dae7ed1154a7be8fb08e4aa766598cec to your computer and use it in GitHub Desktop.

Select an option

Save schosterbarak/dae7ed1154a7be8fb08e4aa766598cec to your computer and use it in GitHub Desktop.

Revisions

  1. schosterbarak created this gist Mar 1, 2022.
    20 changes: 20 additions & 0 deletions ExternalData.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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()