From 1c788fb71d9744bc20bab0a900219655c0649fd3 Mon Sep 17 00:00:00 2001 From: Mike Urbanski Date: Tue, 7 Nov 2023 08:07:44 -0600 Subject: [PATCH] fix(general): do not require a repo ID when using an API key and --list (#5726) do not require a repo ID when using an API key and --list --- checkov/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkov/main.py b/checkov/main.py index 2c186d51bbe..f3124c5e8ba 100755 --- a/checkov/main.py +++ b/checkov/main.py @@ -185,7 +185,7 @@ def normalize_config(self) -> None: if self.config.use_enforcement_rules and not self.config.bc_api_key: self.parser.error('Must specify an API key with --use-enforcement-rules') - if self.config.bc_api_key and not self.config.repo_id: + if self.config.bc_api_key and not self.config.repo_id and not self.config.list: self.parser.error('--repo-id is required when using a platform API key') if self.config.policy_metadata_filter and not (self.config.bc_api_key and self.config.prisma_api_url):