From b6167ad25f02d67a61515d6ff05b39d64a809f2e Mon Sep 17 00:00:00 2001 From: Rabea Zreik <47931006+RabeaZr@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:09:03 +0300 Subject: [PATCH] fix(secrets): small fix for filtering (#6562) small fix --- checkov/secrets/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkov/secrets/runner.py b/checkov/secrets/runner.py index b75c6ae5fac..db9f9281a66 100644 --- a/checkov/secrets/runner.py +++ b/checkov/secrets/runner.py @@ -223,7 +223,7 @@ def run( self.pbar.close() secret_records: dict[str, SecretsRecord] = {} - secrets_in_uuid_form = ['CKV_SECRETS_116'] + secrets_in_uuid_form = ['CKV_SECRET_116'] for key, secret in secrets: check_id = secret.check_id if secret.check_id else SECRET_TYPE_TO_ID.get(secret.type) if not check_id: @@ -246,7 +246,7 @@ def run( stripped = secret.secret_value.strip(',"') if stripped != secret.secret_value: secret_key = f'{key}_{secret.line_number}_{PotentialSecret.hash_secret(stripped)}' - if secret.secret_value and is_potential_uuid(secret.secret_value) and secret.check_id in secrets_in_uuid_form: + if secret.secret_value and is_potential_uuid(secret.secret_value) and secret.check_id not in secrets_in_uuid_form: logging.info( f"Removing secret due to UUID filtering: {PotentialSecret.hash_secret(secret.secret_value)}") continue