CAS-004 Security Operations Practice Question
A security engineer is configuring a Web Application Firewall (WAF) to protect an e-commerce site against SQL injection attacks. The WAF is deployed in reverse proxy mode. The engineer notices that legitimate search queries containing single quotes are being blocked. Which of the following actions should the engineer take to reduce false positives while maintaining protection?
⚠ Common exam trap
The trap here is thinking that any request with a single quote is malicious, when in fact legitimate queries may contain them, and the solution is contextual tuning rather than blanket blocking.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Tune the SQL injection rule to allow single quotes in specific parameter contexts, such as search parameters, while still blocking suspicious patterns.
Tuning the SQL injection rule to allow single quotes in specific contexts, such as search parameters, while still blocking malicious patterns is the most effective way to reduce false positives without compromising security. This approach requires understanding the application's normal input and crafting rules that distinguish between benign and malicious use of special characters.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Tune the SQL injection rule to allow single quotes in specific parameter contexts, such as search parameters, while still blocking suspicious patterns.
Why this is correct
Tuning the rule to understand the application's expected input, such as allowing single quotes in search parameters but still detecting SQL injection patterns like ' OR '1'='1', reduces false positives while maintaining protection. This contextual approach is a best practice for WAF tuning, balancing security and usability.
- ✗
Switch the WAF to detection-only mode so that it logs but does not block SQL injection attempts.
Why it's wrong here
Detection-only mode would stop blocking attacks, leaving the site vulnerable. While it might reduce false positives by not blocking legitimate traffic, it also allows actual SQL injection attacks to succeed. This is not an acceptable trade-off for a production e-commerce site.
- ✗
Disable the SQL injection rule set entirely to prevent blocking of legitimate traffic.
Why it's wrong here
Disabling the SQL injection rule set would remove protection against SQL injection attacks, leaving the application vulnerable. This is not acceptable because it sacrifices security for functionality. The goal is to reduce false positives without eliminating protection, so this action is too drastic and incorrect.
- ✗
Create a whitelist rule that allows requests containing single quotes from known trusted IP addresses.
Why it's wrong here
Whitelisting IP addresses for requests with single quotes does not address the root cause and could be bypassed by attackers who spoof IPs or use compromised trusted hosts. It also does not help legitimate users from other IPs. This approach is not scalable and may still allow SQL injection from trusted sources if they are compromised.
Go deeper
Related to this question
About these practice questions
One of 973 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.