CodeQL default setup: required checks never report on PRs that don't touch analyzed languages, which blocks merging #212236
Unanswered
Pissmyran
asked this question in
Code Security
Replies: 1 comment
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Code quality
Discussion Details
Summary
With CodeQL default setup, a pull request that only changes files outside the analyzed languages (for example Markdown, TOML, JSON or YAML that is not a workflow) gets no CodeQL check at all. If the base branch ruleset requires
Analyze (<language>)or "Require code scanning results", the PR stays inblockedstate forever. Nothing fails, nothing is pending in the checks list, and there is no way to re-run anything.I would like CodeQL to work out which analyses a PR actually needs from the files it changes, and to always report a result for the required checks, so a skipped analysis counts as passed instead of blocking.
What I observed
Public repository, Swift project with a few helper scripts and workflows, CodeQL default setup, query suite default.
Ruleset on the default branch requires:
Analyze (swift).github/workflowsAnalyze (actions)plus the other configured languages*.md,*.toml,*.json,*.yaml(no workflow, no source)blockedOn the blocked PR the commit has check runs from other tools, but no CodeQL run and no commit status.
GET /repos/OWNER/REPO/commits/SHA/statusreturnsstate: pendingwith an emptystatuseslist. The ruleset still waits forAnalyze (swift).Default setup API for the repo reports
state: configured, so setup itself is fine.Why this is a problem
Suggestion
Package.swift, lockfiles and workflow files).This keeps default setup simple, saves Actions minutes on docs-only PRs, and removes a merge blocker for repositories that rely on rulesets.
Questions for the community
All reactions