Skip to content

Conversation

bewithgaurav
Copy link
Collaborator

@bewithgaurav bewithgaurav commented Oct 9, 2025

Work Item / Issue Reference

AB#<WORK_ITEM_ID>

GitHub Issue: #286


Summary

Reintroduce Static Buffer as a temporary hotfix, will keep a new task to remove static tokens.

Copy link

github-actions bot commented Oct 9, 2025

📊 Code Coverage Report

🔥 Diff Coverage

0%


🎯 Overall Coverage

74%


📈 Total Lines Covered: 4179 out of 5607
📁 Project: mssql-python


Diff Coverage

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

  • mssql_python/pybind/connection/connection.cpp (0.0%): Missing lines 176

Summary

  • Total: 1 line
  • Missing: 1 line
  • Coverage: 0%

mssql_python/pybind/connection/connection.cpp

Lines 172-180

  172 SQLRETURN Connection::setAttribute(SQLINTEGER attribute, py::object value) {
  173     LOG("Setting SQL attribute");
  174     SQLPOINTER ptr = nullptr;
  175     SQLINTEGER length = 0;
! 176     static std::string buffer; // to hold sensitive data temporarily
  177 
  178     if (py::isinstance<py::int_>(value)) {
  179         int intValue = value.cast<int>();
  180         ptr = reinterpret_cast<SQLPOINTER>(static_cast<uintptr_t>(intValue));


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.connection.connection.cpp: 68.3%
mssql_python.ddbc_bindings.py: 68.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.3%
mssql_python.pybind.connection.connection_pool.cpp: 78.9%
mssql_python.cursor.py: 79.7%
mssql_python.connection.py: 81.7%
mssql_python.helpers.py: 84.7%
mssql_python.auth.py: 85.3%
mssql_python.type.py: 86.8%
mssql_python.pooling.py: 87.5%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@bewithgaurav bewithgaurav marked this pull request as ready for review October 14, 2025 11:48
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 11:48
@bewithgaurav bewithgaurav changed the title TEST: Access Token Issue FIX: Access Token Issue Oct 14, 2025
@github-actions github-actions bot added the pr-size: small Minimal code update label Oct 14, 2025
Copy link
Contributor

@Copilot 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

This PR reintroduces a static buffer as a temporary hotfix for an access token issue, addressing GitHub Issue #286. The change modifies how sensitive data is stored temporarily during SQL attribute setting.

  • Converts a local string buffer to a static buffer for holding sensitive data

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bewithgaurav bewithgaurav changed the title FIX: Access Token Issue FIX: Access Token Issue (EntraID Auth) Oct 14, 2025
@bewithgaurav bewithgaurav merged commit e8d565c into main Oct 14, 2025
21 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.

3 participants