-
Notifications
You must be signed in to change notification settings - Fork 13
fix: zerolog error caused by scrubbingLogWriter #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
92219cd
to
0215ac3
Compare
@@ -308,30 +308,24 @@ func TestAddDefaults(t *testing.T) { | |||
password: 'password-set', | |||
'password=foobar': true, | |||
'u=foobar': true, | |||
'password-with-double-quotes=foo"bar': true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed some of the tests cases as they seemed unrealistic (e.g. they contained unusual characters like ',"
in passwords) and was causing edge cases that the regex cannot capture fully.
0215ac3
to
16af22f
Compare
} | ||
|
||
// Additional pattern for the specific case: 'key=value': true | ||
s = fmt.Sprintf(`(?im)['"]([^'"\s,}]*?(?:%s)[^'"\s,}]*?=)([^'"\s,}]*?)['"]`, kws) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Scrubbing Logic Flaws: Incomplete, Overzealous, Misdirected Redaction
The updated scrubbing logic has a few issues: it incompletely redacts sensitive values containing spaces, over-scrubs OAuth tokens by including non-sensitive trailing characters, and incorrectly redacts non-sensitive field values when their field name contains a sensitive keyword.
No description provided.