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

Question 320

Security administrators manage Azure Repos repositories and want their supported repository posture and vulnerability signals consolidated with cloud workload risks. Which platform connector fits?

  1. Run CodeQL analysis inside a controlled container
  2. Use least-privilege tokens for security scanners
  3. Enable secret scanning in GitHub Advanced Security
  4. Connect Azure DevOps to Microsoft Defender for Cloud DevOps security

Explanation

Correct Answer

D:

Connecting supported Azure DevOps organizations to Defender for Cloud DevOps security brings repository posture and findings into a code-to-cloud governance view.

Incorrect Answers

A:

Running the supported CodeQL analysis workflow in a managed container isolates scanner tooling and makes its runtime dependencies repeatable across builds; cloud-correlated Azure Repos security posture falls outside the scope of isolated static-analysis execution environment.

B:

Grant only the API permissions necessary to retrieve code and publish assessment results, keeping repository administration separate; it contributes to narrow automation scanner identity, with cloud-correlated Azure Repos security posture still requiring its own control.

C:

Secret scanning identifies supported secret patterns and can alert on exposed credentials in repository content; this solves credential pattern detection in source, leaving cloud-correlated Azure Repos security posture unresolved.

Question 321

A compliance reviewer needs to inspect Git content but must not be able to push updates to the Azure Repos repository. Which permission approach fits?

  1. Grant repository read access without contributor rights
  2. Review GitHub organization audit log for repository permission changes
  3. Use a GitHub organization team for consistent access
  4. Use GitHub repository roles for least privilege

Explanation

Correct Answer

A:

Repository read permission provides source visibility while Contribute remains ungranted or denied as appropriate.

Incorrect Answers

B:

Organization audit logs record supported administrative and repository-related actions with actor and timestamp details useful for reconstructing access changes; here nonmutating source review is the target, not organization access-change attribution.

C:

GitHub teams grant repository roles to managed groups so membership changes propagate to the repositories they can access; although that supports group-managed multi-repo permissions, this scenario calls for nonmutating source review.

D:

Assign the least powerful repository role that supports code contribution, keeping administration privileges separate; nonmutating source review cannot be inferred from contributor versus administrator separation alone.

Question 322

A developer uses Azure Boards but commits code to Azure Repos; the team needs each change to identify the backlog item it implements. What should developers include?

  1. Link a pull request to its fixing issue
  2. Link commits to Azure Boards work items
  3. Link test cases to user stories
  4. Reference pull requests in release notes

Explanation

Correct Answer

B:

Referencing work-item IDs from commits and pull requests creates navigable development links in the work item and improves auditability.

Incorrect Answers

A:

GitHub closing keywords in pull request descriptions link issues to code and can close the referenced issue when the PR merges into the default branch; that changes issue closure with code evidence without delivering code-to-backlog traceability.

C:

Azure Test Plans relationships between test cases and work items provide requirement-to-test coverage and execution context; code-to-backlog traceability falls outside the scope of requirement-to-test evidence.

D:

Release records linked to merged pull requests and associated commits show the approved changes represented by a published build; it contributes to release-to-change evidence, with code-to-backlog traceability still requiring its own control.

Question 323

An existing Azure Deployment Environments project offers reviewed environment blueprints. Which ADE element stores the templates while the platform team plans its required migration?

  1. Maintain legacy Azure Automation State Configuration while planning migration
  2. Use Azure Machine Configuration for guest compliance
  3. Publish environment definitions in a catalog
  4. Use environment expiration or cleanup automation

Explanation

Correct Answer

C:

ADE catalogs contain approved environment definitions and deployment configuration; their contents should be preserved for migration before the service retires.

Incorrect Answers

A:

Azure Automation State Configuration manages existing DSC node assignments; Microsoft has announced retirement in September 2027 and recommends transition to Azure Machine Configuration; approved environment template selection remains outside the responsibility of legacy DSC node assignment with migration.

B:

Azure Machine Configuration evaluates guest operating-system configuration against defined policies and can support enforcement scenarios; that acts on VM guest-state compliance, whereas the requested outcome is approved environment template selection.

D:

Automated teardown or time-to-live policies remove short-lived environments once they are no longer required; here approved environment template selection is the target, not bounded ephemeral environment lifetime.

Question 324

A developer needs the latest remote branch references locally without altering their current worktree or merging changes immediately. Which command should be used?

  1. Restore one tracked file from a previous commit
  2. Use git fetch before inspecting remote updates
  3. Use git stash for temporary unfinished edits
  4. Use git reflog to recover a lost local tip
  5. Use git diff between release tags

Explanation

Correct Answer

B:

git fetch updates remote-tracking references and transfers objects while leaving the checked-out branch unmerged.

Incorrect Answers

A:

git restore with a chosen source revision retrieves a file's content from the specified tree into the worktree or index; nonmerging remote history synchronization cannot be delivered through recovering selected file contents.

C:

git stash saves eligible uncommitted work for later reapplication, freeing the worktree for a different task; that changes temporary worktree shelving without delivering nonmerging remote history synchronization.

D:

git reflog records local reference updates, often exposing prior commit hashes that can be restored before garbage collection; local reference move recovery cannot substitute for nonmerging remote history synchronization.

E:

git diff between known tag references shows file content differences across the two releases; nonmerging remote history synchronization falls outside the scope of release-to-release source difference.

Question 325

A coordinator must categorize issues and manage pull request discussions but should not push code. Which GitHub repository role is better aligned?

  1. Use a GitHub App for organization-wide automation
  2. Use outside collaborator access for a contractor
  3. Use installation access tokens for GitHub App API calls
  4. Grant a triage role rather than write for issue management
  5. Use GITHUB_TOKEN for same-repository workflow tasks

Explanation

Correct Answer

D:

The triage role supports issue and pull request management operations without conferring normal code write permissions.

Incorrect Answers

A:

GitHub Apps use installation-scoped permissions and short-lived access tokens, separating integration identity from individual users; this option addresses app-scoped multi-repository automation rather than addressing backlog triage without code updates.

B:

Outside collaborators receive targeted repository access without organization membership, under relevant organizational restrictions; it handles repository-only external participation but cannot by itself deliver backlog triage without code updates.

C:

An installation access token provides time-limited API authority according to the app's installed repositories and permissions; backlog triage without code updates remains outside the responsibility of operational GitHub App installation identity.

E:

GITHUB_TOKEN is automatically created for the workflow job and can be scoped through the permissions key for repository operations; ephemeral built-in workflow authorization concerns a different control point than backlog triage without code updates.

Question 326

A GitHub organization shares dozens of self-hosted runners but some must be accessible only to one regulated repository group. Which management layer applies?

  1. Use a GitHub Actions matrix for platform testing
  2. Upload workflow artifacts for later jobs
  3. Use runner groups for administrative boundaries
  4. Use artifact attestations for release provenance

Explanation

Correct Answer

C:

Runner groups can control which repositories may use a collection of organization or enterprise runners. Repository access restrictions on the runner group prevent other repositories from scheduling jobs on sensitive machines.

Incorrect Answers

A:

A matrix strategy expands one job definition over selected platform and version dimensions without duplicating steps; scoped access to GitHub runner fleets cannot be inferred from combinatorial GitHub runtime testing alone.

B:

Artifact upload stores files associated with a workflow run outside the temporary runner filesystem; the distinction is durable GitHub test attachments versus scoped access to GitHub runner fleets.

D:

Artifact attestations associate verifiable provenance statements with build outputs, improving downstream verification of their origin; its effect is verifiable GitHub-generated artifact provenance, not scoped access to GitHub runner fleets.

Question 327

A team finds that production approvals and rollout consume far more time than validation, and wants a metric to optimize delivery latency. What should it chart?

  1. Configure Azure Pipelines build failure subscriptions
  2. Monitor environment deployment duration
  3. Calculate lead time for changes from source and deployment
  4. Review GitHub Actions workflow run failure trends

Explanation

Correct Answer

B:

Stage duration and approval-wait measurements separate human release delay from actual deployment execution time.

Incorrect Answers

A:

Azure DevOps notifications can subscribe recipients to selected pipeline completion and failure events with appropriate filters; it contributes to filtered Azure Pipelines failure awareness, with production stage elapsed-time breakdown still requiring its own control.

C:

Joining source change timestamps with production deployment records yields change lead time across build, review, and release processes; this option addresses source-to-production delivery latency rather than addressing production stage elapsed-time breakdown.

D:

Workflow run histories and available Insights surfaces show success/failure patterns that help distinguish recurring automation problems; it handles repository workflow reliability trend but cannot by itself deliver production stage elapsed-time breakdown.

Question 328

A GitHub deployment system records successes and failures for dev, preview, and production; an SRE needs the percentage of successful production attempts only. Which metric should be calculated?

  1. Calculate deployment success ratio per environment
  2. Use feedback-loop work items for recurring incidents
  3. Investigate change failure rate using incident linkage
  4. Create a GitHub Actions failure notification

Explanation

Correct Answer

A:

Filtering deployment records to the production environment and dividing successful attempts by all production attempts isolates its delivery success ratio.

Incorrect Answers

B:

Turning incident findings into tracked prioritized work items with ownership and linked operational evidence makes reliability work part of delivery; although that supports incident-to-backlog improvement traceability, this scenario calls for production-only deployment success percentage.

C:

Linking deployments to service-impacting incidents or remediation events distinguishes risky releases from merely failed jobs; production-only deployment success percentage cannot be inferred from customer-impacting deployment quality alone.

D:

Workflow failure events can trigger supported notifications or an automation workflow to notify designated responders; the distinction is reactive GitHub workflow failure alert versus production-only deployment success percentage.

Question 329

A Python package supports several interpreter and operating-system combinations; a single Linux build cannot demonstrate compatibility. Which pipeline approach fits?

  1. Include database migration tests before rollout
  2. Use a test matrix for supported runtimes
  3. Run stress tests beyond expected capacity
  4. Use contract tests between producer and consumer

Explanation

Correct Answer

B:

Matrix execution expands a job over selected versions and operating systems, testing the product across supported combinations.

Incorrect Answers

A:

Migration tests exercise schema changes against representative database states and help detect incompatible or irreversible transformations; database evolution compatibility checks cannot substitute for cross-platform runtime coverage.

C:

Stress tests deliberately exceed normal capacity to identify breaking points, failure modes, and recovery behavior; it contributes to overload failure characterization, with cross-platform runtime coverage still requiring its own control.

D:

Contract tests verify that producers and consumers satisfy agreed interface expectations before integration breaks at runtime; this solves cross-team API compatibility, leaving cross-platform runtime coverage unresolved.

Question 330

A deployment pipeline sometimes retries after a network failure; running a setup script twice must not create duplicate resources. Which property should the scripts have?

  1. Use idempotent deployment scripts
  2. Use Azure App Service deployment slots
  3. Use readiness probes behind a load balancer
  4. Drain connections before removing old replicas

Explanation

Correct Answer

A:

Idempotent operations reach the desired end state even when repeated, making safe retries possible after partial execution.

Incorrect Answers

B:

Deployment slots host alternate app versions and support swaps, reducing visible downtime when slot settings are correctly configured; warm-before-cutover web deployment concerns a different control point than repeatable partial deployment recovery.

C:

Readiness checks keep instances out of eligible traffic rotation until they can serve real requests; here repeatable partial deployment recovery is the target, not traffic admission after application readiness.

D:

Connection draining and graceful termination allow in-flight requests to complete before a retiring instance stops; although that supports preserving active requests during replacement, this scenario calls for repeatable partial deployment recovery.

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