You must ensure that every code change is validated by the company's security team before the main branch is deployed. Which two actions can you take to enforce this? (Select two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create a branch protection rule for the main branch., Create a CODEOWNERS file..
Why this is the answer
To ensure every code change is validated by the security team before deployment from the main branch, two key actions are required. First, creating a branch protection rule for the main branch allows you to enforce checks and approvals, such as requiring pull request reviews from specific teams (like the security team) before merging. This prevents direct pushes to the main branch and ensures all changes go through a review process. Second, creating a CODEOWNERS file designates specific individuals or teams as responsible for reviewing code in certain parts of the repository. By listing the security team in the CODEOWNERS file for relevant paths, their approval can be mandated for pull requests affecting those areas, effectively enforcing their validation. Requiring signed commits verifies the author's identity but doesn't enforce a security review. Creating a branch protection rule for feature branches is good practice but doesn't directly control merges into the main branch. A LICENSE file specifies licensing information and is irrelevant to code validation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed