Skip to content

Commit b6167ad

Browse files
authored
fix(secrets): small fix for filtering (#6562)
small fix
1 parent d64acd5 commit b6167ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

checkov/secrets/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def run(
223223
self.pbar.close()
224224

225225
secret_records: dict[str, SecretsRecord] = {}
226-
secrets_in_uuid_form = ['CKV_SECRETS_116']
226+
secrets_in_uuid_form = ['CKV_SECRET_116']
227227
for key, secret in secrets:
228228
check_id = secret.check_id if secret.check_id else SECRET_TYPE_TO_ID.get(secret.type)
229229
if not check_id:
@@ -246,7 +246,7 @@ def run(
246246
stripped = secret.secret_value.strip(',"')
247247
if stripped != secret.secret_value:
248248
secret_key = f'{key}_{secret.line_number}_{PotentialSecret.hash_secret(stripped)}'
249-
if secret.secret_value and is_potential_uuid(secret.secret_value) and secret.check_id in secrets_in_uuid_form:
249+
if secret.secret_value and is_potential_uuid(secret.secret_value) and secret.check_id not in secrets_in_uuid_form:
250250
logging.info(
251251
f"Removing secret due to UUID filtering: {PotentialSecret.hash_secret(secret.secret_value)}")
252252
continue

0 commit comments

Comments
 (0)