Skip to content

FIX: Suppress S360 SM05139 finding for DefaultAzureCredential in dev benchmark#637

Open
gargsaumya wants to merge 1 commit into
mainfrom
saumya/s360-june
Open

FIX: Suppress S360 SM05139 finding for DefaultAzureCredential in dev benchmark#637
gargsaumya wants to merge 1 commit into
mainfrom
saumya/s360-june

Conversation

@gargsaumya

@gargsaumya gargsaumya commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Work Item / Issue Reference

AB#45825

GitHub Issue: #<ISSUE_NUMBER>


Summary

This pull request makes a minor documentation improvement to the benchmarks/bench_credential_cache.py microbenchmark. It adds comments to clarify that the use of DefaultAzureCredential is intentional for benchmarking credential instance caching overhead and is not product code.

  • Added clarifying comments in both bench_no_cache and bench_with_cache functions to indicate intentional use of DefaultAzureCredential for microbenchmarking, addressing CodeQL warning SM05139. [1] [2]

…mark

Add CodeQL inline suppression comments to the credential-cache microbenchmark.
The benchmark intentionally uses DefaultAzureCredential to measure credential
instance caching overhead; it is a development-only tool, not product code.
@gargsaumya gargsaumya marked this pull request as ready for review June 22, 2026 04:09
Copilot AI review requested due to automatic review settings June 22, 2026 04:09
@github-actions github-actions Bot added the pr-size: small Minimal code update label Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates a development-only microbenchmark to document/suppress a CodeQL (SM05139) finding triggered by intentional usage of DefaultAzureCredential, clarifying that the code is not product logic and is used purely for benchmarking credential instance caching overhead.

Changes:

  • Added CodeQL suppression/justification comments next to DefaultAzureCredential() in bench_no_cache.
  • Added CodeQL suppression/justification comments next to DefaultAzureCredential() in bench_with_cache.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmarks/bench_credential_cache.py
Comment thread benchmarks/bench_credential_cache.py
@github-actions

Copy link
Copy Markdown

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

80%


📈 Total Lines Covered: 6657 out of 8238
📁 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.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 59.9%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.connection.connection.cpp: 76.2%
mssql_python.pybind.ddbc_bindings.cpp: 76.2%
mssql_python.row.py: 76.9%
mssql_python.__init__.py: 77.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.logging.py: 85.5%
mssql_python.connection.py: 85.6%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

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.

2 participants