Skip to content

FIX: Test dummy test credentials to pass ADO secret scanner false positive#583

Merged
gargsaumya merged 2 commits into
mainfrom
saumya/fix-secret-scanner-gh562
May 15, 2026
Merged

FIX: Test dummy test credentials to pass ADO secret scanner false positive#583
gargsaumya merged 2 commits into
mainfrom
saumya/fix-secret-scanner-gh562

Conversation

@gargsaumya
Copy link
Copy Markdown
Contributor

@gargsaumya gargsaumya commented May 15, 2026

Work Item / Issue Reference

AB#45033

GitHub Issue: #<ISSUE_NUMBER>


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 improvements:
    • Updated connection strings in test_connect_runtime_error_mapped_to_correct_dbapi_exception to use UID=testuser;PWD=<placeholder>; for clarity and to avoid exposing sensitive information. [1] [2]

Copilot AI review requested due to automatic review settings May 15, 2026 03:27
@github-actions github-actions Bot added the pr-size: small Minimal code update label May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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; and UID=u;PWD=p; with UID=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.
@gargsaumya gargsaumya force-pushed the saumya/fix-secret-scanner-gh562 branch from ed7d865 to 7a26264 Compare May 15, 2026 03:33
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

25%


📈 Total Lines Covered: 7018 out of 27134
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No 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

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@gargsaumya gargsaumya merged commit 80ce70f into main May 15, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: small Minimal code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants