Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A validated invoice ID is inserted into a SQL query. Which control protects the SQL interpretation boundary?" on CodeWiki (https://codewiki.com/practice/mcq/security/web-security-fundamentals/choose-control-at-sql-boundary/).
Context (verbatim from the page):
"""
A validated invoice ID is inserted into a SQL query. Which control protects the SQL interpretation boundary?
Bind the ID as a parameter through the database driver.
Add the Access-Control-Allow-Origin response header.
HTML-encode the ID before string concatenation.
Make the ID a UUID so it is difficult to guess.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Security. Where you are unsure, say so.