Skip to content

Commit 6bea7f8

Browse files
committed
Merge branch 'main' into sqlpathinject2
2 parents 0f1711f + e124a70 commit 6bea7f8

File tree

741 files changed

+32729
-8301
lines changed

Some content is hidden

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

741 files changed

+32729
-8301
lines changed

.github/workflows/csharp-qltest.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
slice: ["1/2", "2/2"]
5454
steps:
5555
- uses: actions/checkout@v4
56-
- uses: ./.github/actions/fetch-codeql
5756
- uses: ./csharp/actions/create-extractor-pack
5857
- name: Cache compilation cache
5958
id: query-cache
@@ -62,16 +61,14 @@ jobs:
6261
key: csharp-qltest-${{ matrix.slice }}
6362
- name: Run QL tests
6463
run: |
65-
CODEQL_PATH=$(gh codeql version --format=json | jq -r .unpackedLocation)
66-
# The legacy ASP extractor is not in this repo, so take the one from the nightly build
67-
mv "$CODEQL_PATH/csharp/tools/extractor-asp.jar" "${{ github.workspace }}/csharp/extractor-pack/tools"
68-
# Safe guard against using the bundled extractor
69-
rm -rf "$CODEQL_PATH/csharp"
70-
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}/csharp/extractor-pack" --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 }}"
64+
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path extractor-pack --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 }}"
7165
env:
7266
GITHUB_TOKEN: ${{ github.token }}
7367
unit-tests:
74-
runs-on: ubuntu-latest
68+
strategy:
69+
matrix:
70+
os: [ubuntu-latest, windows-2019]
71+
runs-on: ${{ matrix.os }}
7572
steps:
7673
- uses: actions/checkout@v4
7774
- name: Setup dotnet
@@ -80,7 +77,25 @@ jobs:
8077
dotnet-version: 7.0.102
8178
- name: Extractor unit tests
8279
run: |
83-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/extractor/Semmle.Util.Tests"
84-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/extractor/Semmle.Extraction.Tests"
85-
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests"
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
8683
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
84+
shell: bash
85+
stubgentest:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
- uses: ./csharp/actions/create-extractor-pack
90+
- name: Run stub generator tests
91+
run: |
92+
# Generate (Asp)NetCore stubs
93+
STUBS_PATH=stubs_output
94+
python3 ql/src/Stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger latest "$STUBS_PATH"
95+
rm -rf ql/test/resources/stubs/_frameworks
96+
# Update existing stubs in the repo with the freshly generated ones
97+
mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/
98+
git status
99+
codeql test run --threads=0 --search-path extractor-pack --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries -- ql/test/library-tests/dataflow/flowsources/aspremote
100+
env:
101+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/js-ml-tests.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

cpp/ql/lib/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 0.9.3
2+
3+
No user-facing changes.
4+
5+
## 0.9.2
6+
7+
### Deprecated APIs
8+
9+
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
10+
11+
### New Features
12+
13+
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
14+
15+
### Minor Analysis Improvements
16+
17+
* `delete` and `delete[]` are now modeled as calls to the relevant `operator delete` in the IR. In the case of a dynamic delete call a new instruction `VirtualDeleteFunctionAddress` is used to represent a function that dispatches to the correct delete implementation.
18+
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.
19+
120
## 0.9.1
221

322
No user-facing changes.

cpp/ql/lib/change-notes/2023-08-24-no-taint-argv-indirections.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-08-25-delete-or-delete-array.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-08-25-getAllocatorCall-deprecated.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

cpp/ql/lib/change-notes/2023-08-29-delete-ir.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## 0.9.2
2+
3+
### Deprecated APIs
4+
5+
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
6+
7+
### New Features
8+
9+
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
10+
11+
### Minor Analysis Improvements
12+
13+
* `delete` and `delete[]` are now modeled as calls to the relevant `operator delete` in the IR. In the case of a dynamic delete call a new instruction `VirtualDeleteFunctionAddress` is used to represent a function that dispatches to the correct delete implementation.
14+
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.9.3
2+
3+
No user-facing changes.

cpp/ql/lib/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.9.1
2+
lastReleaseVersion: 0.9.3

0 commit comments

Comments
 (0)