A pull request can pass every required check while the application still depends on code that nobody has looked at in months.
GitHub now puts several kinds of analysis in the same workflow, but picking the right check still depends on what you want reviewed.

Overview
Pull request findings and repository findings answer different questions
GitHub’s December explanation separates checks tied to a proposed change from an on-demand scan that looks for security issues on the repository’s default branch.
This matters when you replace one part of an application but leave its neighboring modules alone, because those modules may still handle the same customer data.
A review of a new upload feature, for example, shouldn’t be mistaken for a review of every older place where users can share files.
Standard AI Scan can examine files that did not change
The GitHub AI Scan documentation describes a public preview that supplements CodeQL and can look at languages both inside and outside CodeQL coverage.
GitHub says the repository scan selects files and functions within a time budget, rather than going through every line in every file.
- Use a local review to catch problems in work that has not been committed or submitted for other people to review.
- Use pull request results to decide whether the proposed change needs more attention before someone merges it into the target branch.
- Use a default-branch scan to find review work in the existing application instead of waiting for a future change to touch it.
A wider scan does not turn a release into a sure thing
Findings from the repository scan appear in the code scanning backlog beside CodeQL alerts, so teams can handle them through one queue.
The fact that two tools report to the same queue doesn’t mean they examined the same code, ran with the same scope, or reached identical conclusions.
An empty list is less meaningful than a list you can tie to a repository, a completed run, and the code deployed to customers.
Read the Result in the Context of the Change
A pull request is a proposal to merge a set of changes, and its checks help reviewers decide whether that specific proposal is ready.
If a reviewer commits a correction during review, the revised change needs to be checked as carefully as the code that was originally submitted.
Check the latest commit in the pull request before relying on a check someone saw earlier, especially if several contributors have pushed updates since then.
The check’s name matters because a green unit test, a completed build, and a code scanning result each answer a different question about the proposal.
A pull request with no eligible security scan is not the same as a pull request where an eligible scan ran and produced no findings.
When a repository uses merge rules, read the rule’s actual required checks rather than assuming every comment or annotation automatically blocks a merge.
Pick the Scan That Fits the Code You Maintain
A developer with local changes can run the supported Copilot security review before sharing the work, provided the team’s policy permits that tool.
That check is a reasonable place to discover a risky assumption early, when the developer can still change an implementation without delaying other reviewers.
Use CodeQL on supported languages for rule-based analysis, and evaluate whether the organization’s pull request AI scan is enabled for the languages it covers.
GitHub’s general AI pull request scanning currently covers selected languages and frameworks outside CodeQL, so a repository’s mix of languages can produce different coverage.
An on-demand repository scan has a different scope and can surface issues in existing areas even when your new pull request never touches those files.
If a team needs deeper release or audit coverage, GitHub describes a separate Deep Scan in private preview, rather than an option every repository gets.
Decide Which Results Need Human Review First
Start with the finding that could reach the most sensitive data or service, not necessarily whichever alert was posted most recently in the interface.
A problem in an account recovery flow can have more practical impact than a superficially similar problem in a test tool used only with dummy data.
Read the code that makes the security decision, and ask which callers can reach it under normal use before assigning an owner or deadline.
A suggested fix is a starting point for a reviewer, not a reason to commit changes without understanding how the application is supposed to behave.
If the problem involves who can see or change something, include a test that uses a normal account and another account that should be denied.

How to Run and Verify a Default-Branch Review
Step 1: Confirm which repository and branch actually ship
In the repository you are authorized to review, check which branch is marked as the default and compare it with the release team’s deployment record.
If production comes from a tagged version or a maintained release branch, write down the difference before you tell anyone that production was reviewed.
For a service split across repositories, choose the one that owns the important security decision rather than scanning only the package that displays the interface.
Check with an organization owner whether AI Scan is allowed under your policy, whether the repository is eligible, and which usage charges might apply.
Step 2: Start the scan and watch the run
Open your repository and select Security and quality, then Code scanning in the left sidebar, where eligible projects expose the repository scan control.
Open the AI Scan dropdown in the upper right, then use the control beside Standard scan to start the scan of the default branch.
The repository AI Scan guidance explains the preview’s eligibility and costs, which you should confirm before starting a scan.
If you cannot see a scan control, check whether you have write access and whether the organization enabled this feature instead of changing permissions yourself.
Step 3: Triage the results in the code scanning backlog
After completion, use the code scanning list’s AI Scan tool filter to review the new alerts beside findings from other analysis.
Open the alert, look at the affected file and the surrounding code, and confirm what the scanner says could happen before assigning the work.
Give the issue to someone who understands that part of the application, and use your internal issue tracker when the discussion would reveal sensitive details.
If someone already owns a similar CodeQL result, compare the affected code and expected fix rather than creating two tickets for the same underlying problem.
Step 4: Review and test the fix as a separate change
Make the smallest correction that restores the expected behavior, then open a regular pull request so the team can see the exact changes being proposed.
Run ordinary tests for legitimate users and check the security boundary, especially if a suggested change changes how a request is authorized or rejected.
After merge, run another Standard scan manually and confirm that the release record identifies which environment actually received the change.
If the backlog still shows an open alert, check its branch and detection date before closing it or assuming the fix didn’t work.
What to Do When a Scan Finds a Problem in Shipped Code
- Confirm which deployed releases contain the affected code before describing a repository alert as a production incident or notifying the wrong service owner.
- Assign a reviewer who can verify the application’s expected behavior and determine whether any customer-facing function needs a temporary restriction.
- Keep the relevant pull request, alert, and release identifiers together so another person can tell what was checked, changed, and actually deployed.
- Escalate promptly if ordinary operational records suggest the issue was used, and let the response team decide which logs need to be preserved.
- Verify the corrected behavior after deployment, using an account that should be allowed and one that should be refused where applicable.
- Recheck the backlog after the next analysis and add work for any related route that the original alert did not cover.
Use One Concrete Example to Test the Process
Imagine a team adding a new way to share documents while an older invitation flow remains part of the same application used by customers.
The pull request reviewer can verify that the new share option respects a document’s permissions, even if the invitation service never appears in the diff.
A wider backlog check might direct the team to the older flow, where a different set of rules decides when a guest can open documents.
The useful review asks whether that older rule is intentional, which tenant types use it, and how the team would reproduce the expected behavior safely.
A fix simply copying the new sharing rules may break genuine customer invites, particularly when existing customers rely on settings the new feature never reads.
Treat those rules as a separate review question and ask the person who owns the invitation flow to document normal behavior before proposing a correction.
This keeps the scan from turning into a bulk change across unrelated features when only one permission decision is actually wrong.
What to Record Before the Next Release
A release owner needs to know which checks ran, whether they completed, which commit they refer to, and who evaluated the important findings.
Write that down next to the release identifier so the next team does not have to reconstruct a decision from screenshots or chat messages.
If an issue was deferred because the code is only used internally, record why that restriction is believed to hold and who can verify it.
Do not convert a coverage gap into a pass merely because a different scan finished, particularly when the missing area handles signed-in customer requests.
If a preview is unavailable in your organization, keep CodeQL or another approved check running and give review time to the sensitive paths it misses.
Record what would cause the release to pause, such as a permissions test failing or an alert pointing to data the project cannot safely expose.
A scan is most useful when it leads to a decision someone can explain without asking everyone to trust the tool’s name.
Check Whether the Preview Fits Your Repository
GitHub lists different preview eligibility for organization-owned and personal repositories, so the first decision is which billing account and policy govern the project.
Public repositories owned by personal accounts can be eligible, but personal private repositories are not covered by the availability table for this preview.
An organization’s private or internal repository needs GitHub Code Security or GitHub Advanced Security, even though GitHub doesn’t require a Copilot license for this scan.
Check the Code Security AI credit budget separately, because a hard usage limit can prevent a new run from producing findings at all.
Write down the result of that check before a release depends on a scan nobody has permission or budget to run.
Teams should also check their organization’s AI Scan policy rather than assuming restrictions configured for Copilot models automatically govern the repository scanning feature.
Frequently Asked Questions
Does the pull request scan review all unchanged code?
Pull request findings relate to the changed code, so review older parts of your application separately when they carry an important security decision.
CodeQL can also run outside pull requests when configured, which is another reason to check the scope of the exact result you are reading.
Does Standard AI Scan read every line in the default branch?
GitHub describes a time-limited selection of code to examine, so the scan should not be treated as an exhaustive review of every file.
A high-risk component deserves direct review and tests even if an automated run did not list anything from that part of the project.
Which permission do I need to start a repository scan?
GitHub says eligible repositories let users with write access start a scan, subject to the feature’s availability and the organization’s policy.
If the control is missing, have the repository owner check those conditions rather than granting an employee administrative access just to find it.
What happens if CodeQL already reported the same issue?
GitHub says the repository AI scan suppresses findings already covered by CodeQL, while other results appear alongside existing alerts in the shared backlog.
Check which commit and branch an existing finding applies to before closing a newer report that only looks similar on the surface.
Is Deep Scan included for every GitHub customer?
GitHub described Deep Scan as being in private preview, so a general release plan should not depend on every repository having access to it.
If your organization cannot use it, make a specific plan to cover critical modules rather than waiting for access to an unconfirmed option.
Can I merge immediately when the checks are green?
A green check tells you about the analysis that ran, but it does not replace testing the behavior that made the change security-sensitive.
Review unexpected permission changes, fix suggestions, and any separate protections configured for the branch before letting that result decide whether to merge.
The Bottom Line
Use pull request checks for the change in front of you, and review the default branch when old code still makes important security decisions.
If a scan finds an issue, match it to the code actually deployed, assign someone to verify the fix, and retest the behavior before release.
Join the discussion
0 commentsShare your experience or ask a question about this article.
Discussion
Start the conversation
Have a question or something useful to share? Add the first comment.