nerdexam
Microsoft

AZ-400 · Question #420

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

The correct answer is B. Add the name of the non-default branch to the on:push specification in the code scanning workflow. D. Update the code in the pull request.. There are other situations where there may be no analysis for the latest commit to the base branch for a pull request. These include: The pull request has been raised against a branch other than the default branch, and this branch hasn't been analyzed. The solution in this situat

Submitted by zhang_li· Mar 6, 2026Design and implement source control

Question

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.

Options

  • AAdd the name of the default branch to the on: push specification in the code scanning workflow.
  • BAdd the name of the non-default branch to the on:push specification in the code scanning workflow.
  • CDelete the pull request, and then raise the request again from the default branch.
  • DUpdate the code in the pull request.
  • EAdd a new workflow for code scanning.

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    80% (24)
  • C
    10% (3)
  • E
    7% (2)

Explanation

There are other situations where there may be no analysis for the latest commit to the base branch for a pull request. These include: The pull request has been raised against a branch other than the default branch, and this branch hasn't been analyzed. The solution in this situation is to add the name of the base branch to the on:push [THIS IS ANSWER B] 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. https://docs.github.com/en/[email protected]/code-security/code-scanning/automatically- scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository

Topics

#GitHub code scanning#non-default branch#on:push specification#pull request analysis

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice