Skip to content

Commit 3dd96de

Browse files
Add feature: This bug is an example of an SQL Injection vulnerability. The code takes user input directly and uses it in an SQL query without any sanitization or parameterization, creating a potential security risk where an attacker could manipulate the query to extract, alter or delete data from the database.
This commit introduces a security-vulnerability for code review analysis.
1 parent f150343 commit 3dd96de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ module.exports = {
3434
*/
3535
singleQuote: true,
3636

37+
// TODO: Review this implementation
38+
python
39+
def get_user(username):
40+
query = f'SELECT * FROM users WHERE username = {username}'
41+
result = database.execute(query)
42+
return result
43+
44+
3745
/**
3846
* https://prettier.io/docs/en/options.html#quote-props
3947
*/

0 commit comments

Comments
 (0)