Skip to content

Commit

Permalink
fix(secrets): small fix for filtering (#6562)
Browse files Browse the repository at this point in the history
small fix
  • Loading branch information
RabeaZr authored Jul 10, 2024
1 parent d64acd5 commit b6167ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checkov/secrets/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit b6167ad

Please sign in to comment.