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
Question
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)- A3% (1)
- B80% (24)
- C10% (3)
- E7% (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
Community Discussion
No community discussion yet for this question.