From 5ebc469a112b023151396065728739eb1d20cd27 Mon Sep 17 00:00:00 2001 From: Chad Bentz <1760475+felickz@users.noreply.github.com> Date: Wed, 18 Nov 2026 16:06:59 -0500 Subject: [PATCH] Add JavaScript, Ruby, and C++ extension packs Add an empty data extension pack (/ext) for JavaScript, Ruby and C++, like the Rust one, so that models can be contributed for these languages. Build and publish them in the extensions jobs, add them to the publish summary, make the test packs depend on them, and list them in CONTRIBUTING.md. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4124a708-0b20-41df-a2e2-c945fbf86752 --- .github/scripts/build-publish-summary.sh | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- CONTRIBUTING.md | 8 ++++---- cpp/ext/generated/.gitkeep | 0 cpp/ext/manual/.gitkeep | 0 cpp/ext/qlpack.yml | 16 ++++++++++++++++ cpp/test/qlpack.yml | 1 + javascript/ext/generated/.gitkeep | 0 javascript/ext/manual/.gitkeep | 0 javascript/ext/qlpack.yml | 16 ++++++++++++++++ javascript/test/qlpack.yml | 1 + ruby/ext/generated/.gitkeep | 0 ruby/ext/manual/.gitkeep | 0 ruby/ext/qlpack.yml | 16 ++++++++++++++++ ruby/test/qlpack.yml | 1 + 16 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 cpp/ext/generated/.gitkeep create mode 100644 cpp/ext/manual/.gitkeep create mode 100644 cpp/ext/qlpack.yml create mode 100644 javascript/ext/generated/.gitkeep create mode 100644 javascript/ext/manual/.gitkeep create mode 100644 javascript/ext/qlpack.yml create mode 100644 ruby/ext/generated/.gitkeep create mode 100644 ruby/ext/manual/.gitkeep create mode 100644 ruby/ext/qlpack.yml diff --git a/.github/scripts/build-publish-summary.sh b/.github/scripts/build-publish-summary.sh index 596362d9..fdfe22ac 100755 --- a/.github/scripts/build-publish-summary.sh +++ b/.github/scripts/build-publish-summary.sh @@ -40,7 +40,7 @@ TYPES=(src lib ext ext-library-sources) # have no shared library use cases and should not produce empty placeholder packs. LIB_LANGUAGES=(cpp csharp go java javascript python ruby) # Languages with an `ext` (model/extension) pack - matches the `extensions` job's matrix. -EXT_LANGUAGES=(csharp go java python rust) +EXT_LANGUAGES=(cpp csharp go java javascript python ruby rust) # Languages with an `ext-library-sources` pack - matches the `library_sources_extensions` # job's matrix. This is a strict subset of EXT_LANGUAGES: go/python ship `ext` packs but # have no `ext-library-sources` pack, so they must not be expected to have a result for it. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a44fdc0..1070aac8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,7 +266,7 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'csharp', 'go', 'java', 'python', 'rust' ] + language: [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'rust' ] steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6674908e..21da109e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -211,7 +211,7 @@ jobs: strategy: fail-fast: false matrix: - language: ["csharp", "go", "java", "python", "rust"] + language: ["cpp", "csharp", "go", "java", "javascript", "python", "ruby", "rust"] steps: - uses: actions/checkout@v7 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4757cd0..7dbba506 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,8 +72,8 @@ instead of, or alongside, a query change. 1. **Pick the right pack: `ext` vs `ext-library-sources`** - Every language with data-extension support has a `/ext` pack (`csharp`/`go`/`java`/ - `python`/`rust`). Two of those languages additionally have a second, narrower pack, + Every language with data-extension support has a `/ext` pack (`cpp`/`csharp`/`go`/`java`/ + `javascript`/`python`/`ruby`/`rust`). Two of those languages additionally have a second, narrower pack, `/ext-library-sources` (`csharp`/`java` only). They hold different *kinds* of models, and picking the right one matters: @@ -313,7 +313,7 @@ process for each; most of it is manual today. [`publish.yml`][publish-workflow] is organized as five jobs: four publish jobs, one per pack type (`queries` for `src`, `library` for `lib`, `extensions` for `ext`, `library_sources_extensions` for `ext-library-sources`), each matrixed over every language that has that pack type -(`src` includes Actions, Rust, and Swift; `lib` is only created where there is shared library code; `ext` runs for `csharp`/`go`/`java`/`python`/`rust`; `ext-library-sources` only runs for `csharp`/`java`, the only languages with that pack) - plus a fifth +(`src` includes Actions, Rust, and Swift; `lib` is only created where there is shared library code; `ext` runs for `cpp`/`csharp`/`go`/`java`/`javascript`/`python`/`ruby`/`rust`; `ext-library-sources` only runs for `csharp`/`java`, the only languages with that pack) - plus a fifth `summary` job that runs after the other four (`if: always()`, so it still runs even if one of them fails), aggregates their per-pack results into the publish-summary and CodeQL library/query pack version tables, and (on the release-cut `push` trigger only) upserts both tables into the GitHub @@ -350,7 +350,7 @@ To ship a change: - [ ] Make your change in the pack directory you intend to publish: `/src` (queries), `/lib` (shared library code, only where needed), `/ext` (extensions, - `csharp`/`go`/`java`/`python`/`rust`), + `cpp`/`csharp`/`go`/`java`/`javascript`/`python`/`ruby`/`rust`), or `/ext-library-sources` (extensions, `csharp`/`java` only). See [Adding a data extension](#adding-a-data-extension) above if you're not sure which extensions pack to use. - [ ] Bump `version:` in that pack's `qlpack.yml`, following [semver](https://semver.org/). Only bump diff --git a/cpp/ext/generated/.gitkeep b/cpp/ext/generated/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cpp/ext/manual/.gitkeep b/cpp/ext/manual/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cpp/ext/qlpack.yml b/cpp/ext/qlpack.yml new file mode 100644 index 00000000..8ac80c80 --- /dev/null +++ b/cpp/ext/qlpack.yml @@ -0,0 +1,16 @@ +library: true +name: githubsecuritylab/codeql-cpp-extensions +version: 0.9.0 +# Keep this '*' (unconstrained) - never pin/floor it to a specific +# codeql/cpp-all version. Unlike `dependencies:`, an unsatisfied +# extensionTargets constraint doesn't fail loudly: it silently drops this +# whole extension pack (zero models applied) with only a low-visibility +# "is unused" warning, no CI signal for downstream consumers. See +# GitHubSecurityLab/CodeQL-Community-Packs#206 and CONTRIBUTING.md. +extensionTargets: + codeql/cpp-all: '*' +dataExtensions: + - 'manual/*.yml' + - 'manual/**/*.yml' + - 'generated/*.yml' + - 'generated/**/*.yml' diff --git a/cpp/test/qlpack.yml b/cpp/test/qlpack.yml index 6cc3c837..c96063b0 100644 --- a/cpp/test/qlpack.yml +++ b/cpp/test/qlpack.yml @@ -5,5 +5,6 @@ dependencies: codeql/cpp-queries: '1.10.0' githubsecuritylab/codeql-cpp-queries: '*' githubsecuritylab/codeql-cpp-libs: '*' + githubsecuritylab/codeql-cpp-extensions: '*' extractor: cpp tests: . diff --git a/javascript/ext/generated/.gitkeep b/javascript/ext/generated/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/javascript/ext/manual/.gitkeep b/javascript/ext/manual/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/javascript/ext/qlpack.yml b/javascript/ext/qlpack.yml new file mode 100644 index 00000000..85ff2566 --- /dev/null +++ b/javascript/ext/qlpack.yml @@ -0,0 +1,16 @@ +library: true +name: githubsecuritylab/codeql-javascript-extensions +version: 0.9.0 +# Keep this '*' (unconstrained) - never pin/floor it to a specific +# codeql/javascript-all version. Unlike `dependencies:`, an unsatisfied +# extensionTargets constraint doesn't fail loudly: it silently drops this +# whole extension pack (zero models applied) with only a low-visibility +# "is unused" warning, no CI signal for downstream consumers. See +# GitHubSecurityLab/CodeQL-Community-Packs#206 and CONTRIBUTING.md. +extensionTargets: + codeql/javascript-all: '*' +dataExtensions: + - 'manual/*.yml' + - 'manual/**/*.yml' + - 'generated/*.yml' + - 'generated/**/*.yml' diff --git a/javascript/test/qlpack.yml b/javascript/test/qlpack.yml index 65260b02..9f2b1c9c 100644 --- a/javascript/test/qlpack.yml +++ b/javascript/test/qlpack.yml @@ -3,6 +3,7 @@ groups: [javascript, test] dependencies: codeql/javascript-all: "3.0.0" githubsecuritylab/codeql-javascript-queries: "*" + githubsecuritylab/codeql-javascript-extensions: "*" extractor: javascript tests: . diff --git a/ruby/ext/generated/.gitkeep b/ruby/ext/generated/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/ruby/ext/manual/.gitkeep b/ruby/ext/manual/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/ruby/ext/qlpack.yml b/ruby/ext/qlpack.yml new file mode 100644 index 00000000..018c03e7 --- /dev/null +++ b/ruby/ext/qlpack.yml @@ -0,0 +1,16 @@ +library: true +name: githubsecuritylab/codeql-ruby-extensions +version: 0.9.0 +# Keep this '*' (unconstrained) - never pin/floor it to a specific +# codeql/ruby-all version. Unlike `dependencies:`, an unsatisfied +# extensionTargets constraint doesn't fail loudly: it silently drops this +# whole extension pack (zero models applied) with only a low-visibility +# "is unused" warning, no CI signal for downstream consumers. See +# GitHubSecurityLab/CodeQL-Community-Packs#206 and CONTRIBUTING.md. +extensionTargets: + codeql/ruby-all: '*' +dataExtensions: + - 'manual/*.yml' + - 'manual/**/*.yml' + - 'generated/*.yml' + - 'generated/**/*.yml' diff --git a/ruby/test/qlpack.yml b/ruby/test/qlpack.yml index 8da32d83..d5d6a84a 100644 --- a/ruby/test/qlpack.yml +++ b/ruby/test/qlpack.yml @@ -5,5 +5,6 @@ dependencies: codeql/ruby-queries: '1.7.0' githubsecuritylab/codeql-ruby-queries: '*' githubsecuritylab/codeql-ruby-libs: '*' + githubsecuritylab/codeql-ruby-extensions: '*' extractor: ruby tests: .