Skip to content

Fix CodeQL cs/microsoft/sql-injection false positives (SM03934)#2621

Open
kburtram wants to merge 1 commit intomainfrom
dev/karlb/codeql
Open

Fix CodeQL cs/microsoft/sql-injection false positives (SM03934)#2621
kburtram wants to merge 1 commit intomainfrom
dev/karlb/codeql

Conversation

@kburtram
Copy link
Member

Suppress two CodeQL sql-injection alerts that are intentional by design:

ReliableSqlCommand.CommandText setter — this class wraps SqlCommand for reliable execution; accepting user SQL is its entire purpose.
Batch.cs localCommand.CommandText = script — this is the batch execution engine; executing user-supplied SQL scripts is what it does.
Both suppressions use inline // CodeQL [SM03934] comments with justifications explaining the intentional design, rather than blanket SuppressMessage attributes, so the rationale is visible at the point of use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant