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.

@github-actions
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 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 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
gargsaumya pushed a commit that referenced this pull request Nov 3, 2025
### Work Item / Issue Reference  
<!-- 
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below (e.g.
AB#37452)
For external contributors: Insert Github Issue number below (e.g. #149)
Only one reference is required - either GitHub issue OR ADO Work Item.
-->

<!-- mssql-python maintainers: ADO Work Item -->
> AB#<WORK_ITEM_ID>

<!-- External contributors: GitHub Issue -->
> GitHub Issue: #286

-------------------------------------------------------------------
### Summary   
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
Reintroduce Static Buffer as a temporary hotfix, will keep a new task to
remove static tokens.

<!-- 
### PR Title Guide

> For feature requests
FEAT: (short-description)

> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description) 

> For Fix requests
FIX: (short-description)

> For doc update requests 
DOC: (short-description)

> For Formatting, indentation, or styling update
STYLE: (short-description)

> For Refactor, without any feature changes
REFACTOR: (short-description)

> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description) 

### Contribution Guidelines

External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary

mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above  
- Follow the PR title format and provide a meaningful summary
-->
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