You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code scanning merge protection blocks PRs forever when CodeQL workflows use path filters #4330
We run one CodeQL workflow per language, each with on.pull_request.paths (or paths-ignore), so a PR only scans the languages it touches. The default branch is scanned on push and on a weekly schedule, so it has results for all 4 categories (/language:actions, /language:java-kotlin, /language:javascript-typescript, /language:go).
The CodeQL check. On a PR that only touches TypeScript, the check concludes neutral with: "Code scanning cannot determine the alerts introduced by this pull request, because 3 configurations present on refs/heads/main were not found". So no alerts are compared or annotated on the PR at all.
Merge protection. With a ruleset code_scanning rule (CodeQL, security_alerts_threshold: high_or_higher), the same PR is blocked: "Code scanning is still expecting 3 results from CodeQL for <merge sha> or <head sha>". Those results never come, because the other workflows are not triggered for that PR.
Expected
A configuration whose workflow was not triggered by the PR (path filter) should count as unchanged from the base branch, not as missing. At minimum, the comparison should use the configurations the PR did produce. Today path filters and merge protection cannot be used together.
Workarounds we know of
Remove the path filters and scan every language on every PR. For a frontend-only PR, that costs us an 11-minute Java scan.
Our own gate: query the alerts on refs/pull/N/merge, keep the ones with no instance on the base branch, and fail a job that is a required check.
Thanks for you report. This is a known limitation. If you're a paying GitHub customer, I'd recommend also flagging this up through your GitHub account manager, so you're interest in getting this resolved gets registered.
Activity
jketema commentedon Nov 19, 2026
Hi @dbouclier,
Thanks for you report. This is a known limitation. If you're a paying GitHub customer, I'd recommend also flagging this up through your GitHub account manager, so you're interest in getting this resolved gets registered.