Skip to content
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

Improve MongoDB connection string matching #1550

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Jul 26, 2023

This mostly fixes #1512, although it would be valuable to add real secrets to test verification of multiple hosts, connection options, etc.

@rgmz rgmz force-pushed the feat/mongodb-regex branch 3 times, most recently from ee65d94 to 284590e Compare July 28, 2023 17:05
@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from 7f1b02e to ff9db3a Compare August 16, 2023 15:23
@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from 707b6bd to daf8947 Compare September 1, 2023 01:39
@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from add3140 to b6ceaa2 Compare October 17, 2023 17:48
@rgmz
Copy link
Contributor Author

rgmz commented Oct 17, 2023

@zricethezav this should be ready for review now.

@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from 8f434af to c71f2d7 Compare October 30, 2023 00:07
@rgmz rgmz force-pushed the feat/mongodb-regex branch 3 times, most recently from f2732cf to 159f012 Compare January 27, 2024 17:06
@rgmz rgmz mentioned this pull request Feb 28, 2024
2 tasks
@rgmz rgmz mentioned this pull request Mar 21, 2024
2 tasks
@rgmz rgmz force-pushed the feat/mongodb-regex branch 3 times, most recently from 3ac447e to 6b52a69 Compare May 24, 2024 21:37
@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from 99d7bf9 to 4005150 Compare June 5, 2024 00:55
@rgmz rgmz force-pushed the feat/mongodb-regex branch 3 times, most recently from b98c69e to e547cf5 Compare June 21, 2024 02:44
@rgmz rgmz force-pushed the feat/mongodb-regex branch 2 times, most recently from 234c262 to 3e7540d Compare July 1, 2024 18:35
@rgmz rgmz mentioned this pull request Sep 23, 2024
2 tasks
Copy link
Collaborator

@ahrav ahrav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rgmz, sorry for just seeing this PR. Thanks for the detailed test cases. I’ve added some test credentials, and the tests are all passing.

if !isErrDeterminate(err) {
isVerified, verificationErr := verifyUri(ctx, resMatch, timeout)
s1.Verified = isVerified
if !isErrDeterminate(verificationErr) {
s1.SetVerificationError(err, resMatch)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this should be verificationErr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It absolutely should be.

@ahrav ahrav merged commit 75557f6 into trufflesecurity:main Sep 23, 2024
11 of 12 checks passed
@rgmz rgmz deleted the feat/mongodb-regex branch September 23, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

MongoDB pattern does not capture connection string options
2 participants