Suppressed CodeQL alerts related to tainted SQL command text.#4028
Suppressed CodeQL alerts related to tainted SQL command text.#4028cheenamalhotra merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to suppress CodeQL findings that flag assigning potentially tainted SQL text into SqlCommand.CommandText, on the basis that executing caller-provided T-SQL is expected behavior for a SQL client driver.
Changes:
- Added inline comments intended to suppress CodeQL alerts on
CommandTextassignments inSqlCommandconstructors (including the copy constructor). - Minor whitespace/formatting cleanup in the touched regions.
You can also share your feedback on Copilot code review. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4028 +/- ##
==========================================
- Coverage 72.65% 65.03% -7.62%
==========================================
Files 287 282 -5
Lines 43134 66043 +22909
==========================================
+ Hits 31337 42953 +11616
- Misses 11797 23090 +11293
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Suppressed CodeQL alerts related to tainted SQL command text. Accepting T-SQL from an app and executing it is a core feature of the driver.
Testing
No testing concerns. I will watch the CodeQL dashboard to see if these suppressions work as intended.