πŸ”

AZ-400 β€” questions

Page 8 of 18 Β· 358 total questions.

Topic 5 Β· Question 224

You use GitHub for source control and Microsoft Teams for collaboration. You need to send a notification to a Teams channel for each commit. The solution must minimize development effort. What should you do?

  • AUse Azure Automation to connect to the GitHub Actions API and send a message to the Teams channel.
  • BUse the Microsoft Teams for GitHub app and configure a subscription to receive notifications in the Teams channel. (correct answer)
  • CUse GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API.
  • DUse Azure Functions to connect to the GitHub REST API and send a message to the Teams channel.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use the Microsoft Teams for GitHub app and configure a subscription to receive notifications in the Teams channel.

Topic 5 Β· Question 225

You manage source code control and versioning by using GitHub. You need to ensure that a PowerShell script is executed automatically before rebase operations are performed. What should you use?

  • Aa package
  • BGitHub Copilot
  • Ca webhook (correct answer)
  • Da gist
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: a webhook.

Topic 5 Β· Question 228

You use GitHub to host container packages that use Semantic Versioning (SemVer). You have an app named App1. The current version of App1 is 11.2.0. You change the code of App1 to fix a bug that was introduced in version 10.5.1. Which version number should you assign to the release?

  • A10.5.1-PATCH
  • B11.2.1 (correct answer)
  • C10.5.2
  • D10.6.0
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 11.2.1.

Topic 5 Β· Question 230

You manage code by using GitHub. You need to ensure that repository owners are notified if a new vulnerable dependency or malware is found in their repository. What should you do?

  • AConfigure CodeQL scanning actions.
  • BConfigure Dependabot alerts. (correct answer)
  • CConfigure branch protection rules for each repository.
  • DSubscribe all the repository owners to the GitHub Advisory Database.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure Dependabot alerts.

Topic 5 Β· Question 231

You have a public GitHub repository named Public1. A commit is made to Public1. The commit contains a pattern that matches a regular expression. Who is notified first when the commit is made?

  • Athe administrator of the GitHub organization
  • Bthe committer
  • Cthe owner of Public1
  • Dthe secret scanning partner (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: the secret scanning partner.

Topic 5 Β· Question 232

You have a GitHub repository. You need to ensure that all the code in the repository is scanned for vulnerabilities. What should you use?

  • ADependabot alerts
  • Bbranch protection rules
  • CCodeQL actions (correct answer)
  • DGitHub Advisory Database databases
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: CodeQL actions.

Topic 5 Β· Question 234

You have a 1-TB Azure Repos repository named repo1. You need to clone repo1. The solution must meet the following requirements: β€’ You must be able to search the commit history of the /src directory β€’ The amount of time it takes to clone the repository must be minimized Which command should you run?

  • Agit clone –-depth-1 [email protected]:v3/org/Project1/repo1
  • Bgit clone –-filter=blob:none [email protected]:v3/org/Project1/repo1 (correct answer)
  • Cgit clone [email protected]:v3/org/Project1/repo1
  • Dgit clone –-filter=true:0 [email protected]:v3/org/Project1/repo1
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: git clone –-filter=blob:none [email protected]:v3/org/Project1/repo1.

Topic 5 Β· Question 235 Β· Select all that apply

You use GitHub for source control. You are evaluating whether to use proxying to add a private upstream MyGet package feed to your MyGet feed. What are two possible advantages of this approach? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • Aminimizes the impact of upstream source availability issues
  • Bminimizes latency when accessing the package
  • Cprovides automatic authentication (correct answer)
  • Dminimizes the impact on your storage quota (correct answer)
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: provides automatic authentication Option D: minimizes the impact on your storage quota.

Topic 5 Β· Question 236

You manage source code control and versioning by using GitHub. A large file is committed to a repository accidentally. You need to reduce the size of the repository. The solution must remove the file from the repository. What should you use?

  • Abfg (correct answer)
  • Blfs
  • Cgvfs
  • Dinit
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: bfg.

Topic 5 Β· Question 239

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?

  • Abranch policies (correct answer)
  • Bpull request templates
  • Cbranch security
  • Dpull request permissions
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: branch policies.

Topic 5 Β· Question 240 Β· Select all that apply

You use Git for source control. You need to commit a 3-GB ZIP file that contains virtual machines used for testing. The solution must meet the following requirements: β€’ The file must be versioned. β€’ The file must be associated with the corresponding code commits. Which two actions should you include in the solution? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • AInstall the git-fat extension and associate the extension to ZIP files.
  • BInstall the Git LFS extension and associate the extension to ZIP files. (correct answer)
  • CInstall the git-stash extension and associate the extension to ZIP files.
  • DUse GZip to compress the file before committing the file.
  • EStore files in Azure Storage and enable blob versions. (correct answer)
Reveal answer & explanation
Correct answer: B, E

The correct answer is B, E. Option B: Install the Git LFS extension and associate the extension to ZIP files. Option E: Store files in Azure Storage and enable blob versions.

Topic 5 Β· Question 241

You manage source control by using GitHub. You have a file named Data.txt that contains sensitive data. A user pushes Data.txt to a repository. You need to purge the file from the repository. Which two commands can you use? Each correct answer presents a complete solution. NOTE: Each correct solution is worth one point.

  • Agit checkoutgit reset -hard -pathspec data.txt
  • Bgit checkoutgit clean -d data.txt --force
  • Cbfg --delete-files data.txtgit push --force (correct answer)
  • Dgit rm data.txtgit push --force
  • Egit filter-repo --invert-paths --path data.txtgit push origin --force --all
  • Fgit revert -edit data.txtgit push -force
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: bfg --delete-files data.txtgit push --force.

Topic 5 Β· Question 242

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?

  • AEnable Dependabot security updates.
  • BEnable Dependabot alerts.
  • CConfigure a required GitHub Actions workflow for all the repositories.
  • DPush a GitHub Actions workflow to all the repositories. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Push a GitHub Actions workflow to all the repositories.

Topic 5 Β· Question 244 Β· Select all that apply

You have a GitHub repository. You need to create a tag named v3.0.5 and ensure that the tag is available in the remote repository. Which two commands should you run? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • Agit push -force
  • Bgit push origin v3.0.5 (correct answer)
  • Cgit tag v3.0.5 (correct answer)
  • Dgit commit -m β€˜tag v3.0.5’
  • Egit add β€˜tag v3.0.5’
Reveal answer & explanation
Correct answer: B, C

The correct answer is B, C. Option B: git push origin v3.0.5 Option C: git tag v3.0.5.

Topic 5 Β· Question 245 Β· Select all that apply

You have a GitHub repository. You need to ensure that all changes to code are validated by your company’s security department before the main branch is deployed. Which two actions can you perform? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • ARequire signed commits.
  • BCreate a branch protection rule for the feature branches.
  • CCreate a LICENSE file.
  • DCreate a branch protection rule for the main branch. (correct answer)
  • ECreate a CODEOWNERS file. (correct answer)
Reveal answer & explanation
Correct answer: D, E

The correct answer is D, E. Option D: Create a branch protection rule for the main branch. Option E: Create a CODEOWNERS file.

Topic 6 Β· Question 248

Your company has 60 developers who are assigned to four teams. Each team has 15 members. The company uses an agile development methodology. You need to structure the work of the development teams so that each team owns their respective work while working together to reach a common goal. Which parts of the taxonomy should you enable the team to perform autonomously?

  • AFeatures and Tasks
  • BInitiatives and Epics
  • CEpics and Features
  • DStories and Tasks (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Stories and Tasks.

Topic 6 Β· Question 249

Your company creates a new Azure DevOps team. You plan to use Azure DevOps for sprint planning. You need to visualize the flow of your work by using an agile methodology. Which Azure DevOps component should you use?

  • AKanban boards (correct answer)
  • Bsprint planning
  • Cdelivery plans
  • Dportfolio backlogs
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Kanban boards.

Topic 6 Β· Question 250 Β· Select all that apply

Your company implements an Agile development methodology. You plan to implement retrospectives at the end of each sprint. Which three questions should you include? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • AWho performed well?
  • BWho should have performed better?
  • CWhat could have gone better? (correct answer)
  • DWhat went well? (correct answer)
  • EWhat should we try next? (correct answer)
Reveal answer & explanation
Correct answer: C, D, E

The correct answer is C, D, E. Option C: What could have gone better? Option D: What went well? Option E: What should we try next?

Topic 6 Β· Question 251

Your team uses an agile development approach. You need to recommend a branching strategy for the team's Git repository. The strategy must meet the following requirements. β€’ Provide the ability to work on multiple independent tasks in parallel. β€’ Ensure that checked-in code remains in a releasable state always. β€’ Ensure that new features can be abandoned at any time. β€’ Encourage experimentation. What should you recommend?

  • Aa single long-running branch without forking
  • Bmultiple long-running branches
  • Ca single fork per team member
  • Da single long-running branch with multiple short-lived feature branches (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: a single long-running branch with multiple short-lived feature branches.

Topic 6 Β· Question 252

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 integrate a cloud-hosted Jenkins server and a new Azure DevOps deployment. You need Azure DevOps to send a notification to Jenkins when a developer commits changes to a branch in Azure Repos. Solution: You create a service hook subscription that uses the build completed event. Does this meet the goal?

  • AYes
  • BNo (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: No.

Showing questions 141–160 of 358 Β· Page 8 of 18