AZ-400 Practice Question: Design and implement a source control strategy
Your team uses GitHub and wants to enforce that all commits to the main branch are signed with a GPG key. Which branch protection rule should you configure?
⚠ Common exam trap
Many exam-takers confuse 'Require signed commits' with 'Require status checks to pass before merging', mistakenly thinking a CI status check can enforce signing, but GitHub's built-in rule is the only way to natively reject unsigned commits at the server level.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Require signed commits.
The 'Require signed commits' branch protection rule enforces that every commit pushed to the protected branch must be signed with a GPG key. This ensures cryptographic verification of the commit author's identity, directly addressing the requirement to enforce signed commits on the main branch.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Require pull request reviews before merging.
Why it's wrong here
Requiring pull request reviews enforces human code review but provides no cryptographic proof of commit authorship or content integrity. A reviewer may approve an unsigned commit, so this rule does not meet the requirement of verifying that every commit is signed.
- ✗
Require status checks to pass before merging.
Why it's wrong here
Requiring status checks to pass runs CI validation (builds, tests) but does not verify the authenticity or integrity of individual commits. An unsigned commit can pass all status checks, so this rule alone cannot enforce commit signing.
- ✗
Require linear history.
Why it's wrong here
Requiring linear history prevents merge commits by forcing a rebase-based workflow, which simplifies history but has no effect on cryptographic commit signing. Commits in a linear history can still be unsigned, so this rule does not enforce the stated requirement.
- ✓
Require signed commits.
Why this is correct
Requiring signed commits is a branch protection rule that rejects any commit not cryptographically signed with a verified GPG or S/MIME key, authenticating the committer and ensuring content integrity. This directly enforces that every commit must be signed, exactly as the requirement demands.
Go deeper
Related to this question
Learn chapter
Implementing Work Item Management and Agile Planning
Key term
GitHub
GitHub is a cloud-based platform for storing, tracking, and collaborating on code using Git version control.
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.