Skip to content

Commit

Permalink
Add secret count to pre commit hook (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
brokoli777 authored Dec 20, 2024
1 parent 952c008 commit 5ed9de6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion detect_secrets/pre_commit_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ def pretty_print_diagnostics(secrets: SecretsCollection, width: int = 80) -> Non
),
)
print()

# Display found secrets
for _, secret in secrets:
print(secret)

# Display the number of detected secrets
print(f"\nTotal secrets detected: {len(secrets)}")

# Display mitigation suggestions
print('Possible mitigations:')
wrapper = textwrap.TextWrapper(
Expand Down

0 comments on commit 5ed9de6

Please sign in to comment.