DapperLib / DapperAOT

Build time tools in the flavor of Dapper
Other
357 stars 19 forks source link

Analyzer: parameterization anti-patterns #35

Closed mgravell closed 10 months ago

mgravell commented 1 year ago

examples:

(applies in all SQL scenarios, not just QueryFirst)

should probably be a warning, category "Security", something like "Data values should not be concatenated into SQL - use parameters instead"; it is hard to offer an auto rewrite here because the specific parameter syntax is provider specific - but we might know the provider (we have some stuff for that already; that's a distant second to spotting it, though)