Web Security — Test 1
Page 1 of 1
Question 1
Which approach is the correct primary defense against SQL injection?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 2
An attacker submits <script>steal()</script> in a comment field, and it runs in other users' browsers. What is this attack?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 3
What is CSRF (Cross-Site Request Forgery)?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 4
How should user passwords be stored?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 5
Does a correct CORS configuration protect an API from being called by scripts or tools such as curl?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 6
Which HTTP header helps prevent clickjacking?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 7
What does a Content Security Policy (CSP) primarily mitigate?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 8
Which statement about sessions is correct?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026