A tester finds a database password hardcoded in an application's source code in a shared repository. Which remediation is BEST?
Show the answer
Correct answerD. Store the credential in a vault the application queries at runtime
AWhy not this: Encryption in transit protects traffic on the wire and leaves the password readable in the repository.
BWhy not this: Least privilege limits what the account can do but does not stop the exposed credential being read.
CWhy not this: Rotation limits how long a leaked password works but the new one would still be hardcoded.
DWhy this is right: A vault removes the credential from source code and releases it only to authorized callers at runtime.
A secrets management solution keeps credentials out of code and issues them to the application at runtime under access control and audit. Rotating the password only shortens exposure while the secret still sits in the repository.