Microsoft

AZ-400 Free Practice Questions — Page 9

Question 82

You manage code by using GitHub. You plan to use Dependabot to scan for code dependencies. You need to identify when scanning will be triggered automatically. Which two actions will trigger a scan? Each correct answer presents a complete solution. NOTE: Each correct solution is worth one point.

A. The dependency graph of a repository changes.
B. A pull request is created.
C. A branch is forked.
D. Any commit is pushed.
E. A new advisory is added.
Show Answer
Correct Answer: A, E
Explanation:
Dependabot alerts are automatically triggered when the repository's dependency graph changes, prompting a rescan of dependencies, and when a new security advisory is added to the GitHub Advisory Database, causing affected repositories to be checked. Creating a pull request, forking a branch, or pushing any commit do not by themselves trigger Dependabot alert scans unless they result in a dependency graph change.

Question 83

DRAG DROP - You have a tenant in Microsoft Azure Active Directory (Azure AD), part of Microsoft Entra. The tenant contains three groups named Group1, Group2, and Group3. You create a new project in Azure DevOps named Project1. You need to secure the service connections for Project1. The solution must meet the following requirements: • The members of Group1 must be able to share and unshare a service connection with other projects. • The members of Group2 must be able to rename a service connection and update the description. • The members of Group3 must be able to use the service connection within build or release pipelines. • The principle of least privilege must be followed. Which permission should you grant to each group? To answer, drag the appropriate permissions to the correct groups. Each permission may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 83
Show Answer
Correct Answer: Group1: Organization-level Administrator Group2: Creator Group3: User
Explanation:
Sharing/unsharing service connections across projects requires Organization-level Administrator. Renaming and updating the description can be done by the Creator role with fewer privileges than Project-level Administrator. Using a service connection in pipelines requires the User role.

Question 84

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app. TestSuite1 fails intermittently. You identify that the failures are unrelated to changes in the source code and execution environment. You need to minimize troubleshooting effort for the TestSuite1 failures. Solution: You increase code coverage. Does this meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
Increasing code coverage does not address intermittent, non-code-related test failures. Such failures are characteristic of flaky tests, and minimizing troubleshooting effort is better achieved by identifying, isolating, rerunning, or stabilizing flaky tests rather than expanding test coverage.

Question 85

DRAG DROP - You have an Azure Pipelines application CI/CD pipeline named Pipeline1. You need to add OWASP ZAP testing to Pipeline1. Which four actions should you add to Pipeline1 in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Illustration for AZ-400 question 85
Show Answer
Correct Answer: Pull OWASP ZAP weekly. Start a container. Run the baseline. Report the results.
Explanation:
The recommended Azure Pipelines integration uses the OWASP ZAP Docker image, starts the container, executes the baseline scan for CI/CD, and then publishes the scan results.

Question 86

HOTSPOT - You have a GitHub repository. You plan to use the repository to create a container. You need to configure GitHub Actions to deploy the container to GitHub Container Registry. How should you complete the script? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 86
Show Answer
Correct Answer: Step 1: docker build --file Dockerfile --tag ${{ github.repository }}:latest --label "runnumber=${{ github.run_number }}" Step 2: echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin Step 3: docker push ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest
Explanation:
To publish to GitHub Container Registry, build the image, authenticate to ghcr.io using the GitHub Actions GITHUB_TOKEN via stdin, then push the tagged image to ghcr.io/<owner>/<repository>:latest. Pull is unnecessary.

Question 87

You plan to publish build artifacts by using an Azure pipeline. You need to create an .artifactignore file that meets the following requirements: • Includes all files in the build output folder and all subfolders • Excludes files that have the .dll extension What should you include in the file?

A. ./** !*.dll
B. **/* !*.dll
C. */** *.dll
D. **/* #*.dll
Show Answer
Correct Answer: B
Explanation:
In .artifactignore syntax (similar to .gitignore), '**/*' matches all files recursively, causing them to be ignored, and '!*.dll' is a negation pattern that re-includes .dll files so they are published. This matches the intended pattern syntax shown in the Azure DevOps documentation.

Question 88

You have an app named App1 that is built by using Azure Pipelines. The source code for App1 is stored in Azure Repos and contains open source libraries. You need to identify security vulnerabilities in the open source code. What should you use?

A. Mend Bolt
B. Rollbar
C. Code Climate
D. DeepSource
Show Answer
Correct Answer: A
Explanation:
Mend Bolt (formerly WhiteSource Bolt) is an Azure DevOps extension that scans open source dependencies in Azure Repos/Azure Pipelines projects to identify known security vulnerabilities and license risks. The other options focus on error monitoring or code quality/static analysis rather than open source dependency vulnerability scanning.

Question 89

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app. TestSuite1 fails intermittently. You identify that the failures are unrelated to changes in the source code and execution environment. You need to minimize troubleshooting effort for the TestSuite1 failures. Solution: You enable Test Impact Analysis (TIA). Does this meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
Test Impact Analysis (TIA) reduces the number of tests run by selecting tests affected by code changes. It does not identify, isolate, or reduce troubleshooting for intermittent (flaky) test failures that are unrelated to source code or the execution environment. Managing flaky tests requires other approaches, not TIA.

Question 90

You plan to use Azure DevOps to build and deploy an app that will be hosted in a Kubernetes cluster. You need to scan the app image for vulnerabilities before the image is deployed to the cluster. What should you include in the solution?

A. Microsoft Defender for Containers
B. Microsoft Defender for App Service
C. Microsoft Defender for DevOps
D. Microsoft Defender for Storage
Show Answer
Correct Answer: A
Explanation:
Microsoft Defender for Containers provides vulnerability assessment and scanning for container images and protection for Kubernetes workloads. It is the appropriate service to scan container images before deployment to a Kubernetes cluster. Defender for App Service protects App Service workloads, Defender for Storage protects storage accounts, and Defender for DevOps focuses on DevOps security posture and code/repository integration rather than being the primary container image vulnerability scanning service in this scenario.

Question 91

DRAG DROP - You are using Agile process methodologies and Azure Boards in Azure DevOps. You import the work items shown in the following table. You need to categorize the items. Which state should you assign to each item? To answer, drag the appropriate states to the correct items. Each state may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 91 Illustration for AZ-400 question 91
Show Answer
Correct Answer: Item1: Resolved Item2: Proposed Item3: Completed
Explanation:
In the Agile process, Proposed is for not-started work, Resolved is implemented but awaiting verification, and Completed is finished work that no longer appears on the backlog (though it can still appear on boards depending on board settings).

$19

Get all 534 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.