Skip to content

Commit

Permalink
fix(secrets): fix empty diff scan (#6822)
Browse files Browse the repository at this point in the history
fix empty diff scan
  • Loading branch information
omryMen authored Nov 10, 2024
1 parent bedd9ee commit e946e6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checkov/secrets/scan_git_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ def _run_scan_one_commit(commit: Commit) -> Tuple[List[RawStore], int]:
scanned_file_count = 0
commit_hash = commit.metadata.commit_hash
for file_name, file_diff in commit.files.items():
if len(file_diff) == 0:
continue
file_results = [*scan.scan_diff(file_diff)]
if file_results:
logging.debug(
Expand Down

0 comments on commit e946e6c

Please sign in to comment.