Microsoft AZ-400 (Designing and Implementing Microsoft DevOps Solutions) Practice Test 24

Question 230

Five repositories must share a full security workflow with standardized permissions and secret handling. Which reuse mechanism is appropriate?

  1. Use reusable GitHub Actions workflows
  2. Use a self-hosted GitHub runner for specialist hardware
  3. Upload workflow artifacts for later jobs
  4. Restrict GITHUB_TOKEN permissions
  5. Use runner groups for administrative boundaries

Explanation

Correct Answer

A:

Reusable workflows called through workflow_call centralize a multi-job pattern while allowing controlled inputs from callers.

Incorrect Answers

B:

Self-hosted runners execute jobs on administrator-managed machines where specialized devices and licensed tools can be installed; the distinction is workflow access to custom hardware versus shared end-to-end GitHub automation.

C:

Artifact upload stores files associated with a workflow run outside the temporary runner filesystem; shared end-to-end GitHub automation cannot be delivered through durable GitHub test attachments.

D:

Declaring minimal permissions at workflow or job scope reduces the authority of the automatically issued GITHUB_TOKEN; its effect is least-privilege native workflow token, not shared end-to-end GitHub automation.

E:

Runner groups can control which repositories may use a collection of organization or enterprise runners; that changes scoped access to GitHub runner fleets without delivering shared end-to-end GitHub automation.

Question 231

A reviewer needs to know which commit last modified the configuration line that caused a defect. Which Git command helps?

  1. Use git blame to inspect line provenance
  2. Use git reset on unpublished local work
  3. Use git revert for a bad shared commit
  4. Use git fetch before inspecting remote updates
  5. Use git clean for untracked build clutter

Explanation

Correct Answer

A:

git blame annotates source lines with the last modifying commit, supporting focused historical investigation. Inspect the attributed commit when diagnosing the regression, remembering that later line moves may alter attribution.

Incorrect Answers

B:

git reset can move the branch reference and optionally change the index and working tree; it should be used carefully on private history; this solves moving an unpublished branch pointer, leaving last-change attribution per line unresolved.

C:

git revert creates a new inverse commit, avoiding rewritten shared ancestry and preserving an auditable correction; this option addresses undo without rewriting shared history rather than addressing last-change attribution per line.

D:

git fetch updates remote-tracking references and transfers objects while leaving the checked-out branch unmerged; it handles nonmerging remote history synchronization but cannot by itself deliver last-change attribution per line.

E:

git clean removes selected untracked files and directories, with a preview option to avoid accidental deletion; last-change attribution per line remains outside the responsibility of untracked generated file cleanup.

Question 232

The same repository resolves different transitive versions on separate machines despite matching direct dependency declarations. Which control should be introduced?

  1. Use a unique build ID for pipeline artifacts
  2. Prevent republishing the same version with different bytes
  3. Increment the minor version for backward-compatible features
  4. Commit package lockfiles for reproducible dependency resolution

Explanation

Correct Answer

D:

A committed lockfile records resolved dependency versions and often integrity data, reducing drift across build environments.

Incorrect Answers

A:

A pipeline run or build ID supplies a unique execution identity that can be combined with artifact names and retention rules; here deterministic transitive dependency graph is the target, not per-run artifact disambiguation.

B:

Immutable package versions ensure that a given package name and version cannot silently acquire different contents; although that supports stable package name-version mapping, this scenario calls for deterministic transitive dependency graph.

C:

SemVer minor versions describe backward-compatible functionality additions without treating the update as a breaking change; deterministic transitive dependency graph cannot be inferred from additive nonbreaking release signal alone.

Question 233

A critical Azure Monitor alert is firing, but the on-call engineer never receives a text or automated webhook. Which shared notification resource should be configured?

  1. Configure activity log alerts for control-plane changes
  2. Route pipeline deployment events into observability
  3. Set appropriate workspace data retention
  4. Use alert processing rules for maintenance windows
  5. Use an action group for alert delivery
  6. Configure diagnostic settings on an Azure resource

Explanation

Correct Answer

E:

Action groups connect alert rules to notification channels and automation receivers such as email, SMS, and webhooks.

Incorrect Answers

A:

Azure Activity Log records subscription control-plane events that can be targeted by activity-log alert rules; Azure administrative operation detection cannot substitute for alert recipient and action routing.

B:

Deployment annotations or custom events associate release timing and versions with operational metrics and traces; alert recipient and action routing falls outside the scope of release-and-runtime event correlation.

C:

Log Analytics retention and archive settings govern how long ingested records remain available for interactive queries and longer-term retrieval; it contributes to policy-compliant telemetry lifetime, with alert recipient and action routing still requiring its own control.

D:

Alert processing rules can apply routing or action suppression under specified scope and timing conditions; this solves maintenance-specific notification suppression, leaving alert recipient and action routing unresolved.

F:

Resource diagnostic settings send supported log and metric categories to destinations such as a Log Analytics workspace; it handles forwarding resource telemetry but cannot by itself deliver alert recipient and action routing.

Question 234

A release pipeline unexpectedly skips its security step and the team needs to identify who modified the YAML. Which evidence should investigators inspect?

  1. Pin important runs from automatic retention
  2. Audit changed pipeline definitions
  3. Measure queue time separately from execution time
  4. Track critical-path stage duration
  5. Track build success rate by pipeline

Explanation

Correct Answer

B:

Pull request and Git commit history for pipeline-as-code records who changed the definition and what was approved.

Incorrect Answers

A:

Retention leases or supported keep-forever controls can protect selected runs and their records from routine expiration; that acts on exceptional run preservation, whereas the requested outcome is audit trail for automation changes.

C:

Queue delay measures waiting for eligible execution capacity before a job starts, distinct from run duration; here audit trail for automation changes is the target, not agent capacity waiting delay.

D:

Stage and job duration trends reveal where elapsed execution time is concentrated and where optimization has leverage; although that supports stage-level throughput bottlenecks, this scenario calls for audit trail for automation changes.

E:

Success and failure ratios by pipeline reveal reliability problems in particular delivery definitions over time; audit trail for automation changes cannot be inferred from pipeline-specific pass rate alone.

Question 235

An organization needs CI and deployment configuration reviewed through pull requests rather than changes made in a graphical classic editor. What modernization step is appropriate?

  1. Translate classic release approvals to environment checks
  2. Use retention policies to constrain storage cost
  3. Cache compiler or package dependencies
  4. Move repeated setup into a prebuilt image
  5. Migrate classic pipeline tasks to YAML

Explanation

Correct Answer

E:

YAML pipelines express jobs and steps as source-controlled definitions, improving change review and reproducibility.

Incorrect Answers

A:

Resource approvals and checks on YAML environments enforce authorization outside developer-controlled pipeline logic; its effect is preserved release governance after migration, not replacing GUI-only automation with code.

B:

Targeted run and artifact retention policies delete disposable build data while preserving defined compliance evidence; that changes bounded nonrelease artifact storage without delivering replacing GUI-only automation with code.

C:

Pipeline caching reuses eligible dependency or tool directories keyed by their inputs, reducing repeated setup without replacing artifact publication; reducing repeatable job setup work cannot substitute for replacing GUI-only automation with code.

D:

A maintained prebuilt worker or container image provides standard toolchains without repeating their installation in each job; replacing GUI-only automation with code falls outside the scope of preprovisioned build dependencies.

Question 236

Operations wants to assess recovery speed after customer-facing incidents rather than how rapidly the team ships features. Which indicator should it use?

  1. Track change failure rate
  2. Track time to restore service
  3. Compare planned versus completed work each sprint
  4. Distinguish deployment frequency from build frequency
  5. Measure lead time for changes

Explanation

Correct Answer

B:

Time to restore service captures the elapsed time required to recover normal operation after a production incident.

Incorrect Answers

A:

Change failure rate measures the share of production changes that produce degraded service or need restoration actions; it handles production deployment failure impact but cannot by itself deliver incident recovery duration.

C:

Comparing committed sprint scope with work actually completed shows forecasting reliability and can drive realistic iteration planning; that acts on iteration commitment reliability, whereas the requested outcome is incident recovery duration.

D:

Deployment frequency counts successful releases to the target production environment rather than CI runs or commits; production release cadence concerns a different control point than incident recovery duration.

E:

Lead time for changes measures elapsed time from a change entering the delivery stream to successful production deployment; here incident recovery duration is the target, not commit-to-production elapsed time.

Question 237

A test runner writes coverage files locally, but reviewers cannot inspect coverage summaries in Azure DevOps. Which pipeline action is missing?

  1. Publish code coverage results in Azure Pipelines
  2. Separate gating tests from exploratory tests
  3. Publish test results in Azure Pipelines
  4. Gate deployment on artifact signature verification

Explanation

Correct Answer

A:

The code coverage publishing step imports supported reports from test tools into the pipeline's coverage reporting surface.

Incorrect Answers

B:

Maintain a deterministic release-gating suite while separately running broader exploratory tests and tracking their findings; visible code coverage artifact cannot be delivered through predictable promotion signal.

C:

Publishing supported test result files associates structured test outcomes with the pipeline run for reporting and diagnostics; its effect is first-class automated test reporting, not visible code coverage artifact.

D:

Signature verification confirms that the artifact was signed by an expected identity and has not been modified since signing; that changes trusted binary provenance enforcement without delivering visible code coverage artifact.

Question 238

An operator modifies a production resource manually after the last successful IaC run; engineers need to find the difference from declared state. What control should be used?

  1. Use Bicep modules for reusable resource groups
  2. Use managed identity for IaC execution
  3. Detect environment drift with desired-state comparisons
  4. Use Bicep outputs for dependent deployment values

Explanation

Correct Answer

C:

Drift checks compare actual deployed configuration with version-controlled intended state, revealing out-of-band changes.

Incorrect Answers

A:

Bicep modules package resource declarations behind parameters and outputs so common infrastructure patterns can be reused; this solves modular Azure resource definitions, leaving detecting manual configuration divergence unresolved.

B:

Federated or managed workload identities enable Azure authentication without embedding reusable credential secrets in source or task configuration; this option addresses credentialless deployment identity rather than addressing detecting manual configuration divergence.

D:

Bicep outputs expose explicitly selected deployment values so subsequent steps can consume resolved resource identifiers; detecting manual configuration divergence remains outside the responsibility of module-produced resource references.

Question 239

A build accidentally copies a .env file into its public package; which quality control should catch this before publishing?

  1. Keep secrets out of generated artifacts
  2. Mask sensitive values in logs
  3. Use managed identity for Key Vault retrieval
  4. Use secret rotation without rebuilding application binaries

Explanation

Correct Answer

A:

Artifact content inspection and secret scanning can detect sensitive files included in release payloads before distribution.

Incorrect Answers

B:

Secret masking and safe command invocation reduce exposure, but scripts should avoid emitting credentials because redaction is not foolproof; avoiding credentials in distributed binaries cannot be inferred from protection of pipeline log output alone.

C:

A managed identity lets supported Azure resources authenticate to Key Vault with Entra tokens and assigned data access; the distinction is Azure-hosted secret access without local credentials versus avoiding credentials in distributed binaries.

D:

External secret storage and supported runtime refresh or restart decouple credential lifecycle from application compilation; avoiding credentials in distributed binaries cannot be delivered through independent credential update lifecycle.

Question 240

Maintainers are overwhelmed by all repository activity and want notifications only for threads they participate in or subscribe to. Which GitHub mechanism helps?

  1. Create targeted GitHub issue notifications
  2. Use Azure DevOps work item mentions
  3. Use GitHub Discussions for open-ended community topics
  4. Configure a GitHub repository webhook

Explanation

Correct Answer

A:

GitHub notification subscriptions let users follow relevant issue or pull request conversations while reducing unrelated alerts.

Incorrect Answers

B:

Mentioning a colleague in a work item comment notifies that person and preserves discussion context with the tracked work; it contributes to contextual backlog discussion notification, with participation-based discussion awareness still requiring its own control.

C:

GitHub Discussions supports community conversations, questions, and ideas without treating every exchange as a trackable issue; this solves exploratory community conversation, leaving participation-based discussion awareness unresolved.

D:

GitHub webhooks send selected repository event payloads to an HTTPS endpoint; a webhook secret supports signature verification; this option addresses signed GitHub event notifications rather than addressing participation-based discussion awareness.

Designing and Implementing Microsoft DevOps Solutions (AZ-400) Practice Tests