Free AZ-400 Exam Braindumps
Designing and Implementing Microsoft DevOps Solutions Questions 27–31 (page: 33)

Updated On: 16-Nov-2026

You use GitHub Enterprise for source control repositories. The repositories store C# code.
You need to enable CodeQL scanning for the repositories.
What should you do?

  1. Enable Dependabot security updates.
  2. Enable Dependabot alerts.
  3. Configure a required GitHub Actions workflow for all the repositories.
  4. Push a GitHub Actions workflow to all the repositories.

Answer(s): D



You have a project in Azure DevOps.
You need to implement a new branching solution. The solution must ensure that all pull requests meet the following requirements:
-Include linked work items.
-Pass build validation policies.
-Require at least three reviewers.
What should you include in the solution?

  1. pull request templates
  2. branch policies
  3. pull request permissions
  4. branch security

Answer(s): B

Explanation:

Branch policies help teams protect their important branches of development. Policies enforce your team's code quality and change management standards.
Require a minimum number of reviewers
Code reviews are important for software development projects. To ensure that teams review and approve PRs, you can require approval from a minimum number of reviewers. The basic policy requires that a specified number of reviewers approve the code, with no rejections.
Check for linked work items
For work item management tracking, you can require associations between PRs and work items. Linking work items provides more context for changes, and ensures that updates go through your work item tracking process.
Build validation
You can set a policy requiring PR changes to build successfully before the PR can complete. Build policies reduce breaks and keep your test results passing. Build policies help even if you're using continuous integration (CI) on your development branches to catch problems early.
A build validation policy queues a new build when a new PR is created or changes are pushed to an existing PR that targets the branch. The build policy evaluates the build results to determine whether the PR can be completed.


Reference:

https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies



DRAG DROP (Drag and Drop is not supported)
You have an Azure Repos repository that contains large PSD files.
You need to configure Git LFS to manage all the files.
How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more that 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.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: git lfs track "*.psd"
Defining which files should be tracked in Git LFS
Once Git LFS is installed you need to specify which files should be tracked in LFS. You can do this by specifying an entire folder to be tracked:
git lfs track 'images'
or you could specify that all files of a particular type should be tracked:
git lfs track "*.psd"
Box 2: git lfs migrate import--include="*.psd" --everything git-lfs-migrate(1)
NAME
git-lfs-migrate - Migrate history to or from Git LFS
SYNOPSIS
git lfs migrate <mode> [options] [--] [branch …]
DESCRIPTION
Convert files in a Git repository to or from Git LFS pointers, or summarize Git file sizes by file type. The import mode converts Git files (i.e., blobs) to Git LFS, while the export mode does the reverse, and the info mode provides an informational summary which may be useful in deciding which files to import or export.
you can run git lfs migrate import to convert some file types to LFS:
$ git lfs migrate import --include="*.mp3,*.psd"
migrate: Fetching remote refs: ..., done migrate: Sorting commits: ..., done migrate: Rewriting commits: 100% (1/1), done main d2b959babd099fe70da1c1512e2475e8a24de163 -> 136e706bf1ae79643915c134e17a6c933fd53c61 migrate: Updating refs: ..., done
If after conversion you find that some files in your working directory have been replaced with Git LFS pointers, this is normal, and the working copies of these files can be repopulated with their full expected contents by using git lfs checkout.
Box 3: git push
Push the converted repository as a new repository:
git push --force
While the --everything option means all commits reachable from any ref will be considered for migration, after migration only local refs will be updated even when --everything is specified. This ensures remote refs stay synchronized with their remote. In other words, refs/heads/foo will be updated with the --everything option, but refs/remotes/origin/foo will not, so it stays in sync with the remote until git push origin foo is performed. After checking that the results of a migration with --everything are satisfactory, it may be convenient to push all local branches to your remotes by using the --all option to git push.


Reference:

https://github.com/Git-lfs/Git-lfs/wiki/Tutorial https://docs.gitlab.com/ee/topics/git/lfs/
https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-migrate.adoc



HOTSPOT (Drag and Drop is not supported)
You use Git for source control. You have an app named App1.
In the main branch, you need to restore the third most recent revision of a file named App.exe.config.
How should you complete the command? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: switch
The following sequence switches to the master branch, reverts the Makefile to two revisions back.
$ git switch master
$ git restore --source master~2 Makefile
Box 2: --source
Incorrect:
--patch
--merge
--staged


Reference:

https://git-scm.com/docs/git-restore



You use Git for source control.
You enable GitHub code scanning.
You raise a pull request from a non-default branch. In the code scanning output, you receive the following error message: “Analysis not found.”
You need to ensure that the code scanning completes successfully for the pull request.
Which two actions should you perform? Each correct answer presents part of the solution.
Note: Each correct selection is worth one point.

  1. Add a new workflow for code scanning.
  2. Delete the pull request, and then raise the request again from the default branch.
  3. Add the name of the non-default branch to the on: push specification in the code scanning workflow.
  4. Update the code in the pull request.
  5. Add the name of the default branch to the on: push specification in the code scanning workflow.

Answer(s): D,E

Explanation:

The solution in this situation is to add the name of the base branch to the on:push and on:pull_request specification in the code scanning workflow on that branch and then make a change that updates the open pull request that you want to scan.
Note: Reasons for the "Analysis not found" message
After code scanning has analyzed the code in a pull request, it needs to compare the analysis of the topic branch (the branch you used to create the pull request) with the analysis of the base branch (the branch into which you want to merge the pull request). This allows code scanning to compute which alerts are newly introduced by the pull request, which alerts were already present in the base branch, and whether any existing alerts are fixed by the changes in the pull request. Initially, if you use a pull request to add code scanning to a repository, the base branch has not yet been analyzed, so it's not possible to compute these details. In this case, when you click through from the results check on the pull request you will see the "Analysis not found" message.


Reference:

https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-fo r-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository



Viewing page 33 of 81
Viewing questions 161 - 165 out of 398 questions


Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!