mediumMultiple ChoiceObjective-mapped
CAS-004 Practice Question: An enterprise is adopting a DevOps model and…
An enterprise is adopting a DevOps model and wants to integrate security into the CI/CD pipeline. The security architect recommends adding automated security testing. Which phase of the pipeline should static application security testing (SAST) be introduced to minimize rework?
⚠ Common exam trap
CompTIA often tests the distinction between SAST (static, pre-execution) and DAST (dynamic, runtime), and the trap here is assuming security testing can be deferred to later stages like staging or production without understanding the cost of rework.
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
✓
During the build phase after code commit
SAST scans source code or compiled binaries for vulnerabilities without executing the application. Introducing SAST during the build phase, immediately after code commit and before artifacts are packaged, allows developers to catch and fix security flaws early when remediation cost is lowest, aligning with the 'shift left' principle in DevOps.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
During the build phase after code commit
Why this is correct
SAST analyzes source code, so running it in the build phase catches issues early.
- ✗
During the production deployment phase
Why it's wrong here
At deployment, vulnerabilities have already been integrated; rework is costly.
- ✗
After the code is promoted to production
Why it's wrong here
Post-production is too late; vulnerabilities are already exposed.
- ✗
During runtime in the staging environment
Why it's wrong here
Introducing SAST during runtime in staging contradicts its fundamental design: SAST analyses source code or binaries without executing them, so it cannot function during runtime. This placement fails the stem’s requirement to minimise rework, because vulnerabilities discovered at staging are far costlier to fix than those caught earlier in the pipeline. The option is tempting because runtime testing (e.g., DAST) is a valid security practice for staging, and one might conflate SAST with dynamic analysis, but SAST specifically requires pre-execution code scanning.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 968-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 →
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.