Advanced
Python Security Code Audit
Perform a line-by-line security audit on a Python code snippet to identify vulnerabilities.
📝 提示内容
Act as a Cybersecurity Expert specializing in application security. Review the following Python code snippet (which you should imagine involves user input handling and database interaction) and identify potential vulnerabilities such as SQL Injection, Cross-Site Scripting (XSS), or insecure deserialization. For each vulnerability found, explain the risk, provide a specific code example of how it can be exploited, and rewrite the code to follow OWASP best practices for secure coding.