easyMultiple Choice
CAS-004 Benefit of IaC for security Practice Question
Which of the following is the primary benefit of using infrastructure as code (IaC) for automating security configurations?
⚠ Common exam trap
It's easy for candidates to think IaC eliminates the need for security testing (Option A) because automation implies perfection, but in reality, IaC code itself must be tested for security flaws, just like application code.
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
✓
It ensures consistent and repeatable security configurations
Infrastructure as code (IaC) enables security configurations to be defined in declarative or procedural scripts (e.g., Terraform, AWS CloudFormation, Ansible). This ensures that every deployment applies the exact same security settings (e.g., firewall rules, IAM policies, encryption at rest) without drift, making configurations consistent and repeatable across environments. The primary benefit is eliminating manual, error-prone processes that lead to configuration inconsistencies.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It eliminates the need for security testing
Why it's wrong here
IaC defines and enforces configuration but cannot validate runtime behaviour, so security testing remains necessary. It is tempting because automated, repeatable deployments reduce configuration errors, and that consistency is the real benefit; testing still verifies vulnerabilities, access paths and runtime state.
- ✓
It ensures consistent and repeatable security configurations
Why this is correct
IaC declares security configurations in version-controlled templates that are applied identically across every deployment, removing manual drift and configuration error. This repeatability satisfies the stem's primary-benefit question, distinguishing IaC from one-off scripting or documentation-based hardening.
- ✗
It allows unapproved changes to be deployed faster
Why it's wrong here
IaC enforces reviewed, version-controlled configurations, so it restricts unapproved drift rather than accelerating it. It is tempting because pipelines do deploy changes rapidly, and that speed is genuinely valuable for approved, audited releases, but the security benefit is preventing unauthorised modification.
- ✗
It increases manual oversight of security settings
Why it's wrong here
IaC replaces manual configuration with codified, automated deployment, reducing rather than increasing manual oversight. It is tempting because human review of pull requests does add governance, but that review happens in version control, not through hands-on administration of live security settings.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CAS-005 exam frequently reuses these exact scenarios with slightly different constraints.
✓It ensures consistent and repeatable security configurationsCorrect answer▾
Why this is correct
IaC declares security configurations in version-controlled templates that are applied identically across every deployment, removing manual drift and configuration error. This repeatability satisfies the stem's primary-benefit question, distinguishing IaC from one-off scripting or documentation-based hardening.
✗It eliminates the need for security testingWrong answer — click to see why▾
Why this is wrong here
IaC does not eliminate testing; it automates deployment.
✗It allows unapproved changes to be deployed fasterWrong answer — click to see why▾
Why this is wrong here
Unapproved changes are a risk, not a benefit.
✗It increases manual oversight of security settingsWrong answer — click to see why▾
Why this is wrong here
IaC reduces manual oversight.
Analysis generated from the official CAS-005blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
About these practice questions
One of 973 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.