Question 330
At fictional Ivymoor Transit, a software-security team is conducting an application release-readiness meeting under a documented customer-data protection mandate. The case observation is: A search endpoint builds SQL by concatenating user-supplied filters into a query string. The team must select a defensible control or assessment. Which repeatable engineering safeguard would most directly reduce recurrence?
Explanation
Writer-proposed answer: B (UNVERIFIED)
Preliminary individual option explanations — NOT expert validated
Correct Answer
Prepared statements separate untrusted data values from database query syntax. Injection probes are treated as input data rather than executable SQL while legitimate search cases still work.
Incorrect Answers
This response concerns mass assignment of protected fields. Here, a search endpoint builds SQL by concatenating user-supplied filters into a query string. The confirming evidence is: Injection probes are treated as input data rather than executable SQL while legitimate search cases still work.
Focusing on unsafe deserialization would leave this problem unresolved: A search endpoint builds SQL by concatenating user-supplied filters into a query string.
Output encoding for html concerns another aspect of the problem. Prepared statements separate untrusted data values from database query syntax.