Skip to content

Add path-filtered CodeQL workflow for content-specific analysis#1444

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/consider-tuning-code-ql-checks
Draft

Add path-filtered CodeQL workflow for content-specific analysis#1444
Copilot wants to merge 3 commits into
mainfrom
copilot/consider-tuning-code-ql-checks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

CodeQL default setup runs all 7 language analyzers on every PR regardless of which files changed. A Java-only PR shouldn't wait for Python, Go, C#, JS, and Actions scans.

Adds .github/workflows/codeql.yml (advanced setup) with dorny/paths-filter to gate each language's analysis on whether its directory actually has changes:

  • PR behavior: Only analyzes languages with changed files (java/**java-kotlin, nodejs/**/scripts/**javascript-typescript, etc.)
  • Push/schedule behavior: Analyzes all languages unconditionally for full coverage on main and weekly scheduled runs
  • Matrix strategy: Each language has an independent gate output; jobs that don't match skip all steps cleanly

Requires admin action: A repo admin must switch CodeQL from "Default" to "Advanced" setup in Settings → Code security → Code scanning. Branch protection required checks may need updating if check names change.

Copilot AI and others added 2 commits May 26, 2026 23:49
Create .github/workflows/codeql.yml that uses dorny/paths-filter to
detect which language directories changed, then only runs CodeQL
analysis for those languages. This replaces the default setup which
analyzed all languages on every PR regardless of changed files.

On push to main and scheduled runs, all languages are analyzed.
On PRs, only languages with changed files are analyzed.

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Consider tuning Code QL checks for Java files Add path-filtered CodeQL workflow for content-specific analysis May 26, 2026
Copilot AI requested a review from edburns May 26, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider tuning Code QL checks to be content-specific

2 participants