Vulnerability Management

A code review finds database passwords hard-coded in an application's source repository. What should the developers do?

Show the answer

Correct answerC. Move them to a vault and rotate them

AWhy not this: A WAF filters web traffic and does nothing about credentials stored in the repository.

BWhy not this: Base64 is reversible encoding, not encryption, so the passwords stay readable to anyone with the source.

CWhy this is right: Secrets management removes credentials from code, and rotation invalidates passwords already exposed in the repository.

DWhy not this: Accepting the finding leaves exposed credentials in place; a fix is available and simple.

Secure coding practice is to keep secrets out of source code, store them in a secrets vault, and rotate those already exposed. Base64 is only encoding, not protection, so anyone with the code can reverse it.