nerdexam
CompTIA

CV0-004 · Question #154

A developer at a small startup company deployed some code for a new feature to its public repository. A few days later, a data breach occurred. A security team investigated the incident and found…

The correct answer is B. Hard-coded credentials. The most likely cause of the data breach is hard-coded credentials being exposed in the public repository. If the developer accidentally included database usernames and passwords in the code and pushed it to a publicly accessible repository, attackers could easily find and use…

Security

Question

A developer at a small startup company deployed some code for a new feature to its public repository. A few days later, a data breach occurred. A security team investigated the incident and found that the database was hacked. Which of the following is the most likely cause of this breach?

Options

  • ADatabase core dump
  • BHard-coded credentials
  • CCompromised deployment agent
  • DUnpatched web servers

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    71% (12)
  • C
    18% (3)
  • D
    6% (1)

Explanation

The most likely cause of the data breach is hard-coded credentials being exposed in the public repository. If the developer accidentally included database usernames and passwords in the code and pushed it to a publicly accessible repository, attackers could easily find and use them to gain unauthorized access. This is a common security oversight that leads to database Attackers often scan public repositories for sensitive information using automated tools, making hard-coded credentials a significant risk. Best practices include using environment variables, secret management tools (e.g., AWS Secrets Manager, HashiCorp Vault), and removing credentials from source code before committing.

Topics

#Hard-coded credentials#Security vulnerability#Code security#Public repository risks

Community Discussion

No community discussion yet for this question.

Full CV0-004 Practice