AZ-400 Develop a security and compliance plan Practice Question
Your organization uses GitHub Actions for CI/CD. The security team requires that all workflows are stored in a central repository and that only approved actions can be used. What should you implement?
⚠ Common exam trap
Watch out — candidates often confuse controlling where workflows are stored (centralization) with controlling which actions are allowed to execute, mistakenly thinking branch protection or runner restrictions can substitute for an explicit action allow list.
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
✓
In the organization settings, configure the 'Actions permissions' to 'Allow specified actions' and add the approved actions to the allow list.
The security team's requirement to restrict workflows to only approved actions is directly met by configuring 'Actions permissions' in the organization settings to 'Allow specified actions' and then populating the allow list with the approved actions. This enforces a policy where any workflow, regardless of where it is stored, can only reference actions that have been explicitly allowed, preventing the use of unverified or malicious third-party actions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure the repository to use only self-hosted runners.
Why it's wrong here
Self-hosted runners only change where workflow jobs execute; they do not filter which GitHub Actions can be referenced in a workflow. Without an explicit allowlist, any third-party action from the marketplace can still be used, so this measure fails to restrict action usage.
- ✗
Store all workflows in a central repository and use branch protection rules.
Why it's wrong here
Centralizing workflows in a common repository and applying branch protection improves governance but does not enforce an action allowlist. Developers can still call any public action from their workflow files, so this approach does not limit which actions are permitted.
- ✓
In the organization settings, configure the 'Actions permissions' to 'Allow specified actions' and add the approved actions to the allow list.
Why this is correct
Configuring 'Actions permissions' to 'Allow specified actions' in the organization's Actions settings builds an explicit allowlist that only permits pre-approved actions in all workflows. Any action not on the list is blocked, which enforces the security requirement by preventing use of unapproved third-party actions.
- ✗
Enable 'Allow GitHub Actions to create and approve pull requests' in the repository settings.
Why it's wrong here
This setting grants the GITHUB_TOKEN the ability to create and approve pull requests from workflows, which is about automation capabilities, not about controlling which external actions can be used. It does nothing to restrict the set of actions allowed in workflow definitions.
Go deeper
Related to this question
Learn chapter
Designing a Security and Compliance Plan
Key term
Repository
A repository is a central storage location where software packages, code, or configuration files are kept, managed, and distributed for use by IT systems.
Key term
GitHub
GitHub is a cloud-based platform for storing, tracking, and collaborating on code using Git version control.
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 →
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.