CAS-005 · Question #185
CAS-005 Question #185: Real Exam Question with Answer & Explanation
The correct answer is B: Pre-commit code linting. To reduce deployment failures caused by minor code issues and security check failures, developers should use pre-commit code linting to catch errors early and automated regression testing to ensure new code doesn't break existing functionality.
Question
A company updates its cloud-based services by saving infrastructure code in a remote repository. The code is automatically deployed into the development environment every time the code is saved to the repository. The developers express concern that the deployment often fails, citing minor code issues and occasional security control check failures in the development environment. Which of the following should a security engineer recommend to reduce the deployment failures? (Choose two.)
Options
- ASoftware composition analysis
- BPre-commit code linting
- CRepository branch protection
- DAutomated regression testing
- ECode submit authorization workflow
- FPipeline compliance scanning
Explanation
To reduce deployment failures caused by minor code issues and security check failures, developers should use pre-commit code linting to catch errors early and automated regression testing to ensure new code doesn't break existing functionality.
Common mistakes.
- A. Software composition analysis primarily focuses on identifying vulnerabilities and licensing issues in third-party and open-source components, which is less directly related to preventing 'minor code issues' or general deployment failures from new code.
- C. Repository branch protection controls merging into critical branches, which is a good practice for overall code quality, but it does not address the immediate prevention of individual 'minor code issues' or provide functional validation like testing before deployment.
- E. A code submit authorization workflow manages who can submit code and under what conditions, but it doesn't directly prevent technical 'minor code issues' or validate functionality that causes deployment failures.
- F. Pipeline compliance scanning occurs during the CI/CD pipeline and helps identify security policy violations, but the goal is to reduce failures by catching issues before they enter the pipeline or early in it, rather not just identifying them during a scan that then leads to failure.
Concept tested. Shift-left security and CI/CD quality gates
Community Discussion
No community discussion yet for this question.