Skip to content

Commit 0722303

Browse files
authored
Merge branch 'main' into lgtm_index_filter_handling
2 parents f20d4e2 + 2683e40 commit 0722303

File tree

2,080 files changed

+133252
-61382
lines changed

Some content is hidden

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

2,080 files changed

+133252
-61382
lines changed

.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
common --enable_platform_specific_config
2+
common --enable_bzlmod
3+
# because we use --override_module with `%workspace%`, the lock file is not stable
4+
common --lockfile_mode=off
5+
6+
# when building from this repository in isolation, the internal repository will not be found at ..
7+
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
8+
# that we can build things that do not rely on that
9+
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
210

311
build --repo_env=CC=clang --repo_env=CXX=clang++
412

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.1
1+
7.0.2

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DisableFormat: true

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check change note
22

3+
permissions:
4+
pull-requests: read
5+
36
on:
47
pull_request_target:
58
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]

.github/workflows/check-implicit-this.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
- "rc/*"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
check:
1417
runs-on: ubuntu-latest

.github/workflows/check-qldoc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
- "rc/*"
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
qldoc:
1518
runs-on: ubuntu-latest

.github/workflows/check-query-ids.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- "rc/*"
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
check:
1619
name: Check query IDs

.github/workflows/close-stale.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: "30 1 * * *"
77

8+
permissions:
9+
issues: write
10+
811
jobs:
912
stale:
1013
if: github.repository == 'github/codeql'

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup dotnet
3131
uses: actions/setup-dotnet@v4
3232
with:
33-
dotnet-version: 8.0.100
33+
dotnet-version: 8.0.101
3434

3535
- name: Checkout repository
3636
uses: actions/checkout@v4

.github/workflows/compile-queries.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ on:
88
- "codeql-cli-*"
99
pull_request:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
compile-queries:
16+
if: github.repository_owner == 'github'
1317
runs-on: ubuntu-latest-xl
1418

1519
steps:

.github/workflows/csharp-qltest.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ defaults:
2525
run:
2626
working-directory: csharp
2727

28+
permissions:
29+
contents: read
30+
2831
jobs:
2932
qlupgrade:
3033
runs-on: ubuntu-latest
@@ -46,6 +49,7 @@ jobs:
4649
xargs codeql execute upgrades testdb
4750
diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme
4851
qltest:
52+
if: github.repository_owner == 'github'
4953
runs-on: ubuntu-latest-xl
5054
strategy:
5155
fail-fast: false
@@ -74,13 +78,13 @@ jobs:
7478
- name: Setup dotnet
7579
uses: actions/setup-dotnet@v4
7680
with:
77-
dotnet-version: 8.0.100
81+
dotnet-version: 8.0.101
7882
- name: Extractor unit tests
7983
run: |
80-
dotnet test -p:RuntimeFrameworkVersion=8.0.0 extractor/Semmle.Util.Tests
81-
dotnet test -p:RuntimeFrameworkVersion=8.0.0 extractor/Semmle.Extraction.Tests
82-
dotnet test -p:RuntimeFrameworkVersion=8.0.0 autobuilder/Semmle.Autobuild.CSharp.Tests
83-
dotnet test -p:RuntimeFrameworkVersion=8.0.0 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
84+
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Util.Tests
85+
dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests
86+
dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests
87+
dotnet test -p:RuntimeFrameworkVersion=8.0.1 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
8488
shell: bash
8589
stubgentest:
8690
runs-on: ubuntu-latest

.github/workflows/csv-coverage-metrics.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
- ".github/workflows/csv-coverage-metrics.yml"
1515
- ".github/actions/fetch-codeql/action.yml"
1616

17+
permissions:
18+
contents: read
19+
security-events: write
20+
1721
jobs:
1822
publish-java:
1923
runs-on: ubuntu-latest

.github/workflows/csv-coverage-pr-artifacts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- main
2020
- "rc/*"
2121

22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
2226
jobs:
2327
generate:
2428
name: Generate framework coverage artifacts

.github/workflows/csv-coverage-pr-comment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
913
jobs:
1014
check:
1115
name: Check framework coverage differences and comment

.github/workflows/csv-coverage-timeseries.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Build framework coverage timeseries reports
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest

.github/workflows/csv-coverage-update.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: "0 0 * * *"
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
812
jobs:
913
update:
1014
name: Update framework coverage report

.github/workflows/csv-coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
description: "github/codeql repo SHA used for looking up the CSV models"
88
required: false
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215
runs-on: ubuntu-latest

.github/workflows/fast-forward.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ name: Fast-forward tracking branch for selected CodeQL version
77
on:
88
workflow_dispatch:
99

10+
permissions:
11+
contents: write
12+
1013
jobs:
1114
fast-forward:
1215
name: Fast-forward tracking branch for selected CodeQL version
1316
runs-on: ubuntu-latest
1417
if: github.repository == 'github/codeql'
15-
permissions:
16-
contents: write
1718
env:
1819
BRANCH_NAME: 'lgtm.com'
1920
steps:

.github/workflows/go-tests-other-os.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ on:
88
- .github/actions/**
99
- codeql-workspace.yml
1010
env:
11-
GO_VERSION: '~1.21.0'
11+
GO_VERSION: '~1.22.0'
12+
13+
permissions:
14+
contents: read
15+
1216
jobs:
1317
test-mac:
1418
name: Test MacOS
@@ -18,6 +22,7 @@ jobs:
1822
uses: actions/setup-go@v5
1923
with:
2024
go-version: ${{ env.GO_VERSION }}
25+
cache: false
2126
id: go
2227

2328
- name: Check out code
@@ -46,13 +51,15 @@ jobs:
4651
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
4752
4853
test-win:
54+
if: github.repository_owner == 'github'
4955
name: Test Windows
5056
runs-on: windows-latest-xl
5157
steps:
5258
- name: Set up Go ${{ env.GO_VERSION }}
5359
uses: actions/setup-go@v5
5460
with:
5561
go-version: ${{ env.GO_VERSION }}
62+
cache: false
5663
id: go
5764

5865
- name: Check out code

.github/workflows/go-tests.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,24 @@ on:
1515
- .github/workflows/go-tests.yml
1616
- .github/actions/**
1717
- codeql-workspace.yml
18+
1819
env:
19-
GO_VERSION: '~1.21.0'
20+
GO_VERSION: '~1.22.0'
21+
22+
permissions:
23+
contents: read
24+
2025
jobs:
2126
test-linux:
27+
if: github.repository_owner == 'github'
2228
name: Test Linux (Ubuntu)
2329
runs-on: ubuntu-latest-xl
2430
steps:
2531
- name: Set up Go ${{ env.GO_VERSION }}
2632
uses: actions/setup-go@v5
2733
with:
2834
go-version: ${{ env.GO_VERSION }}
35+
cache: false
2936
id: go
3037

3138
- name: Check out code

.github/workflows/labeler.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ name: "Pull Request Labeler"
22
on:
33
- pull_request_target
44

5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
59
jobs:
610
triage:
7-
permissions:
8-
contents: read
9-
pull-requests: write
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/labeler@v4

.github/workflows/mad_regenerate-models.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- ".github/workflows/mad_regenerate-models.yml"
1212
- ".github/actions/fetch-codeql/action.yml"
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
regenerate-models:
1619
runs-on: ubuntu-latest

.github/workflows/qhelp-pr-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
done < "${RUNNER_TEMP}/paths.txt" >> comment_body.txt
7878
exit "${EXIT_CODE}"
7979
80-
- if: always()
80+
- if: ${{ !cancelled() }}
8181
uses: actions/upload-artifact@v3
8282
with:
8383
name: comment

.github/workflows/ql-for-ql-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
env:
1010
CARGO_TERM_COLOR: always
1111

12+
permissions:
13+
contents: read
14+
security-events: write
15+
1216
jobs:
1317
analyze:
18+
if: github.repository_owner == 'github'
1419
runs-on: ubuntu-latest-xl
1520
steps:
1621
### Build the queries ###
@@ -19,7 +24,7 @@ jobs:
1924
fetch-depth: 0
2025
- name: Find codeql
2126
id: find-codeql
22-
uses: github/codeql-action/init@v2
27+
uses: github/codeql-action/init@main
2328
with:
2429
languages: javascript # does not matter
2530
- uses: ./.github/actions/os-version
@@ -65,7 +70,7 @@ jobs:
6570
exclude:*/ql/lib/upgrades/
6671
exclude:java/ql/integration-tests
6772
- name: Upload sarif to code-scanning
68-
uses: github/codeql-action/upload-sarif@v2
73+
uses: github/codeql-action/upload-sarif@main
6974
with:
7075
sarif_file: ql-for-ql.sarif
7176
category: ql-for-ql

.github/workflows/ql-for-ql-dataset_measure.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- ql/ql/src/ql.dbscheme
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
security-events: read
17+
1418
jobs:
1519
measure:
1620
env:
@@ -25,7 +29,7 @@ jobs:
2529

2630
- name: Find codeql
2731
id: find-codeql
28-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@main
2933
with:
3034
languages: javascript # does not matter
3135
- uses: ./.github/actions/os-version

.github/workflows/ql-for-ql-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ on:
1717
env:
1818
CARGO_TERM_COLOR: always
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
qltest:
2225
runs-on: ubuntu-latest
2326
steps:
2427
- uses: actions/checkout@v4
2528
- name: Find codeql
2629
id: find-codeql
27-
uses: github/codeql-action/init@v2
30+
uses: github/codeql-action/init@main
2831
with:
2932
languages: javascript # does not matter
3033
- uses: ./.github/actions/os-version
@@ -69,7 +72,7 @@ jobs:
6972
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
7073
- name: Find codeql
7174
id: find-codeql
72-
uses: github/codeql-action/init@v2
75+
uses: github/codeql-action/init@main
7376
with:
7477
languages: javascript # does not matter
7578
- uses: ./.github/actions/os-version

.github/workflows/query-list.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- '.github/actions/fetch-codeql/action.yml'
1414
- 'misc/scripts/generate-code-scanning-query-list.py'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821

0 commit comments

Comments
 (0)