From 71e1bcc626b1caee7027e940c5290764cd8a0ae9 Mon Sep 17 00:00:00 2001 From: Kwame Mintah <37197235+kwame-mintah@users.noreply.github.com> Date: Wed, 2 Aug 2023 08:43:19 +0100 Subject: [PATCH] feat(general): allow `--var-file` to be passed as environment variable (#5406) feat(ext_argument_parser): allow `--var-file` to be passed as environment variable allow for terraform var file to be sourced via environment variable `CKV_VAR_FILE`. Refs #5240 --- checkov/common/util/ext_argument_parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/checkov/common/util/ext_argument_parser.py b/checkov/common/util/ext_argument_parser.py index f36d4641e75..6007f088995 100644 --- a/checkov/common/util/ext_argument_parser.py +++ b/checkov/common/util/ext_argument_parser.py @@ -391,6 +391,7 @@ def add_parser_args(self) -> None: "https://www.terraform.io/docs/language/values/variables.html#variable-definitions-tfvars-files)." "Currently only supported for source Terraform (.tf file), and Helm chart scans." "Requires using --directory, not --file.", + env_var="CKV_VAR_FILE", ) self.add( "--external-modules-download-path",