Code scanning on pull requests

Understand how CodeQL and AI Scan find and help prevent vulnerabilities in pull requests across your organizations.

Overview

The "Code scanning on pull requests" report in security overview helps you understand how well code scanning is preventing vulnerabilities in pull requests in your organization or across organizations in your enterprise. You can view the entire dataset or filter for specific criteria, making it easy to identify repositories where you may need to take action to find and reduce security risks.

The report has separate CodeQL and AI Scan tabs.

Available metrics

CodeQL metrics

The overview shows you a summary of how many vulnerabilities prevented by CodeQL have been caught in pull requests. The metrics are only tracked for pull requests that have been merged into the default branches of repositories in your organizations.

You can also find more granular metrics, such as how many alerts were fixed with and without Copilot Autofix suggestions, how many were unresolved and merged, and how many were dismissed as false positive or risk accepted.

You can also view:

Metrics for Copilot Autofix will be shown only for repositories where Copilot Autofix is enabled.

AI Scan metrics

The AI Scan tab shows:

The date range and filters that you select apply to all AI Scan metrics displayed in the report.

Visibility

You can see code scanning metrics for a repository if you have:

Next steps

To view the "Code scanning on pull requests" report, see Viewing code scanning metrics for pull requests.