Microsoft AZ-400 Practice Test 14
Question 130
A Microsoft DevOps team is addressing: A GitHub self-hosted runner accepts workflows from untrusted forks and shares its workspace with production credentials. Which TWO complementary actions should be taken? Select TWO answers.
- Inspect task output names, stage dependencies and variable references.
- Move common steps into approved reusable templates with pinned or governed references.
- Inspect repository runner group rules, fork workflow triggers and credential persistence.
- Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs.
- Inspect dependsOn, output artifacts, stage conditions and run timelines.
Explanation
Correct Answers
C:Inspect repository runner group rules, fork workflow triggers and credential persistence. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs. Together they address: Self-hosted runners require trust boundaries and workload-specific isolation.
D:Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect repository runner group rules, fork workflow triggers and credential persistence. Together they address: Self-hosted runners require trust boundaries and workload-specific isolation.
Incorrect Answers
A:Inspect task output names, stage dependencies and variable references. This concerns a different DevOps situation: A downstream stage cannot determine the storage endpoint created by an infrastructure provisioning stage. This case instead requires both a targeted investigation (Inspect repository runner group rules, fork workflow triggers and credential persistence.) and a controlled change (Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs.).
B:Move common steps into approved reusable templates with pinned or governed references. This concerns a different DevOps situation: Teams each copy a deployment YAML template and security fixes reach only some repositories. This case instead requires both a targeted investigation (Inspect repository runner group rules, fork workflow triggers and credential persistence.) and a controlled change (Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs.).
E:Inspect dependsOn, output artifacts, stage conditions and run timelines. This concerns a different DevOps situation: A deployment stage starts before the packaging stage publishes an artifact because stages are configured independently. This case instead requires both a targeted investigation (Inspect repository runner group rules, fork workflow triggers and credential persistence.) and a controlled change (Restrict runner access to trusted workflows and use ephemeral isolated runners for sensitive jobs.).
Question 131
After implementing the change, the team verifies: Payment processing files require security review, but code owner review is only advisory. Which result would BEST demonstrate that the issue is corrected?
- A collaborator can still resolve the original commit history after the next integration.
- A change to the protected payment directory cannot merge without authorized approval.
- A release process selects the exact approved commit instead of a similarly named branch.
- The new code merges and deploys disabled until the approved rollout cohort is enabled.
Explanation
Correct Answer
B:A change to the protected payment directory cannot merge without authorized approval. This measures the actual expected outcome, rather than trusting only a configuration flag. Implemented action: Enforce code owner approval for sensitive path changes in protected branches. Sensitive paths should have enforced review by designated accountable owners.
Incorrect Answers
A:A collaborator can still resolve the original commit history after the next integration. This would address a different situation, such as: A maintainer rebases a shared release branch and force pushes, invalidating teammates' commit references. In the present case, the most directly relevant verification is: A change to the protected payment directory cannot merge without authorized approval. The crucial distinction is: Sensitive paths should have enforced review by designated accountable owners.
C:A release process selects the exact approved commit instead of a similarly named branch. This would address a different situation, such as: Teams use dozens of release branches with ambiguous names, and automation often deploys the wrong branch. In the present case, the most directly relevant verification is: A change to the protected payment directory cannot merge without authorized approval. The crucial distinction is: Sensitive paths should have enforced review by designated accountable owners.
D:The new code merges and deploys disabled until the approved rollout cohort is enabled. This would address a different situation, such as: A feature needs gradual rollout, but the team maintains a year-long divergent branch to hide unfinished functionality. In the present case, the most directly relevant verification is: A change to the protected payment directory cannot merge without authorized approval. The crucial distinction is: Sensitive paths should have enforced review by designated accountable owners.
Question 132
A Microsoft DevOps team is addressing: A feature needs gradual rollout, but the team maintains a year-long divergent branch to hide unfinished functionality. Which TWO complementary actions should be taken? Select TWO answers.
- Review supported version policy, branch retention, release tags and backport evidence.
- Inspect merge cadence, branch age, conflict history and required checks.
- Inspect CODEOWNERS mappings, branch protection and reviewer bypass privileges.
- Inspect merge conflicts, feature activation requirements and current flag controls.
- Integrate incomplete code safely behind governed feature flags and short-lived branches.
Explanation
Correct Answers
D:Inspect merge conflicts, feature activation requirements and current flag controls. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Integrate incomplete code safely behind governed feature flags and short-lived branches. Together they address: Feature toggles can separate deployment from activation while limiting branch divergence.
E:Integrate incomplete code safely behind governed feature flags and short-lived branches. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect merge conflicts, feature activation requirements and current flag controls. Together they address: Feature toggles can separate deployment from activation while limiting branch divergence.
Incorrect Answers
A:Review supported version policy, branch retention, release tags and backport evidence. This concerns a different DevOps situation: Old supported product versions receive urgent fixes but the team deletes prior release references after every mainline update. This case instead requires both a targeted investigation (Inspect merge conflicts, feature activation requirements and current flag controls.) and a controlled change (Integrate incomplete code safely behind governed feature flags and short-lived branches.).
B:Inspect merge cadence, branch age, conflict history and required checks. This concerns a different DevOps situation: An organization merges changes only at the end of a six-week release branch, creating hundreds of conflicts. This case instead requires both a targeted investigation (Inspect merge conflicts, feature activation requirements and current flag controls.) and a controlled change (Integrate incomplete code safely behind governed feature flags and short-lived branches.).
C:Inspect CODEOWNERS mappings, branch protection and reviewer bypass privileges. This concerns a different DevOps situation: Payment processing files require security review, but code owner review is only advisory. This case instead requires both a targeted investigation (Inspect merge conflicts, feature activation requirements and current flag controls.) and a controlled change (Integrate incomplete code safely behind governed feature flags and short-lived branches.).
Question 133
Before changing the pipeline or service, engineers find: A feature needs gradual rollout, but the team maintains a year-long divergent branch to hide unfinished functionality. Which evidence should the engineer inspect FIRST?
- Inspect branch rules, bypass lists, review events and commit protections.
- Inspect merge conflicts, feature activation requirements and current flag controls.
- Review reflogs, branch protections, merge strategy and downstream consumers.
- Inspect merge strategy, generated commit IDs, pull request metadata and release manifest.
Explanation
Correct Answer
B:Inspect merge conflicts, feature activation requirements and current flag controls. This directly checks the uncertain behavior or control before changing production. Feature toggles can separate deployment from activation while limiting branch divergence. The resulting targeted action is: Integrate incomplete code safely behind governed feature flags and short-lived branches.
Incorrect Answers
A:Inspect branch rules, bypass lists, review events and commit protections. This would address a different situation, such as: A repository's default branch allows authors to approve their own high-risk changes without independent review. In the present case, the most directly relevant evidence is: Inspect merge conflicts, feature activation requirements and current flag controls. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
C:Review reflogs, branch protections, merge strategy and downstream consumers. This would address a different situation, such as: A maintainer rebases a shared release branch and force pushes, invalidating teammates' commit references. In the present case, the most directly relevant evidence is: Inspect merge conflicts, feature activation requirements and current flag controls. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
D:Inspect merge strategy, generated commit IDs, pull request metadata and release manifest. This would address a different situation, such as: An audit team cannot associate production features with reviewed pull requests after squash merging because release metadata records only original feature SHAs. In the present case, the most directly relevant evidence is: Inspect merge conflicts, feature activation requirements and current flag controls. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
Question 134
After implementing the change, the team verifies: A build references a Git submodule by moving branch and occasionally acquires incompatible dependency changes. Which result would BEST demonstrate that the issue is corrected?
- A former contributor cannot push to the archived security repository.
- The same repository commit builds on both the intended Windows and Linux agents.
- Two builds of the same main commit use the exact approved submodule revision.
- Both consumers can choose approved versions and receive a security fix predictably.
Explanation
Correct Answer
C:Two builds of the same main commit use the exact approved submodule revision. This measures the actual expected outcome, rather than trusting only a configuration flag. Implemented action: Pin the submodule to an approved commit and update it through reviewed changes. Submodules should resolve to reviewed immutable commits for reproducible builds.
Incorrect Answers
A:A former contributor cannot push to the archived security repository. This would address a different situation, such as: An archived security-sensitive repository remains writable by former project members and receives unreviewed commits. In the present case, the most directly relevant verification is: Two builds of the same main commit use the exact approved submodule revision. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
B:The same repository commit builds on both the intended Windows and Linux agents. This would address a different situation, such as: A service builds on a Windows workstation but fails on Linux CI because a source import differs only in filename case. In the present case, the most directly relevant verification is: Two builds of the same main commit use the exact approved submodule revision. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
D:Both consumers can choose approved versions and receive a security fix predictably. This would address a different situation, such as: Two separate repositories copy and edit a common authentication library independently, producing inconsistent fixes. In the present case, the most directly relevant verification is: Two builds of the same main commit use the exact approved submodule revision. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
Question 135
An Azure DevOps engineering team evaluates this condition: A C# API has risky SQL construction patterns, but pipeline checks only verify compilation. Which DevOps principle BEST explains the underlying weakness?
- Automated security/compliance scanning should retain dependency provenance and approved package sources.
- Security workflows require protected configuration and evaluation from trusted context.
- Code scanning should detect relevant source vulnerabilities before release.
- Different scanning methods cover different classes of weakness and require complementary controls.
Explanation
Correct Answer
C:Code scanning should detect relevant source vulnerabilities before release. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect GitHub Advanced Security CodeQL workflow, languages, SARIF results and merge gates. An appropriate controlled response is: Configure approved CodeQL analysis and risk-based remediation gates.
Incorrect Answers
A:Automated security/compliance scanning should retain dependency provenance and approved package sources. This would address a different situation, such as: A dependency update workflow proposes a new package version but its artifact origin is not recorded, weakening supply-chain review. In the present case, the most directly relevant principle is: Code scanning should detect relevant source vulnerabilities before release. The crucial distinction is: Code scanning should detect relevant source vulnerabilities before release.
B:Security workflows require protected configuration and evaluation from trusted context. This would address a different situation, such as: An untrusted pull request can modify the secret-scanning workflow and disable scanning in its own run. In the present case, the most directly relevant principle is: Code scanning should detect relevant source vulnerabilities before release. The crucial distinction is: Code scanning should detect relevant source vulnerabilities before release.
D:Different scanning methods cover different classes of weakness and require complementary controls. This would address a different situation, such as: A project relies entirely on container image vulnerability scanning while application source contains an authorization flaw. In the present case, the most directly relevant principle is: Code scanning should detect relevant source vulnerabilities before release. The crucial distinction is: Code scanning should detect relevant source vulnerabilities before release.
Question 136
The DevOps team must resolve this situation: A build references a Git submodule by moving branch and occasionally acquires incompatible dependency changes. Which engineering action is MOST appropriate?
- Revoke or rotate the credential, restrict exposure and perform controlled history remediation if necessary.
- Publish common code as a reviewed versioned package or managed shared component.
- Archive the repository or lock write access with audited exception handling.
- Pin the submodule to an approved commit and update it through reviewed changes.
Explanation
Correct Answer
D:Pin the submodule to an approved commit and update it through reviewed changes. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: Two builds of the same main commit use the exact approved submodule revision. Submodules should resolve to reviewed immutable commits for reproducible builds.
Incorrect Answers
A:Revoke or rotate the credential, restrict exposure and perform controlled history remediation if necessary. This would address a different situation, such as: A database credential is removed from the latest Git commit but remains visible in old revisions. In the present case, the most directly relevant engineering action is: Pin the submodule to an approved commit and update it through reviewed changes. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
B:Publish common code as a reviewed versioned package or managed shared component. This would address a different situation, such as: Two separate repositories copy and edit a common authentication library independently, producing inconsistent fixes. In the present case, the most directly relevant engineering action is: Pin the submodule to an approved commit and update it through reviewed changes. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
C:Archive the repository or lock write access with audited exception handling. This would address a different situation, such as: An archived security-sensitive repository remains writable by former project members and receives unreviewed commits. In the present case, the most directly relevant engineering action is: Pin the submodule to an approved commit and update it through reviewed changes. The crucial distinction is: Submodules should resolve to reviewed immutable commits for reproducible builds.
Question 137
An Azure DevOps engineering team evaluates this condition: A pipeline runs quickly on an agent but waits 70 minutes in queue due to a limited self-hosted pool. Which DevOps principle BEST explains the underlying weakness?
- Retention policy should cover compliance evidence, release logs and artifact lifecycle.
- Pipeline telemetry should distinguish agent scarcity from actual code execution cost.
- Deployment identities should support safe rotation or federation without release downtime.
- Pipeline resource references should bind to intended verified source and build run.
Explanation
Correct Answer
B:Pipeline telemetry should distinguish agent scarcity from actual code execution cost. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Review queue latency, pool capacity, concurrent jobs and utilization. An appropriate controlled response is: Right-size authorized agent capacity and prioritize critical release jobs.
Incorrect Answers
A:Retention policy should cover compliance evidence, release logs and artifact lifecycle. This would address a different situation, such as: An organization deletes pipeline logs within a day even though deployment approvals must be auditable for a year. In the present case, the most directly relevant principle is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost. The crucial distinction is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost.
C:Deployment identities should support safe rotation or federation without release downtime. This would address a different situation, such as: A legacy release service principal secret is set to expire tomorrow and pipeline maintenance has no automated credential lifecycle. In the present case, the most directly relevant principle is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost. The crucial distinction is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost.
D:Pipeline resource references should bind to intended verified source and build run. This would address a different situation, such as: A production stage sometimes downloads an artifact from a different branch due to an ambiguous pipeline resource definition. In the present case, the most directly relevant principle is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost. The crucial distinction is: Pipeline telemetry should distinguish agent scarcity from actual code execution cost.
Question 138
A Microsoft DevOps team is addressing: The same Git commit restores different NuGet package versions one week apart and intermittently fails tests. Which TWO complementary actions should be taken? Select TWO answers.
- Compare project version ranges, lockfiles, feed updates and restore output.
- Inspect public API diffs, release notes, versioning rules and downstream tests.
- Review feed upstream configuration, package authorization and cached dependency versions.
- Pin approved package ranges with lockfiles and deterministic restore settings.
- Update to an approved secure dependency version and rerun integration and compatibility checks.
Explanation
Correct Answers
A:Compare project version ranges, lockfiles, feed updates and restore output. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Pin approved package ranges with lockfiles and deterministic restore settings. Together they address: Reproducible builds require controlled package versions and lockfile inputs.
D:Pin approved package ranges with lockfiles and deterministic restore settings. This supplies the controlled implementation needed for the scenario. Its complementary step is: Compare project version ranges, lockfiles, feed updates and restore output. Together they address: Reproducible builds require controlled package versions and lockfile inputs.
Incorrect Answers
B:Inspect public API diffs, release notes, versioning rules and downstream tests. This concerns a different DevOps situation: An internal SDK removes a public method yet publishes the next build as a patch release, breaking consumers. This case instead requires both a targeted investigation (Compare project version ranges, lockfiles, feed updates and restore output.) and a controlled change (Pin approved package ranges with lockfiles and deterministic restore settings.).
C:Review feed upstream configuration, package authorization and cached dependency versions. This concerns a different DevOps situation: A package feed cannot install vetted public dependencies during a disconnected corporate build unless developers manually copy files. This case instead requires both a targeted investigation (Compare project version ranges, lockfiles, feed updates and restore output.) and a controlled change (Pin approved package ranges with lockfiles and deterministic restore settings.).
E:Update to an approved secure dependency version and rerun integration and compatibility checks. This concerns a different DevOps situation: A pipeline publishes Python wheels from a feed after an advisory identifies a vulnerable indirect dependency. This case instead requires both a targeted investigation (Compare project version ranges, lockfiles, feed updates and restore output.) and a controlled change (Pin approved package ranges with lockfiles and deterministic restore settings.).
Question 139
The DevOps team must resolve this situation: A feature needs gradual rollout, but the team maintains a year-long divergent branch to hide unfinished functionality. Which engineering action is MOST appropriate?
- Integrate incomplete code safely behind governed feature flags and short-lived branches.
- Define clear branch purposes and deploy from approved immutable tagged or hashed revisions.
- Maintain controlled support branches with signed or protected release tags and planned retirement.
- Apply equivalent required reviews and test gates to all protected release branches.
Explanation
Correct Answer
A:Integrate incomplete code safely behind governed feature flags and short-lived branches. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: The new code merges and deploys disabled until the approved rollout cohort is enabled. Feature toggles can separate deployment from activation while limiting branch divergence.
Incorrect Answers
B:Define clear branch purposes and deploy from approved immutable tagged or hashed revisions. This would address a different situation, such as: Teams use dozens of release branches with ambiguous names, and automation often deploys the wrong branch. In the present case, the most directly relevant engineering action is: Integrate incomplete code safely behind governed feature flags and short-lived branches. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
C:Maintain controlled support branches with signed or protected release tags and planned retirement. This would address a different situation, such as: Old supported product versions receive urgent fixes but the team deletes prior release references after every mainline update. In the present case, the most directly relevant engineering action is: Integrate incomplete code safely behind governed feature flags and short-lived branches. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
D:Apply equivalent required reviews and test gates to all protected release branches. This would address a different situation, such as: A company protects main but permits unrestricted direct commits to an unprotected release branch deployed to production. In the present case, the most directly relevant engineering action is: Integrate incomplete code safely behind governed feature flags and short-lived branches. The crucial distinction is: Feature toggles can separate deployment from activation while limiting branch divergence.
Question 140
Before changing the pipeline or service, engineers find: A shared variable group contains production connection strings, and every development pipeline can read them. Which evidence should the engineer inspect FIRST?
- Inspect dependsOn, output artifacts, stage conditions and run timelines.
- Review stage condition expressions, dependency status and test results.
- Inspect library permissions, pipeline authorization, variable source and consumer identities.
- Inspect YAML trigger filters, branch protections and deployment conditions.
Explanation
Correct Answer
C:Inspect library permissions, pipeline authorization, variable source and consumer identities. This directly checks the uncertain behavior or control before changing production. Variable groups must have environment-specific authorization and secret access controls. The resulting targeted action is: Separate production variables and restrict group use to approved production pipelines.
Incorrect Answers
A:Inspect dependsOn, output artifacts, stage conditions and run timelines. This would address a different situation, such as: A deployment stage starts before the packaging stage publishes an artifact because stages are configured independently. In the present case, the most directly relevant evidence is: Inspect library permissions, pipeline authorization, variable source and consumer identities. The crucial distinction is: Variable groups must have environment-specific authorization and secret access controls.
B:Review stage condition expressions, dependency status and test results. This would address a different situation, such as: A post-deployment verification job runs even when staging tests fail because its condition overrides the default dependency check. In the present case, the most directly relevant evidence is: Inspect library permissions, pipeline authorization, variable source and consumer identities. The crucial distinction is: Variable groups must have environment-specific authorization and secret access controls.
D:Inspect YAML trigger filters, branch protections and deployment conditions. This would address a different situation, such as: A deployment pipeline runs on feature-branch pushes despite a policy requiring releases only from protected main. In the present case, the most directly relevant evidence is: Inspect library permissions, pipeline authorization, variable source and consumer identities. The crucial distinction is: Variable groups must have environment-specific authorization and secret access controls.