nerdexam
Microsoft

GH-500 · Question #55

What is required to trigger code scanning on a specified branch?

The correct answer is D. The workflow file must exist in that branch. Scanning on push By default, the CodeQL analysis workflow uses the on:push event to trigger a code scan on every push to the default branch of the repository and any protected branches. For code scanning to be triggered on a specified branch, the workflow must exist in that…

Configure and use Code Scanning with CodeQL

Question

What is required to trigger code scanning on a specified branch?

Options

  • ADevelopers must actively maintain the repository.
  • BSecret scanning must be enabled on the repository.
  • CThe repository must be private.
  • DThe workflow file must exist in that branch.

How the community answered

(34 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    3% (1)
  • D
    85% (29)

Explanation

Scanning on push By default, the CodeQL analysis workflow uses the on:push event to trigger a code scan on every push to the default branch of the repository and any protected branches. For code scanning to be triggered on a specified branch, the workflow must exist in that branch. For more information, see Workflow syntax for GitHub Actions.

Topics

#Code Scanning Trigger#GitHub Actions#Workflow Files#Branch Configuration

Community Discussion

No community discussion yet for this question.

Full GH-500 Practice