Skip to content

Commit 225a9fe

Browse files
committed
Merge branch 'main' into implicitflow
2 parents 0e1da37 + fe2468e commit 225a9fe

File tree

1,377 files changed

+69860
-12498
lines changed

Some content is hidden

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

1,377 files changed

+69860
-12498
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ updates:
1717
ignore:
1818
- dependency-name: '*'
1919
update-types: ['version-update:semver-patch', 'version-update:semver-minor']
20+
21+
- package-ecosystem: "gomod"
22+
directory: "go/extractor"
23+
schedule:
24+
interval: "daily"
25+
reviewers:
26+
- "github/codeql-go"

.github/workflows/compile-queries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
# run with --check-only if running in a PR (github.sha != main)
3030
if : ${{ github.event_name == 'pull_request' }}
3131
shell: bash
32-
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
32+
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500
3333
- name: compile queries - full
3434
# do full compile if running on main - this populates the cache
3535
if : ${{ github.event_name != 'pull_request' }}
3636
shell: bash
37-
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
37+
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500

.github/workflows/csharp-qltest.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ jobs:
6565
env:
6666
GITHUB_TOKEN: ${{ github.token }}
6767
unit-tests:
68-
runs-on: ubuntu-latest
68+
strategy:
69+
matrix:
70+
os: [ubuntu-latest, windows-2019]
71+
runs-on: ${{ matrix.os }}
6972
steps:
7073
- uses: actions/checkout@v4
7174
- name: Setup dotnet
@@ -78,6 +81,7 @@ jobs:
7881
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests
7982
dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests
8083
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
84+
shell: bash
8185
stubgentest:
8286
runs-on: ubuntu-latest
8387
steps:
@@ -87,7 +91,7 @@ jobs:
8791
run: |
8892
# Generate (Asp)NetCore stubs
8993
STUBS_PATH=stubs_output
90-
python3 ql/src/Stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger latest "$STUBS_PATH"
94+
python3 ql/src/Stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger 6.5.0 "$STUBS_PATH"
9195
rm -rf ql/test/resources/stubs/_frameworks
9296
# Update existing stubs in the repo with the freshly generated ones
9397
mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/

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

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

config/identical-files.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -498,22 +498,6 @@
498498
"ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModelsExtensions.qll",
499499
"python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsExtensions.qll"
500500
],
501-
"TaintedFormatStringQuery Ruby/JS": [
502-
"javascript/ql/lib/semmle/javascript/security/dataflow/TaintedFormatStringQuery.qll",
503-
"ruby/ql/lib/codeql/ruby/security/TaintedFormatStringQuery.qll"
504-
],
505-
"TaintedFormatStringCustomizations Ruby/JS": [
506-
"javascript/ql/lib/semmle/javascript/security/dataflow/TaintedFormatStringCustomizations.qll",
507-
"ruby/ql/lib/codeql/ruby/security/TaintedFormatStringCustomizations.qll"
508-
],
509-
"HttpToFileAccessQuery JS/Ruby": [
510-
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessQuery.qll",
511-
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessQuery.qll"
512-
],
513-
"HttpToFileAccessCustomizations JS/Ruby": [
514-
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessCustomizations.qll",
515-
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessCustomizations.qll"
516-
],
517501
"Typo database": [
518502
"javascript/ql/src/Expressions/TypoDatabase.qll",
519503
"ql/ql/src/codeql_ql/style/TypoDatabase.qll"

cpp/BUILD.bazel

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
package(default_visibility = ["//visibility:public"])
2-
31
load("@rules_pkg//:mappings.bzl", "pkg_filegroup")
42

3+
package(default_visibility = ["//visibility:public"])
4+
55
alias(
66
name = "dbscheme",
77
actual = "//cpp/ql/lib:dbscheme",
88
)
99

10+
alias(
11+
name = "dbscheme-stats",
12+
actual = "//cpp/ql/lib:dbscheme-stats",
13+
)
14+
1015
pkg_filegroup(
1116
name = "db-files",
1217
srcs = [

cpp/ql/lib/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package(default_visibility = ["//cpp:__pkg__"])
2-
31
load("@rules_pkg//:mappings.bzl", "pkg_files")
42

3+
package(default_visibility = ["//cpp:__pkg__"])
4+
55
pkg_files(
66
name = "dbscheme",
77
srcs = ["semmlecode.cpp.dbscheme"],

cpp/ql/lib/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## 0.10.0
2+
3+
### Minor Analysis Improvements
4+
5+
* Functions that do not return due to calling functions that don't return (e.g. `exit`) are now detected as
6+
non-returning in the IR and dataflow.
7+
* Treat functions that reach the end of the function as returning in the IR.
8+
They used to be treated as unreachable but it is allowed in C.
9+
* The `DataFlow::asDefiningArgument` predicate now takes its argument from the range starting at `1` instead of `2`. Queries that depend on the single-parameter version of `DataFlow::asDefiningArgument` should have their arguments updated accordingly.
10+
11+
## 0.9.3
12+
13+
No user-facing changes.
14+
15+
## 0.9.2
16+
17+
### Deprecated APIs
18+
19+
* `getAllocatorCall` on `DeleteExpr` and `DeleteArrayExpr` has been deprecated. `getDeallocatorCall` should be used instead.
20+
21+
### New Features
22+
23+
* Added `DeleteOrDeleteArrayExpr` as a super type of `DeleteExpr` and `DeleteArrayExpr`
24+
25+
### Minor Analysis Improvements
26+
27+
* `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.
28+
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`.
29+
130
## 0.9.1
231

332
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.

0 commit comments

Comments
 (0)