Download aion-code-reviewer/data/security.py from Wall-E-30/Code-Reviewer-and-Optimizer: direct link, hf CLI and curl.
- Browser
- Download file 296 Bytes
-
https://huggingface.co/Wall-E-30/Code-Reviewer-and-Optimizer/resolve/main/aion-code-reviewer/data/security.py
- Command line
-
hf download hf://Wall-E-30/Code-Reviewer-and-Optimizer/aion-code-reviewer/data/security.py
-
curl -L -o security.py https://huggingface.co/Wall-E-30/Code-Reviewer-and-Optimizer/resolve/main/aion-code-reviewer/data/security.py
296 Bytes
| import sqlite3 | |
| def get_user_data(user_id): | |
| conn = sqlite3.connect('users.db') | |
| cursor = conn.cursor() | |
| # VULNERABLE: Direct string formatting leads to SQL Injection | |
| query = f"SELECT * FROM users WHERE id = '{user_id}'" | |
| cursor.execute(query) | |
| return cursor.fetchone() |