Skip to content

Conversation

j-luong
Copy link
Contributor

@j-luong j-luong commented Aug 14, 2025

No description provided.

Copy link

snyk-io bot commented Aug 14, 2025

🎉 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)

Copy link

snyk-io bot commented Aug 14, 2025

🎉 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)

@j-luong j-luong force-pushed the fix/cli-979_scrubbingLogger branch 2 times, most recently from 92219cd to 0215ac3 Compare August 15, 2025 15:02
@@ -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,
Copy link
Contributor Author

@j-luong j-luong Aug 15, 2025

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.

@j-luong j-luong marked this pull request as ready for review August 15, 2025 15:11
@j-luong j-luong requested review from a team as code owners August 15, 2025 15:11
cursor[bot]

This comment was marked as outdated.

@j-luong j-luong force-pushed the fix/cli-979_scrubbingLogger branch from 0215ac3 to 16af22f Compare August 20, 2025 09:14
}

// Additional pattern for the specific case: 'key=value': true
s = fmt.Sprintf(`(?im)['"]([^'"\s,}]*?(?:%s)[^'"\s,}]*?=)([^'"\s,}]*?)['"]`, kws)
Copy link

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.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant