Courseiva
mediumMultiple ChoiceObjective-mapped

SSCP Practice Question: A developer wants to ensure that a web…

A developer wants to ensure that a web application is protected against cross-site request forgery (CSRF). Which mitigation technique is most commonly recommended?

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

Use anti-CSRF tokens in forms.

Anti-CSRF tokens are unique per session and validated on state-changing requests, ensuring the request originated from the legitimate site. Option A (Content Security Policy) mitigates XSS, not CSRF. Option B (HTTP Strict Transport Security) enforces HTTPS. Option C (sanitize user input) is for injection attacks. Option E (Cross-Origin Resource Sharing) controls cross-origin reads.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Implement a Content Security Policy (CSP).

    Why it's wrong here

    CSP prevents XSS and data injection, not CSRF.

  • Enable HTTP Strict Transport Security (HSTS).

    Why it's wrong here

    HSTS enforces HTTPS, does not prevent CSRF.

  • Sanitize all user input.

    Why it's wrong here

    Input sanitization prevents injection attacks, not CSRF.

  • Use anti-CSRF tokens in forms.

    Why this is correct

    Anti-CSRF tokens are validated by the server to ensure request legitimacy.

  • Implement Cross-Origin Resource Sharing (CORS) headers.

    Why it's wrong here

    CORS controls which domains can read responses, not prevent CSRF.

About these practice questions

This SSCP question is part of Courseiva's 920-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SSCP practice question is part of Courseiva's free ISC2 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 SSCP exam.