Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/build-publish-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<language>/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 `<language>/ext` pack (`cpp`/`csharp`/`go`/`java`/
`javascript`/`python`/`ruby`/`rust`). Two of those languages additionally have a second, narrower pack,
`<language>/ext-library-sources` (`csharp`/`java` only). They hold different *kinds* of models,
and picking the right one matters:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -350,7 +350,7 @@ To ship a change:

- [ ] Make your change in the pack directory you intend to publish: `<language>/src` (queries),
`<language>/lib` (shared library code, only where needed), `<language>/ext` (extensions,
`csharp`/`go`/`java`/`python`/`rust`),
`cpp`/`csharp`/`go`/`java`/`javascript`/`python`/`ruby`/`rust`),
or `<language>/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
Expand Down
Empty file added cpp/ext/generated/.gitkeep
Empty file.
Empty file added cpp/ext/manual/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions cpp/ext/qlpack.yml
Original file line number Diff line number Diff line change
@@ -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'
1 change: 1 addition & 0 deletions cpp/test/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Empty file.
Empty file added javascript/ext/manual/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions javascript/ext/qlpack.yml
Original file line number Diff line number Diff line change
@@ -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'
1 change: 1 addition & 0 deletions javascript/test/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Empty file added ruby/ext/generated/.gitkeep
Empty file.
Empty file added ruby/ext/manual/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions ruby/ext/qlpack.yml
Original file line number Diff line number Diff line change
@@ -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'
1 change: 1 addition & 0 deletions ruby/test/qlpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Loading