Challenge 001
Find 7 production problems in this AI-generated FastAPI endpoint.
API_KEY = "sk-live-secret"
@app.get("/users")
def users(q: str):
sql = f"SELECT * FROM users WHERE name = '{q}'"
print("query", sql)
return db.execute(sql)Hardcoded secret; missing authentication; SQL injection; no input constraints; sensitive logging; no error handling; no result limiting.