Implementing DevOps Solutions and Practices Using Cisco Platforms (DEVOPS) — Question 63
An application is being developed to be used by the HR department of a company on a global scale. The application will be used as a central repository for employee contracts. For user access, a
RADIUS server will be used with authorized user groups.
Which action must be used to prevent developers from accidentally committing secrets in the code?
Answer options
- A. Add a unit test to block the secrets
- B. Add a precommit Git hook to block the secrets
- C. Add dast to the repository to block the secrets
- D. Add a job in the CI build to block the secrets
Correct answer: B
Explanation
The correct answer, B, is effective because a precommit Git hook can automatically check for sensitive information before allowing a commit. The other options, while they may assist in identifying issues, do not provide the immediate preventative measure that a precommit hook offers, as they either occur after the commit or require additional setup.