CASP+ CAS-003 – Question 225

0
71
⚠️ Retired / Legacy Exam: This exam has been retired or replaced. These practice questions are kept for reference only. Please check the official vendor website for current exam versions before studying.

A security engineer is assisting a developer with input validation, and they are studying the following code block:

The security engineer wants to ensure strong input validation is in place for customer-provided account identifiers. These identifiers are ten-digit numbers. The developer wants to ensure input validation is fast because a large number of people use the system.

Which of the following would be the BEST advice for the security engineer to give to the developer?

A. Replace code with Java-based type checks
B. Parse input into an array
C. Use regular expressions
D. Canonicalize input into string objects before validation

Correct Answer: C

Cloud Tech
Cloud Tech is a small, independent team that writes free practice questions for Microsoft Azure, AWS and CompTIA certification exams. We write every question ourselves against the current official exam outline, explain why each option is right or wrong, link to the vendor's documentation, and update or archive sets when an exam changes. Spotted a mistake? Email [email protected].