hardMultiple ChoiceObjective-mapped
CAS-004 Practice Question: Is analyzing a serverless application that uses…
A security engineer is analyzing a serverless application that uses AWS Lambda. Which of the following is the most critical security concern when the function processes external input?
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
✓
The function may be vulnerable to injection attacks if input is not sanitized
The most critical security concern is injection attacks (option A). In serverless applications, unsanitized external input can lead to serious vulnerabilities such as SQL injection or command injection, compromising the entire application. Option B (timeout) is a functional setting and not a security issue. Option C (environment variables) is a standard practice and secure if handled correctly. Option D (custom runtime) is irrelevant to security; the default runtime is perfectly acceptable.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The function may be vulnerable to injection attacks if input is not sanitized
Why this is correct
Injection attacks (e.g., command injection) are critical because they can lead to data exfiltration or code execution.
- ✗
The function has a timeout of 5 minutes
Why it's wrong here
Timeout settings affect execution duration, not security.
- ✗
The function uses environment variables for configuration
Why it's wrong here
Environment variables are a standard way to configure functions and are not a security issue.
- ✗
The function does not use a custom runtime
Why it's wrong here
Using a custom runtime may introduce complexity but is not inherently a security concern.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
One of 968 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.