mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Update swift/ql/src/queries/Security/CWE-089/SqlInjection.qhelp
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ If a database query (such as a SQL query) is built from user-provided data witho
|
||||
<recommendation>
|
||||
|
||||
<p>
|
||||
Most database connector libraries offer a way to safely embed untrusted data into a query using query parameters or prepared statements. You should use these features to build queries, rather than string concatenation or similar methods. It's also possible to escape (sanitize) user-controlled strings so that they can be included directly in an SQL command, but this approach is only safe if the chosen escaping function is robust.
|
||||
Most database connector libraries offer a way to safely embed untrusted data into a query using query parameters or prepared statements. You should use these features to build queries, rather than string concatenation or similar methods. You can also escape (sanitize) user-controlled strings so that they can be included directly in an SQL command, but this approach is only safe if the chosen escaping function is robust.
|
||||
</p>
|
||||
|
||||
</recommendation>
|
||||
|
||||
Reference in New Issue
Block a user