mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Fix: Increase Entropy Requirement for Secret Redaction to Reduce False Positives (#6875)
This commit is contained in:
parent
e109f7e58e
commit
a8bce3724f
@ -221,8 +221,10 @@ class SensitiveDataFilter(logging.Filter):
|
||||
sensitive_values = []
|
||||
for key, value in os.environ.items():
|
||||
key_upper = key.upper()
|
||||
if len(value) > 2 and any(
|
||||
s in key_upper for s in ('SECRET', 'KEY', 'CODE', 'TOKEN')
|
||||
if (
|
||||
len(value) > 2
|
||||
and value != 'default'
|
||||
and any(s in key_upper for s in ('SECRET', 'KEY', 'CODE', 'TOKEN'))
|
||||
):
|
||||
sensitive_values.append(value)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user