Question 390
A library pipeline needs rapid feedback about pure business-logic functions before expensive deployments start. Which test level should run earliest?
- Collect failing test logs and artifacts
- Use ephemeral test environments for parallel pull requests
- Separate flaky tests from product regressions
- Run unit tests before packaging
Explanation
Correct Answer
D:Unit tests exercise small components in isolation and are usually fast enough to provide immediate feedback during continuous integration.
Incorrect Answers
A:Publishing diagnostic logs and test-result artifacts preserves failure evidence independently of the agent workspace lifecycle; low-cost component correctness cannot be inferred from durable failed-run diagnostics alone.
B:Isolated short-lived test environments give each validation run independent dependencies and reduce cross-branch test contamination; the distinction is test dependency isolation per change versus low-cost component correctness.
C:Identify and quarantine or stabilize nondeterministic tests while recording their outcomes, rather than hiding instability with unlimited retries; low-cost component correctness cannot be delivered through nondeterministic-test root cause management.
Question 391
The same test suite must run against four runtime versions, with results visible separately per version. Which job strategy minimizes copy-pasted YAML?
- Use maxParallel to cap matrix concurrency
- Use a matrix strategy for independent test variants
- Use deployment jobs for tracked environments
- Use job timeout settings for hung processes
- Use separate build and deployment stages
Explanation
Correct Answer
B:A matrix strategy creates related job variants from configuration values, letting each variant run with its own parameters.
Incorrect Answers
A:maxParallel limits concurrent matrix legs to an explicit maximum, balancing test speed with available agent capacity; it contributes to capped test-matrix fanout, with parameterized parallel test expansion still requiring its own control.
C:Deployment jobs target environments and support deployment strategies, environment history, and resource-based approvals; this option addresses environment-aware deployment execution rather than addressing parameterized parallel test expansion.
D:Job or task timeout settings place an upper limit on execution, allowing stalled runs to fail and free capacity; it handles stalled job resource protection but cannot by itself deliver parameterized parallel test expansion.
E:Multi-stage YAML pipelines separate build and release phases with independent conditions, dependencies, and environment controls; parameterized parallel test expansion remains outside the responsibility of separation of build and delivery boundaries.
Question 392
An engineering lead needs a report of unresolved bugs that block user stories, including parent-child relationships. What query approach should be selected?
- Link test cases to user stories
- Link commits to Azure Boards work items
- Associate pipeline runs with commits
- Use Azure Boards queries with linked work items
Explanation
Correct Answer
D:Work item link queries can evaluate relationships between bugs, stories, and other Azure Boards items rather than filtering only individual fields.
Incorrect Answers
A:Azure Test Plans relationships between test cases and work items provide requirement-to-test coverage and execution context; here related-work-item reporting is the target, not requirement-to-test evidence.
B:Referencing work-item IDs from commits and pull requests creates navigable development links in the work item and improves auditability; although that supports code-to-backlog traceability, this scenario calls for related-work-item reporting.
C:Pipeline run metadata and immutable source commit identifiers connect produced artifacts to their source revision and build results; related-work-item reporting cannot be inferred from build-to-source provenance alone.
Question 393
An Azure Pipeline must run on pushes to main when service code changes, but must not run on docs-only changes or release-branch pushes. Which TWO trigger controls jointly implement this? Choose TWO.
- Configure a branch push trigger in Azure Pipelines
- Configure path-filtered CI triggers
- Configure a manual workflow_dispatch event
- Configure a scheduled pipeline trigger
- Configure pipeline-completion triggers
Explanation
Correct Answers
A:A CI trigger with branch inclusion for main queues runs on matching pushes while excluding unrelated branches.
B:YAML path include or exclude filters scope CI triggers to changes in specified repository paths; combine this path rule with a main-branch push trigger to avoid unrelated branches and documentation-only commits. Combine the path rule with a main-only branch trigger; neither restriction alone satisfies both exclusions.
Incorrect Answers
C:workflow_dispatch supports manually started GitHub workflows and declared inputs, keeping emergency operations explicit; it contributes to operator-initiated parameterized workflow, with push-based mainline build selection still requiring its own control.
D:Scheduled triggers use cron-style schedules to queue pipeline runs independently of repository push events; this solves time-driven unattended validation, leaving push-based mainline build selection unresolved.
E:Pipeline resource completion triggers can queue downstream runs based on the completion of a specified upstream pipeline; this option addresses upstream-build-driven automation rather than addressing push-based mainline build selection.
Question 394
Developers can edit pipeline YAML and may bypass a deployment job environment reference, but any production Azure deployment requires the same service connection. Where should approval be enforced?
- Place approval checks on a production service connection
- Add an exclusive lock to serialize deployments
- Investigate a check that timed out
- Add a secure-file approval check
- Add an Invoke REST API check
Explanation
Correct Answer
A:Approval checks attached to the protected service connection apply whenever an authorized pipeline attempts to use it, regardless of whether the YAML declares an environment.
Incorrect Answers
B:The exclusive lock check serializes stage access to a protected resource, allowing one eligible deployment through at a time; mutual exclusion for release changes concerns a different control point than approval bound to cloud deployment credential.
C:A stage does not run when required checks time out; the operator can inspect the check and retry the stage after correcting the condition; here approval bound to cloud deployment credential is the target, not missed check deadline diagnosis.
D:A secure file can have an approval check that gates consumption even by an otherwise authorized pipeline; although that supports human review of signing-file use, this scenario calls for approval bound to cloud deployment credential.
E:REST API checks integrate an external policy decision with the resource approval lifecycle before deployment begins; approval bound to cloud deployment credential cannot be inferred from external change-control API evaluation alone.
Question 395
A schema deployment completed without errors, but application queries may now be slower or failing in production. Which postdeployment validation is valuable?
- Monitor database error rates immediately after migration
- Make database migrations retry-safe
- Use a deployment lock around shared schema updates
- Use transactional migrations where supported
- Version database schema migrations with application code
Explanation
Correct Answer
A:Query latency and database error telemetry can detect regressions that successful DDL execution alone cannot reveal.
Incorrect Answers
B:Idempotent or state-aware migration execution detects already applied changes and prevents duplicate effects during retry; that changes safe partial migration rerun without delivering runtime postmigration database health.
C:Serializing schema modification stages prevents concurrent migration attempts against the same shared database resource; exclusive database upgrade execution cannot substitute for runtime postmigration database health.
D:Wrapping supported migration operations in a transaction allows atomic commit or rollback if a step fails; runtime postmigration database health falls outside the scope of all-or-nothing database change.
E:Source-controlled migration scripts version database changes alongside application revisions and allow controlled execution in the release workflow; it contributes to versioned database evolution, with runtime postmigration database health still requiring its own control.
Question 396
PR-only security scans miss new advisories affecting unchanged code; what combined schedule should be implemented?
- Run CodeQL analysis inside a controlled container
- Run scanning on pull requests and scheduled baselines
- Enable GitHub Advanced Security for Azure DevOps
- Enable CodeQL code scanning for supported repositories
Explanation
Correct Answer
B:Change-triggered and recurring scans together detect introduced vulnerabilities and subsequently disclosed issues in stable dependencies.
Incorrect Answers
A:Running the supported CodeQL analysis workflow in a managed container isolates scanner tooling and makes its runtime dependencies repeatable across builds; it handles isolated static-analysis execution environment but cannot by itself deliver continuous risk detection beyond code changes.
C:GitHub Advanced Security for Azure DevOps brings supported code, dependency, and secret scanning capabilities to Azure DevOps repositories; that acts on advanced scanning on Azure Repos, whereas the requested outcome is continuous risk detection beyond code changes.
D:CodeQL analyzes code using language-aware queries and can surface findings through GitHub code scanning; static code vulnerability analysis concerns a different control point than continuous risk detection beyond code changes.
Question 397
Multiple teams need a consistent, versioned infrastructure module catalog instead of copying Bicep files between repos. Which distribution method helps?
- Use Bicep modules for reusable resource groups
- Use a reusable module registry for Bicep
- Detect environment drift with desired-state comparisons
- Use Azure Policy to check IaC outcomes
- Use managed identity for IaC execution
Explanation
Correct Answer
B:A supported Bicep module registry publishes reusable modules with explicit version references for consuming templates.
Incorrect Answers
A:Bicep modules package resource declarations behind parameters and outputs so common infrastructure patterns can be reused; the distinction is modular Azure resource definitions versus centrally versioned IaC component sharing.
C:Drift checks compare actual deployed configuration with version-controlled intended state, revealing out-of-band changes; its effect is detecting manual configuration divergence, not centrally versioned IaC component sharing.
D:Azure Policy evaluates configured resource compliance and can deny changes that violate assigned policy definitions; that changes enforcement of Azure resource guardrails without delivering centrally versioned IaC component sharing.
E:Federated or managed workload identities enable Azure authentication without embedding reusable credential secrets in source or task configuration; credentialless deployment identity cannot substitute for centrally versioned IaC component sharing.
Question 398
A single service principal can deploy to every subscription, and a compromised dev pipeline could alter production. Which identity layout reduces blast radius?
- Rotate expiring application credentials before outage
- Prefer a certificate credential over an unmanaged shared password when required
- Assign only data-plane access for Key Vault secret retrieval
- Use managed identity when Azure hosting supports it
- Use workload identity federation for Azure Pipelines
- Separate production and development deployment identities
Explanation
Correct Answer
F:Distinct workload identities and scoped RBAC separate lower-trust development automation from production deployment authority.
Incorrect Answers
A:Credential expiry monitoring and planned rotation prevent authentication failures while maintaining auditability of replacement keys; this solves noninteractive identity credential continuity, leaving environment identity isolation unresolved.
B:Certificate credentials support asymmetric authentication and rotation, avoiding broad reuse of a plaintext shared client secret; this option addresses certificate-backed application identity rather than addressing environment identity isolation.
C:Key Vault data-plane roles or access policies grant secret retrieval without general resource management authority; it handles secret-read without infrastructure administration but cannot by itself deliver environment identity isolation.
D:Managed identity obtains Azure access tokens from the hosting platform without a developer-managed long-lived authentication secret; environment identity isolation remains outside the responsibility of elimination of embedded Azure credentials.
E:Workload identity federation exchanges trusted short-lived pipeline assertions for Azure access tokens without storing a client secret; that acts on secretless Azure DevOps-to-Azure authentication, whereas the requested outcome is environment identity isolation.
Question 399
A pipeline updates a variable during a preceding step, and a later task must read the new value immediately before execution. Which variable reference syntax should it use?
- Use secret pipeline variables for confidential values
- Use a variable group for shared environment settings
- Use runtime macro syntax for a task input
- Use dependsOn to order jobs
- Use template expressions for parameter-driven structure
Explanation
Correct Answer
C:Azure Pipelines macro syntax such as $(name) is expanded at runtime before tasks execute and can reflect prior variable updates.
Incorrect Answers
A:Secret variables store sensitive settings outside checked-in YAML and require controlled injection into task environments; although that supports runtime secret injection, this scenario calls for task-time variable value expansion.
B:Variable groups centralize named variables for authorized pipelines, with optional secret integration and access controls; task-time variable value expansion cannot be inferred from shared pipeline configuration alone.
D:A dependsOn relationship establishes an execution dependency between jobs or stages, enabling controlled ordering and status evaluation; task-time variable value expansion cannot be delivered through explicit job prerequisite ordering.
E:Compile-time template expressions evaluate parameters and statically available variables while expanding reusable YAML structure; its effect is compile-time job graph generation, not task-time variable value expansion.
Question 400
Hundreds of low-priority findings exist, but the organization wants clear blocking conditions based on exploitability and severity. Which governance control should be codified?
- Define vulnerability severity thresholds for release decisions
- Use least-privilege tokens for security scanners
- Run scanning on pull requests and scheduled baselines
- Enable GitHub Advanced Security for Azure DevOps
Explanation
Correct Answer
A:A documented risk-based scanning policy defines failure thresholds and exception handling rather than treating every scanner finding equally.
Incorrect Answers
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 policy-driven vulnerability release gate still requiring its own control.
C:Change-triggered and recurring scans together detect introduced vulnerabilities and subsequently disclosed issues in stable dependencies; this solves continuous risk detection beyond code changes, leaving policy-driven vulnerability release gate unresolved.
D:GitHub Advanced Security for Azure DevOps brings supported code, dependency, and secret scanning capabilities to Azure DevOps repositories; this option addresses advanced scanning on Azure Repos rather than addressing policy-driven vulnerability release gate.