Skip to content

Commit

Permalink
Fix: Secret filtering
Browse files Browse the repository at this point in the history
If a value has less than 8 characters, it cannot be a secret as it does not have enough entropy
  • Loading branch information
tofarr committed Feb 21, 2025
1 parent 35bab50 commit 463cf3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openhands/core/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def filter(self, record):
sensitive_values = []
for key, value in os.environ.items():
key_upper = key.upper()
if len(value) > 2 and any(
if len(value) >= 8 and any(
s in key_upper for s in ('SECRET', 'KEY', 'CODE', 'TOKEN')
):
sensitive_values.append(value)
Expand Down

0 comments on commit 463cf3e

Please sign in to comment.