Repository navigation
ci(codeql): trigger push analysis on TypeScript paths, not Python - #67
Merged
Merged
Conversation
The push trigger's paths filter still carried the Python scaffold's '**.py', a leftover from the devkit CodeQL workflow. cf5e93f pointed the language matrix at javascript-typescript but left this filter, so push-to-main analysis never fired for the TypeScript source this repo ships. Filter on the paths that matter here: '**.ts', '**.js', 'package*.json', and workflow files. Marked as a LOCAL FIX divergence from the scaffold; the upstream fix is tracked by the language-aware scaffold work in vig-os/devkit#1027 / vig-os/devkit#1039. Refs: #61
This was referenced Jul 14, 2026
Closed
c-vigo
added a commit
to vig-os/devkit
that referenced
this pull request
Jul 16, 2026
## Description `render_codeql_matrix()` (`assets/init-workspace.sh`) rewrites the CodeQL `language:` matrix per detected language (#1025) but left the push-to-main trigger's `paths:` filter hardcoded to `**.py`. On a Node consumer, a push touching only TS/JS therefore never fired the post-merge CodeQL scan — only the unfiltered PR trigger caught it. And because `codeql.yml` is a managed file, consumer hand-fixes (e.g. commit-action's `**.ts` patch, vig-os/commit-action#67) were silently reverted on every devkit upgrade. ## Type of Change - [x] `fix` -- Bug fix ## Changes Made - Extend `render_codeql_matrix()` to build the push `paths:` list from the same language detection it already uses for the matrix: - python → `'**.py'` - node → `'**.ts'`, `'**.js'`, `'**.mjs'`, `'**.cjs'` - rust → no source globs (CodeQL ships no Rust analyzer) - the `'.github/workflows/**'` catch-all is always kept - marker-less repos get a workflows-only filter - Rewrite the `paths:` block with `awk` (the item count varies per language, so a single `sed` line-replace can't do it); the language matrix render is unchanged. - Regression bats tests for node / python / rust / marker-less consumers. ## Changelog Entry ### Fixed - **Render CodeQL push `paths:` filter per detected language** ([#1142](#1142)) - full entry in `CHANGELOG.md` under `## Unreleased`. ## Testing - [x] Tests pass locally (`just test`) - [x] Manual testing performed (describe below) ### Manual Testing Details - `bats tests/bats/init-workspace.bats` → 212/212 pass (4 new #1142 tests + the existing #1025 matrix tests). - Scaffolded a throwaway Node consumer and confirmed the rendered `on.push.paths` block lists `**.ts`/`**.js`/`**.mjs`/`**.cjs` + `.github/workflows/**` with clean YAML indentation. - `shellcheck -x assets/init-workspace.sh` clean; full `prek run --all-files` green. ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and pasted the entry above) - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective - [x] New and existing unit tests pass locally with my changes ## Additional Notes Found during the sync-issues-action deploy recon — affects every JS-action consumer (commit-action today, sync-issues-action next). With this merged, deploys no longer need to re-patch `codeql.yml` by hand after each scaffold sync. Closes #1142 Refs: #1142
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The push trigger's
pathsfilter still carried the Python scaffold's**.py, so push-to-main CodeQL analysis never fired for the TypeScript source this repo ships (cf5e93fswitched the language matrix but left the filter).Filter on
**.ts,**.js,package*.json, and workflow files instead. Marked as a LOCAL FIX divergence from the devkit scaffold, tracked upstream by vig-os/devkit#1027 / vig-os/devkit#1039.Closes #61