Using advanced setup, which code scanning configuration would help detect vulnerabilities before they are added to a shared branch?
Correct Answer: B
Code scanning merge protection prevents a pull request from merging into a protected branch if it contains security issues or if required code scanning tools are missing or incomplete. This feature, configured using GitHub Rulesets>>, acts as a safeguard, blocking merges until all code scanning alerts are addressed to a defined severity level and the analysis is complete.
Code Scanning Configuration: You configure code scanning tools (like CodeQL) in your repository to run automatically on pull requests using the pull_request: event trigger.
Incorrect:
[Not A]
workflow_dispatch is a GitHub Actions trigger that allows users to manually start a workflow on demand, offering flexibility for tasks like deployments or testing that don't need to run automatically on every code change. This trigger can be configured with custom inputs to provide different parameters for each manual run, giving users more control over when and how specific workflows are executed.