5. Networks and Cybersecurity

Secure Coding — Quiz

Test your understanding of secure coding with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

A developer is writing a function that accepts a file path from user input. Which of the following is the most secure approach to handle this input?

Question 2

A developer is implementing input validation for an email address field. Which of the following regular expressions provides the most secure and effective validation?

Question 3

Which of the following is the best practice for securely handling user-supplied URLs before redirecting?

Question 4

A developer is writing code that processes JSON input from users. Which of the following is the most secure approach to handle this input?

Question 5

When handling user-supplied numeric input, which of the following is the most secure approach to prevent integer overflow vulnerabilities?