FIX: Test dummy test credentials to pass ADO secret scanner false positive#583
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates two test connection strings in exception-handling tests to use placeholder credentials so the ADO secret scanner stops flagging them as false positives.
Changes:
- Replace
UID=baduser;PWD=wrongpassword;andUID=u;PWD=p;withUID=testuser;PWD=<placeholder>;in two test invocations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…anner PR #562 introduced test code with UID/PWD credentials that trigger the Azure DevOps secret scanner (SEC101/037: SqlLegacyCredentials), blocking the GitHub-to-ADO sync pipeline. Changed all connection strings in test_connect_runtime_error_mapped_to_correct_dbapi_exception to use Trusted_Connection=yes instead of UID/PWD parameters. These are mocked tests (RuntimeError is raised before connection), so Windows Authentication works without affecting test behavior. Follows the pattern from PR #369 which fixed similar scanner issues by replacing SQL Auth with Windows Auth in test connection strings.
ed7d865 to
7a26264
Compare
bewithgaurav
approved these changes
May 15, 2026
jahnvi480
approved these changes
May 15, 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.build._deps.simdutf-src.src.haswell.implementation.cpp: 0.4%
mssql_python.pybind.build._deps.simdutf-src.src.implementation.cpp: 6.7%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.implementation.h: 10.4%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.scalar.utf16_to_utf8.utf16_to_utf8.h: 25.3%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.7%
mssql_python.pybind.build._deps.simdutf-src.include.simdutf.internal.isadetection.h: 65.3%
mssql_python.row.py: 70.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 74.2%🔗 Quick Links
|
bewithgaurav
approved these changes
May 15, 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.
Work Item / Issue Reference
Summary
This pull request makes minor updates to the exception handling tests to improve clarity and security. The test connection strings have been updated to use a consistent placeholder for sensitive information.
test_connect_runtime_error_mapped_to_correct_dbapi_exceptionto useUID=testuser;PWD=<placeholder>;for clarity and to avoid exposing sensitive information. [1] [2]