Courseiva
Security →easyMultiple Choice

CV0-004 Security Practice Question

Which of the following is a best practice for managing secrets in cloud applications?

⚠ Common exam trap

CV0-004 often tests the misconception that environment variables are secure; candidates may choose them over a dedicated secrets manager, not realizing that environment variables can be exposed and lack rotation.

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 a cloud secrets manager with automatic rotation

Using a cloud secrets manager with automatic rotation is the best practice because it centralizes secret storage, encrypts secrets at rest and in transit, and automates rotation to reduce the risk of credential leakage. Services like AWS Secrets Manager, Azure Key Vault, and Google Secret Manager provide fine-grained access control and audit logging, ensuring secrets are not exposed in code or configuration files.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Embed secrets in application code

    Why it's wrong here

    Hard-coded secrets are committed to version control, persist in build artefacts and images, and cannot be rotated without a code change and redeployment. Embedding values in code suits static, non-sensitive constants, not credentials; a secrets manager providing encryption, rotation and access auditing is the correct mechanism.

  • ✗

    Store secrets in environment variables

    Why it's wrong here

    Environment variables are readable by any process in the container and leak into crash dumps, logs and child processes, and they cannot be rotated without redeploying. They suit non-sensitive runtime configuration, whereas a dedicated secrets manager with encryption, rotation and audit trails is required for credentials.

  • ✓

    Use a cloud secrets manager with automatic rotation

    Why this is correct

    A cloud secrets manager with automatic rotation satisfies the core requirement by storing credentials outside application code and rotating them on a defined schedule, limiting exposure if leaked. This removes hardcoded secrets from repositories and configuration files, which is the primary risk the question targets.

  • ✗

    Share secrets via email

    Why it's wrong here

    Email transmits secrets in cleartext across mail relays and leaves copies in inboxes, archives and backups, so exposure cannot be revoked or audited. It is tempting because email is ubiquitous and quick for ad hoc credential handover, but a managed secrets vault with rotation and access logging is the correct mechanism.

About these practice questions

This CV0-004 question is part of Courseiva's 834-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 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 CV0-004 exam.