Skip to content

Commit 376c6ea

Browse files
authored
Merge branch 'main' into amammad-go-bombs
2 parents 4c769f2 + 339c890 commit 376c6ea

File tree

3,650 files changed

+438202
-143428
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,650 files changed

+438202
-143428
lines changed

.clang-format

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

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ go/extractor/opencsv/CSVReader.java -text
7171
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
7272
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
7373
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
74+
75+
# Auto-generated modeling for Python
76+
python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ on:
55
schedule:
66
- cron: "30 1 * * *"
77

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

1215
runs-on: ubuntu-latest
1316

1417
steps:
15-
- uses: actions/stale@v8
18+
- uses: actions/stale@v9
1619
with:
1720
repo-token: ${{ secrets.GITHUB_TOKEN }}
1821
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'

.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: 7.0.102
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: 7.0.102
81+
dotnet-version: 8.0.101
7882
- name: Extractor unit tests
7983
run: |
80-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Util.Tests
81-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests
82-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests
83-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ 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: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@ 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
1519
runs-on: macos-latest
1620
steps:
1721
- name: Set up Go ${{ env.GO_VERSION }}
18-
uses: actions/setup-go@v4
22+
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 }}
53-
uses: actions/setup-go@v4
59+
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: 9 additions & 2 deletions
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 }}
26-
uses: actions/setup-go@v4
32+
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_modelDiff.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- main
1313
paths:
1414
- "java/ql/src/utils/modelgenerator/**/*.*"
15+
- "misc/scripts/models-as-data/*.*"
1516
- ".github/workflows/mad_modelDiff.yml"
1617

1718
permissions:
@@ -61,8 +62,9 @@ jobs:
6162
DATABASE=$2
6263
cd codeql-$QL_VARIANT
6364
SHORTNAME=`basename $DATABASE`
64-
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml
65-
mv java/ql/lib/ext/generated/${SHORTNAME}.temp.model.yml $MODELS/${SHORTNAME}Generated_${QL_VARIANT}.model.yml
65+
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE $SHORTNAME/$QL_VARIANT
66+
mkdir -p $MODELS/$SHORTNAME
67+
mv java/ql/lib/ext/generated/$SHORTNAME/$QL_VARIANT $MODELS/$SHORTNAME
6668
cd ..
6769
}
6870
@@ -85,16 +87,16 @@ jobs:
8587
set -x
8688
MODELS=`pwd`/tmp-models
8789
ls -1 tmp-models/
88-
for m in $MODELS/*_main.model.yml ; do
90+
for m in $MODELS/*/main/*.model.yml ; do
8991
t="${m/main/"pr"}"
9092
basename=`basename $m`
91-
name="diff_${basename/_main.model.yml/""}"
93+
name="diff_${basename/.model.yml/""}"
9294
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
9395
done
9496
- uses: actions/upload-artifact@v3
9597
with:
9698
name: models
97-
path: tmp-models/*.model.yml
99+
path: tmp-models/**/**/*.model.yml
98100
retention-days: 20
99101
- uses: actions/upload-artifact@v3
100102
with:

.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

0 commit comments

Comments
 (0)