Courseiva
Cloud Application SecurityeasyMultiple SelectObjective-mapped

CCSP Cloud Application Security Practice Question

Which TWO of the following are secure coding practices that help prevent injection attacks?

⚠ Common exam trap

ISC2 often tests the misconception that stored procedures are inherently safe against injection, but the trap is that stored procedures can still be vulnerable if they dynamically construct SQL strings using concatenated input, so parameterization must be applied inside the procedure as well.

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

Using parameterized queries for database calls

Parameterized queries (also known as prepared statements) separate SQL logic from data by using placeholders (e.g., `?` in MySQLi or `:param` in PDO). The database driver treats the user-supplied values strictly as data, never as executable code, which prevents an attacker from injecting malicious SQL commands even if the input contains special characters like `' OR 1=1 --`.

Answer analysis

Option-by-option breakdown

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

  • Printing stack traces in production error messages

    Why it's wrong here

    This exposes system details to attackers.

  • Using parameterized queries for database calls

    Why this is correct

    Parameterized queries separate SQL logic from data, preventing injection.

  • Using stored procedures exclusively

    Why it's wrong here

    Stored procedures can still be vulnerable if they use dynamic SQL.

  • Validating and sanitizing all user inputs

    Why this is correct

    Input validation filters out malicious content before processing.

  • Storing user passwords in plaintext

    Why it's wrong here

    Passwords should be hashed and salted, not stored in plaintext.

About these practice questions

This CCSP question is part of Courseiva's 964-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 CCSP 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 CCSP exam.