Courseiva
Configure processes and communicationseasyMultiple SelectObjective-mapped

AZ-400 Configure processes and communications Practice Question

Which TWO features of GitHub Actions can be used to enforce code quality standards before merging?

⚠ Common exam trap

Candidates often confuse 'Environments' (deployment gates) with 'branch protection rules' (merge gates), or assume 'Secrets' or 'Variables' can enforce quality, when they are purely for storing configuration data.

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

Branch protection rules with required status checks

Branch protection rules with required status checks (C) enforce that pull requests must pass specific GitHub Actions workflows (e.g., linting, testing, security scans) before merging. Status checks (D) are the actual workflow runs that report pass/fail to the pull request; when required, they block merging until all checks succeed. Together, they ensure code quality gates are met automatically.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Environments

    Why it's wrong here

    Environments in GitHub Actions are deployment targets with optional approval gates and protection rules, but they do not enforce code quality checks on pull requests. They control who can deploy and when, not whether a branch meets quality standards before merging.

  • Secrets

    Why it's wrong here

    Secrets are encrypted key-value pairs used to store sensitive data like tokens and credentials for use in workflows. They are not an enforcement mechanism for code quality; they simply make restricted information available to actions at runtime.

  • Branch protection rules with required status checks

    Why this is correct

    Branch protection rules with required status checks enforce quality by preventing a pull request from being merged until all specified status checks pass. This directly enforces that CI/CD workflows, including code quality jobs, succeed before changes are accepted into a protected branch.

  • Status checks

    Why this is correct

    Status checks are individual checks reported by workflows or third-party services that indicate whether a commit or PR meets certain conditions. By configuring required status checks in branch protection, you leverage status checks as the enforcement mechanism for passing quality gates.

  • Repository variables

    Why it's wrong here

    Repository variables are configuration values, such as environment-specific settings or non-sensitive data, that workflows can use as inputs. They do not enforce any quality gates or security policies, as they are merely a way to pass information into workflow runs.

About these practice questions

One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.