GH-500 · Question #92
When code scanning is enabled, what is one default event that triggers a scan?
The correct answer is C. Pushing a change. When code scanning is enabled with default settings, a push event is one of the default triggers that automatically initiates a scan to detect vulnerabilities in newly introduced code.
Question
When code scanning is enabled, what is one default event that triggers a scan?
Options
- ACreating a new branch.
- BDeleting a branch.
- CPushing a change.
- DMerging a branch.
How the community answered
(34 responses)- A3% (1)
- B6% (2)
- C88% (30)
- D3% (1)
Why each option
When code scanning is enabled with default settings, a push event is one of the default triggers that automatically initiates a scan to detect vulnerabilities in newly introduced code.
Creating a new branch is not a default code scanning trigger event; a subsequent push of commits to that branch is what initiates a scan, not the branch creation itself.
Deleting a branch removes code from active development and does not introduce new code, so it is not a meaningful or default trigger event for code scanning.
Pushing a change is configured as a default trigger event in the code scanning workflow so that every new commit pushed to the repository immediately initiates a security scan, ensuring vulnerabilities introduced by new code are detected as early as possible in the development process.
A branch merge is not a separate default trigger event in code scanning workflow configuration; the push event that results from the merge is what triggers the scan, not the merge action as its own distinct event type.
Concept tested: Default trigger events for code scanning workflow execution
Source: https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning
Topics
Community Discussion
No community discussion yet for this question.