Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanochShayner committed Jun 3, 2024
1 parent b79fb29 commit 4cdd4f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions checkov/secrets/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
'Hex High Entropy String': 'CKV_SECRET_19'
}

ENTROPY_CHECK_IDS = ('CKV_SECRET_6', 'CKV_SECRET_19', 'CKV_SECRET_80')
GENERIC_PRIVATE_KEY_CHECK_IDS = ('CKV_SECRET_10', 'CKV_SECRET_13')
ENTROPY_CHECK_IDS = {'CKV_SECRET_6', 'CKV_SECRET_19', 'CKV_SECRET_80'}
GENERIC_PRIVATE_KEY_CHECK_IDS = {'CKV_SECRET_10', 'CKV_SECRET_13'}

CHECK_ID_TO_SECRET_TYPE = {v: k for k, v in SECRET_TYPE_TO_ID.items()}

Expand Down Expand Up @@ -325,7 +325,7 @@ def _prioritise_secrets(secret_records: Dict[str, SecretsRecord], secret_key: st
secret_records.pop(secret_key)
return True
if secret_records[secret_key].check_id in GENERIC_PRIVATE_KEY_CHECK_IDS:
if check_id not in GENERIC_PRIVATE_KEY_CHECK_IDS + ENTROPY_CHECK_IDS:
if check_id not in GENERIC_PRIVATE_KEY_CHECK_IDS | ENTROPY_CHECK_IDS:
secret_records.pop(secret_key)
return True
return False
Expand Down

0 comments on commit 4cdd4f3

Please sign in to comment.