Which events typically trigger a Code Scanning workflow?

Prepare for the GitHub Advanced Security Certification Test. Practice with multiple choice questions, detailed explanations, and hints. Achieve success on your first attempt!

Multiple Choice

Which events typically trigger a Code Scanning workflow?

Explanation:
Code Scanning workflows are designed to run as code changes flow through the repository. The most common triggers are events that reflect new or updated code: pushing commits to a branch and creating or updating pull requests. Scanning on push ensures every new commit is checked, catching issues early in the development process. Scanning on pull requests provides fast feedback during code review, allowing teams to address findings before merging into protected branches. Other options like triggering only when issues are created, manual API invocation, or scheduling don’t align with the typical workflow, as they either miss new changes or add steps outside the normal review and CI flow. Therefore, the typical triggers are on push and pull requests.

Code Scanning workflows are designed to run as code changes flow through the repository. The most common triggers are events that reflect new or updated code: pushing commits to a branch and creating or updating pull requests. Scanning on push ensures every new commit is checked, catching issues early in the development process. Scanning on pull requests provides fast feedback during code review, allowing teams to address findings before merging into protected branches. Other options like triggering only when issues are created, manual API invocation, or scheduling don’t align with the typical workflow, as they either miss new changes or add steps outside the normal review and CI flow. Therefore, the typical triggers are on push and pull requests.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy