Skip to content

Commit aee194a

Browse files
authored
Merge pull request #115 from omg2hei/patch-1
Fix bug with commit hash error.
2 parents 608802a + d98e54c commit aee194a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

truffleHog/truffleHog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def find_entropy(printableDiff, commit_time, branch_name, prev_commit, blob, com
185185
entropicDiff['diff'] = blob.diff.decode('utf-8', errors='replace')
186186
entropicDiff['stringsFound'] = stringsFound
187187
entropicDiff['printDiff'] = printableDiff
188-
entropicDiff['commitHash'] = commitHash
188+
entropicDiff['commitHash'] = prev_commit.hexsha
189189
entropicDiff['reason'] = "High Entropy"
190190
return entropicDiff
191191

@@ -209,7 +209,7 @@ def regex_check(printableDiff, commit_time, branch_name, prev_commit, blob, comm
209209
foundRegex['stringsFound'] = found_strings
210210
foundRegex['printDiff'] = found_diff
211211
foundRegex['reason'] = key
212-
foundRegex['commitHash'] = commitHash
212+
foundRegex['commitHash'] = prev_commit.hexsha
213213
regex_matches.append(foundRegex)
214214
return regex_matches
215215

0 commit comments

Comments
 (0)