Skip to content

Commit 14ce258

Browse files
author
Dilan Bhalla
committed
2.19.0 upgrade
1 parent 8fd8982 commit 14ce258

File tree

3,013 files changed

+130135
-77783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,013 files changed

+130135
-77783
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.1
1+
5f5d70b6c4d2fb1a889479569107f1692239e8a7

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Ruby:
3030
- ruby/**/*
3131
- change-notes/**/*ruby*
3232

33+
Rust:
34+
- rust/**/*
35+
- change-notes/**/*rust*
36+
3337
Swift:
3438
- swift/**/*
3539
- change-notes/**/*swift*

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Pull Request checklist
2+
3+
#### All query authors
4+
5+
- [ ] A change note is added if necessary. See [the documentation](https://github.com/github/codeql/blob/main/docs/change-notes.md) in this repository.
6+
- [ ] All new queries have appropriate `.qhelp`. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md) in this repository.
7+
- [ ] QL tests are added if necessary. See [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) in the GitHub documentation.
8+
- [ ] New and changed queries have correct query metadata. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in this repository.
9+
10+
#### Internal query authors only
11+
12+
- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to `.ql`, `.qll`, or `.qhelp` files. See [the documentation](https://github.com/github/codeql-team/blob/main/docs/best-practices/validating-autofix-for-query-changes.md) (internal access required).
13+
- [ ] Changes are validated [at scale](https://github.com/github/codeql-dca/) (internal access required).
14+
- [ ] Adding a new query? Consider also [adding the query to autofix](https://github.com/github/codeml-autofix/blob/main/docs/updating-query-support.md#adding-a-new-query-to-the-query-suite).

.github/workflows/buildifier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
extra_args: >
2525
buildifier --all-files 2>&1 ||
2626
(
27-
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel:buildifier"; exit 1
27+
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel/buildifier"; exit 1
2828
)

.github/workflows/check-change-note.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ on:
1616
- "shared/**/*.qll"
1717
- "!**/experimental/**"
1818
- "!ql/**"
19+
- "!rust/**"
1920
- ".github/workflows/check-change-note.yml"
2021

2122
jobs:
2223
check-change-note:
23-
env:
24+
env:
2425
REPO: ${{ github.repository }}
2526
PULL_REQUEST_NUMBER: ${{ github.event.number }}
2627
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -33,7 +34,7 @@ jobs:
3334
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
3435
run: |
3536
change_note_files=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '.[].filename | select(test("/change-notes/.*[.]md$"))')
36-
37+
3738
if [ -z "$change_note_files" ]; then
3839
echo "No change note found. Either add one, or add the 'no-change-note-required' label."
3940
exit 1

.github/workflows/cpp-swift-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
languages: cpp
3939
config-file: ./.github/codeql/codeql-config.yml
40-
40+
4141
- name: "[Ubuntu] Remove GCC 13 from runner image"
4242
shell: bash
4343
run: |
@@ -48,7 +48,7 @@ jobs:
4848
- name: "Build Swift extractor using Bazel"
4949
run: |
5050
bazel clean --expunge
51-
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local --features=-layering_check
51+
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local
5252
bazel shutdown
5353
5454
- name: Perform CodeQL Analysis

.github/workflows/csharp-qltest.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,6 @@ permissions:
2929
contents: read
3030

3131
jobs:
32-
qlupgrade:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v4
36-
- uses: ./.github/actions/fetch-codeql
37-
- name: Check DB upgrade scripts
38-
run: |
39-
echo >empty.trap
40-
codeql dataset import -S ql/lib/upgrades/initial/semmlecode.csharp.dbscheme testdb empty.trap
41-
codeql dataset upgrade testdb --additional-packs ql/lib
42-
diff -q testdb/semmlecode.csharp.dbscheme ql/lib/semmlecode.csharp.dbscheme
43-
- name: Check DB downgrade scripts
44-
run: |
45-
echo >empty.trap
46-
rm -rf testdb; codeql dataset import -S ql/lib/semmlecode.csharp.dbscheme testdb empty.trap
47-
codeql resolve upgrades --format=lines --allow-downgrades --additional-packs downgrades \
48-
--dbscheme=ql/lib/semmlecode.csharp.dbscheme --target-dbscheme=downgrades/initial/semmlecode.csharp.dbscheme |
49-
xargs codeql execute upgrades testdb
50-
diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme
51-
qltest:
52-
if: github.repository_owner == 'github'
53-
runs-on: ubuntu-latest-xl
54-
strategy:
55-
fail-fast: false
56-
matrix:
57-
slice: ["1/2", "2/2"]
58-
steps:
59-
- uses: actions/checkout@v4
60-
- uses: ./csharp/actions/create-extractor-pack
61-
- name: Cache compilation cache
62-
id: query-cache
63-
uses: ./.github/actions/cache-query-compilation
64-
with:
65-
key: csharp-qltest-${{ matrix.slice }}
66-
- name: Run QL tests
67-
run: |
68-
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
69-
env:
70-
GITHUB_TOKEN: ${{ github.token }}
7132
unit-tests:
7233
strategy:
7334
matrix:

.github/workflows/ruby-build.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
id: cache-extractor
6666
with:
6767
path: |
68-
ruby/extractor/target/release/codeql-extractor-ruby
69-
ruby/extractor/target/release/codeql-extractor-ruby.exe
68+
target/release/codeql-extractor-ruby
69+
target/release/codeql-extractor-ruby.exe
7070
ruby/extractor/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
7171
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-extractor-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/Cargo.lock') }}-${{ hashFiles('shared/tree-sitter-extractor') }}-${{ hashFiles('ruby/extractor/**/*.rs') }}
7272
- uses: actions/cache@v3
@@ -75,7 +75,7 @@ jobs:
7575
path: |
7676
~/.cargo/registry
7777
~/.cargo/git
78-
ruby/target
78+
target
7979
key: ${{ runner.os }}-${{ steps.os_version.outputs.version }}-ruby-rust-cargo-${{ hashFiles('ruby/extractor/rust-toolchain.toml', 'ruby/extractor/**/Cargo.lock') }}
8080
- name: Check formatting
8181
if: steps.cache-extractor.outputs.cache-hit != 'true'
@@ -91,7 +91,7 @@ jobs:
9191
run: cd extractor && cargo build --release
9292
- name: Generate dbscheme
9393
if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}}
94-
run: extractor/target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
94+
run: ../target/release/codeql-extractor-ruby generate --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
9595
- uses: actions/upload-artifact@v3
9696
if: ${{ matrix.os == 'ubuntu-latest' }}
9797
with:
@@ -106,8 +106,8 @@ jobs:
106106
with:
107107
name: extractor-${{ matrix.os }}
108108
path: |
109-
ruby/extractor/target/release/codeql-extractor-ruby
110-
ruby/extractor/target/release/codeql-extractor-ruby.exe
109+
target/release/codeql-extractor-ruby
110+
target/release/codeql-extractor-ruby.exe
111111
retention-days: 1
112112
compile-queries:
113113
if: github.repository_owner == 'github'
@@ -140,6 +140,7 @@ jobs:
140140
path: |
141141
${{ runner.temp }}/query-packs/*
142142
retention-days: 1
143+
include-hidden-files: true
143144

144145
package:
145146
runs-on: ubuntu-latest
@@ -176,6 +177,7 @@ jobs:
176177
name: codeql-ruby-pack
177178
path: ruby/codeql-ruby.zip
178179
retention-days: 1
180+
include-hidden-files: true
179181
- uses: actions/download-artifact@v3
180182
with:
181183
name: codeql-ruby-queries
@@ -193,6 +195,7 @@ jobs:
193195
name: codeql-ruby-bundle
194196
path: ruby/codeql-ruby-bundle.zip
195197
retention-days: 1
198+
include-hidden-files: true
196199

197200
test:
198201
defaults:

.github/workflows/rust.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Rust"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "rust/**"
7+
- "misc/bazel/**"
8+
- "misc/codegen/**"
9+
- "shared/**"
10+
- "MODULE.bazel"
11+
- .github/workflows/rust.yml
12+
- .github/actions/**
13+
- codeql-workspace.yml
14+
- "!**/*.md"
15+
- "!**/*.qhelp"
16+
branches:
17+
- rust-experiment
18+
- main
19+
- rc/*
20+
- codeql-cli-*
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
rust-code:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Format
32+
working-directory: rust/extractor
33+
shell: bash
34+
run: |
35+
cargo fmt --check
36+
- name: Compilation
37+
working-directory: rust/extractor
38+
shell: bash
39+
run: cargo check
40+
- name: Clippy
41+
working-directory: rust/extractor
42+
shell: bash
43+
run: |
44+
cargo clippy --fix
45+
git diff --exit-code
46+
rust-codegen:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
- name: Install CodeQL
52+
uses: ./.github/actions/fetch-codeql
53+
- name: Code generation
54+
shell: bash
55+
run: |
56+
bazel run //rust/codegen
57+
git add .
58+
git diff --exit-code HEAD

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
.cache
88

99
# qltest projects and artifacts
10+
*.actual
1011
*/ql/test/**/*.testproj
11-
*/ql/test/**/*.actual
1212
*/ql/test/**/go.sum
1313

1414
# Visual studio temporaries, except a file used by QL4VS
@@ -65,3 +65,9 @@ node_modules/
6565

6666
# bazel-built in-tree extractor packs
6767
/*/extractor-pack
68+
69+
# Jetbrains IDE files
70+
.idea
71+
72+
# cargo build directory
73+
/target

0 commit comments

Comments
 (0)