Skip to content

Commit 4f5f0aa

Browse files
committed
Merge branch 'main' into redsun82/swift-open-redirection
2 parents 82d9edf + 18a815c commit 4f5f0aa

File tree

790 files changed

+29269
-16938
lines changed

Some content is hidden

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

790 files changed

+29269
-16938
lines changed

.github/workflows/mad_modelDiff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
branches:
1212
- main
1313
paths:
14-
- "java/ql/src/utils/model-generator/**/*.*"
14+
- "java/ql/src/utils/modelgenerator/**/*.*"
1515
- ".github/workflows/mad_modelDiff.yml"
1616

1717
permissions:
@@ -61,7 +61,7 @@ jobs:
6161
DATABASE=$2
6262
cd codeql-$QL_VARIANT
6363
SHORTNAME=`basename $DATABASE`
64-
python java/ql/src/utils/model-generator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml
64+
python java/ql/src/utils/modelgenerator/GenerateFlowModel.py --with-summaries --with-sinks $DATABASE ${SHORTNAME}.temp.model.yml
6565
mv java/ql/lib/ext/generated/${SHORTNAME}.temp.model.yml $MODELS/${SHORTNAME}Generated_${QL_VARIANT}.model.yml
6666
cd ..
6767
}

.github/workflows/mad_regenerate-models.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
SLUG: ${{ matrix.slug }}
5151
run: |
5252
SHORTNAME=${SLUG//[^a-zA-Z0-9_]/}
53-
java/ql/src/utils/model-generator/RegenerateModels.py "${SLUG}" dbs/${SHORTNAME}
53+
java/ql/src/utils/modelgenerator/RegenerateModels.py "${SLUG}" dbs/${SHORTNAME}
5454
- name: Stage changes
5555
run: |
5656
find java -name "*.model.yml" -print0 | xargs -0 git add

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: ./.github/actions/find-latest-bundle
2828
- name: Find codeql
2929
id: find-codeql
30-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
30+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
3131
with:
3232
languages: javascript # does not matter
3333
tools: ${{ steps.find-latest-bundle.outputs.url }}
@@ -137,20 +137,20 @@ jobs:
137137
env:
138138
CONF: ./ql-for-ql-config.yml
139139
- name: Initialize CodeQL
140-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
140+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
141141
with:
142142
languages: ql
143143
db-location: ${{ runner.temp }}/db
144144
config-file: ./ql-for-ql-config.yml
145145
tools: ${{ steps.find-latest-bundle.outputs.url }}
146-
- name: Move pack cache
146+
- name: Move pack queries
147147
run: |
148-
cp -r ${PACK}/.cache ql/ql/src/.cache
148+
cp -r ${PACK}/queries ql/ql/src
149149
env:
150150
PACK: ${{ runner.temp }}/pack
151151

152152
- name: Perform CodeQL Analysis
153-
uses: github/codeql-action/analyze@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
153+
uses: github/codeql-action/analyze@45955cb1830b640e2c1603ad72ad542a49d47b96
154154
with:
155155
category: "ql-for-ql"
156156
- name: Copy sarif file to CWD

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Find codeql
2727
id: find-codeql
28-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
28+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
2929
with:
3030
languages: javascript # does not matter
3131
- uses: actions/cache@v3

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- name: Find codeql
2424
id: find-codeql
25-
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
25+
uses: github/codeql-action/init@45955cb1830b640e2c1603ad72ad542a49d47b96
2626
with:
2727
languages: javascript # does not matter
2828
- uses: actions/cache@v3

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
2525

2626
Each language-specific directory contains further subdirectories that group queries based on their `@tags` or purpose.
2727
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/github/codeql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.
28+
- Experimental queries need to include `experimental` in their `@tags`
2829
- The structure of an `experimental` subdirectory mirrors the structure of its parent directory.
2930
- Select or create an appropriate directory in `experimental` based on the existing directory structure of `experimental` or its parent directory.
3031

config/identical-files.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,6 @@
402402
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/ControlFlowReachability.qll",
403403
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/ControlFlowReachability.qll"
404404
],
405-
"Inline Test Expectations": [
406-
"cpp/ql/test/TestUtilities/InlineExpectationsTest.qll",
407-
"csharp/ql/test/TestUtilities/InlineExpectationsTest.qll",
408-
"java/ql/test/TestUtilities/InlineExpectationsTest.qll",
409-
"python/ql/test/TestUtilities/InlineExpectationsTest.qll",
410-
"ruby/ql/test/TestUtilities/InlineExpectationsTest.qll",
411-
"ql/ql/test/TestUtilities/InlineExpectationsTest.qll",
412-
"go/ql/test/TestUtilities/InlineExpectationsTest.qll",
413-
"swift/ql/test/TestUtilities/InlineExpectationsTest.qll"
414-
],
415405
"C++ ExternalAPIs": [
416406
"cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll",
417407
"cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class BuiltinType extends @builtintype {
2+
string toString() { none() }
3+
}
4+
5+
from BuiltinType type, string name, int kind, int kind_new, int size, int sign, int alignment
6+
where
7+
builtintypes(type, name, kind, size, sign, alignment) and
8+
if type instanceof @float16 or type instanceof @complex_float16
9+
then kind_new = 2
10+
else kind_new = kind
11+
select type, name, kind_new, size, sign, alignment

0 commit comments

Comments
 (0)