CHORE: sanitize remaining dummy connection strings to Server=localhost - #704
Merged
Jahnvi Thakkar (jahnvi480) merged 1 commit intoAug 5, 2026
Merged
Conversation
Follow-up to #703. The 1ES SQL-credential push-protection detector (SEC101/037) re-scans the modified test blobs during the GitHub->ADO mirror and flags the remaining dummy UID/PWD connection strings whose Server points at a non-local host. Change all such strings in test_008_auth.py and test_024_bulkcopy_arrow.py to Server=localhost (repo convention). These are fully mocked tests; no assertion depends on the server value. UID-only AD/MSI lines and the connection-string-parser tests are intentionally left unchanged.
gargsaumya
approved these changes
Aug 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a follow-up sanitation pass on test-only dummy connection strings to align with the repo’s committed-credential convention (Server=localhost) and avoid GitHub → ADO mirror push-protection false positives.
Changes:
- Updated multiple dummy
UID/PWDconnection strings intests/test_008_auth.pyto useServer=localhost. - Updated four dummy
UID/PWDconnection strings intests/test_024_bulkcopy_arrow.pyto useServer=localhost.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_008_auth.py | Replaces remaining dummy Server=test / Server=s SQL-auth connection strings (with UID/PWD) to Server=localhost. |
| tests/test_024_bulkcopy_arrow.py | Replaces remaining dummy Server=testhost SQL-auth connection strings (with UID/PWD) to Server=localhost. |
Gaurav Sharma (bewithgaurav)
approved these changes
Aug 5, 2026
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.9%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 76.2%
mssql_python.__init__.py: 77.6%
mssql_python.row.py: 77.6%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 81.4%
mssql_python.pybind.connection.connection.cpp: 83.7%
mssql_python.logging.py: 85.5%🔗 Quick Links
|
Subrata (subrata-ms)
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #703. When the GitHub → ADO mirror re-pushes the modified test blobs, the 1ES SQL-credential push-protection detector (
SEC101/037 SqlLegacyCredentials) re-scans the whole file and flags the remaining dummyUID/PWDconnection strings whoseServerpoints at a non-local host — not just the 7 lines fixed in #703.This sanitizes all such strings in the two affected test files to
Server=localhost, which is the repo convention for committed dummy credentials (.github/copilot-instructions.md).No behavior change: every affected test is fully mocked (
@patch(...ddbc_bindings.Connection)/mssql_python.cursor) and none of the assertions depend on the server value — they assert on pool keys, token factories,connection_strsanitization, and cleanup.Scope (15 lines,
Server=<host>→Server=localhost):tests/test_008_auth.py— 11 strings (Server=test/Server=s)tests/test_024_bulkcopy_arrow.py— 4 strings (Server=testhost)Intentionally left unchanged:
SqlLegacyCredentialsmatch).tests/test_010_*/tests/test_012_*connection-string-parser tests, where thetcp:server.database.windows.netvalue is integral to what the parser test exercises.$(DB_PASSWORD),$SQL_IP) orlocalhost/(localdb)/127.0.0.1.AB#46836