Skip to content

Commit ba844aa

Browse files
committed
Merge branch 'main' into exportObj
2 parents 9050f99 + 4874256 commit ba844aa

File tree

738 files changed

+39244
-10382
lines changed

Some content is hidden

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

738 files changed

+39244
-10382
lines changed

.codeqlmanifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"misc/legacy-support/*/qlpack.yml",
1616
"misc/suite-helpers/qlpack.yml",
1717
"ruby/extractor-pack/codeql-extractor.yml",
18+
"swift/extractor-pack/codeql-extractor.yml",
1819
"ql/extractor-pack/codeql-extractor.yml"
1920
],
2021
"versionPolicies": {

.devcontainer/devcontainer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"rust-lang.rust",
44
"bungcip.better-toml",
55
"github.vscode-codeql",
6+
"hbenl.vscode-test-explorer",
7+
"ms-vscode.test-adapter-converter",
68
"slevesque.vscode-zipexplorer"
79
],
810
"settings": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
path: stats
7878
- run: |
7979
python -m pip install --user lxml
80-
find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ql/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
80+
find stats -name 'stats.xml' -print0 | sort -z | xargs -0 python ruby/scripts/merge_stats.py --output ql/ql/src/ql.dbscheme.stats --normalise ql_tokeninfo
8181
- uses: actions/upload-artifact@v3
8282
with:
8383
name: ql.dbscheme.stats

.github/workflows/swift-codegen.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ jobs:
1818
- name: Run unit tests
1919
run: |
2020
bazel test //swift/codegen/test --test_output=errors
21-
- name: Check that code was generated
21+
- name: Check that QL generated code was checked in
2222
run: |
2323
bazel run //swift/codegen
2424
git add swift
2525
git diff --exit-code --stat HEAD
26+
- name: Generate C++ files
27+
run: |
28+
bazel run //swift/codegen:cppcodegen -- --cpp-output=$PWD/swift-generated-headers
29+
- uses: actions/upload-artifact@v3
30+
with:
31+
name: swift-generated-headers
32+
path: swift-generated-headers/*.h

config/identical-files.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,23 @@
475475
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
476476
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll"
477477
],
478-
"ReDoS Util Python/JS/Ruby": [
478+
"ReDoS Util Python/JS/Ruby/Java": [
479479
"javascript/ql/lib/semmle/javascript/security/performance/ReDoSUtil.qll",
480480
"python/ql/lib/semmle/python/security/performance/ReDoSUtil.qll",
481-
"ruby/ql/lib/codeql/ruby/security/performance/ReDoSUtil.qll"
481+
"ruby/ql/lib/codeql/ruby/security/performance/ReDoSUtil.qll",
482+
"java/ql/lib/semmle/code/java/security/performance/ReDoSUtil.qll"
482483
],
483-
"ReDoS Exponential Python/JS/Ruby": [
484+
"ReDoS Exponential Python/JS/Ruby/Java": [
484485
"javascript/ql/lib/semmle/javascript/security/performance/ExponentialBackTracking.qll",
485486
"python/ql/lib/semmle/python/security/performance/ExponentialBackTracking.qll",
486-
"ruby/ql/lib/codeql/ruby/security/performance/ExponentialBackTracking.qll"
487+
"ruby/ql/lib/codeql/ruby/security/performance/ExponentialBackTracking.qll",
488+
"java/ql/lib/semmle/code/java/security/performance/ExponentialBackTracking.qll"
487489
],
488-
"ReDoS Polynomial Python/JS/Ruby": [
490+
"ReDoS Polynomial Python/JS/Ruby/Java": [
489491
"javascript/ql/lib/semmle/javascript/security/performance/SuperlinearBackTracking.qll",
490492
"python/ql/lib/semmle/python/security/performance/SuperlinearBackTracking.qll",
491-
"ruby/ql/lib/codeql/ruby/security/performance/SuperlinearBackTracking.qll"
493+
"ruby/ql/lib/codeql/ruby/security/performance/SuperlinearBackTracking.qll",
494+
"java/ql/lib/semmle/code/java/security/performance/SuperlinearBackTracking.qll"
492495
],
493496
"BadTagFilterQuery Python/JS/Ruby": [
494497
"javascript/ql/lib/semmle/javascript/security/BadTagFilterQuery.qll",
@@ -550,5 +553,9 @@
550553
"HttpToFileAccessCustomizations JS/Ruby": [
551554
"javascript/ql/lib/semmle/javascript/security/dataflow/HttpToFileAccessCustomizations.qll",
552555
"ruby/ql/lib/codeql/ruby/security/HttpToFileAccessCustomizations.qll"
556+
],
557+
"Typo database": [
558+
"javascript/ql/src/Expressions/TypoDatabase.qll",
559+
"ql/ql/src/codeql_ql/style/TypoDatabase.qll"
553560
]
554561
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class Element extends @element {
2+
string toString() { none() }
3+
}
4+
5+
class Expr extends @expr {
6+
string toString() { none() }
7+
}
8+
9+
class Stmt extends @stmt {
10+
string toString() { none() }
11+
}
12+
13+
predicate isStmtWithInitializer(Stmt stmt) {
14+
exists(int kind | stmts(stmt, kind, _) | kind = 2 or kind = 11 or kind = 35)
15+
}
16+
17+
from Expr child, int index, int index_new, Element parent
18+
where
19+
exprparents(child, index, parent) and
20+
if isStmtWithInitializer(parent) then index_new = index - 1 else index_new = index
21+
select child, index_new, parent

0 commit comments

Comments
 (0)