Merge branch 'main' into exclude-std-in-constant-size-array-off-by-one

This commit is contained in:
Mathias Vorreiter Pedersen 2023-05-30 13:40:01 -07:00 коммит произвёл GitHub
Родитель f00b29d3d2 60a5ef744f
Коммит 65eebf1f40
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 44 добавлений и 23 удалений

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: sinkModel
data:
- ["org.apache.hc.core5.http.impl.bootstrap", "HttpAsyncRequester", True, "connect", "(HttpHost,Timeout)", "", "Argument[0]", "open-url", "hq-manual"]

Просмотреть файл

@ -18,7 +18,7 @@ GenerateFlowTestCase.py specsToTest projectPom.xml outdir [--force]
This generates test cases exercising function model specifications found in specsToTest
producing files Test.java, test.ql, test.ext.yml and test.expected in outdir.
specsToTest should either be a .csv file, a .yml file, or a directory of .yml files, containing the
specsToTest should either be a .csv file, a .yml file, or a directory of .yml files, containing the
model specifications to test.
projectPom.xml should be a Maven pom sufficient to resolve the classes named in specsToTest.csv.
@ -276,7 +276,7 @@ if len(supportModelRows) != 0:
modelSpecRow[0].strip() for modelSpecRow in supportModelRows)
dataextensions = f"""extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
{models}

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newWithMapValueDefault", "(Object)", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["", "Uri", False, "getQueryParameter", "", "", "Argument[this]", "ReturnValue", "taint", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["", "Uri", False, "getQueryParameter", "", "", "Argument[this]", "ReturnValue", "taint", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["my.callback.qltest", "A", False, "applyConsumer1", "(Object,Consumer1)", "", "Argument[0]", "Argument[1].Parameter[0]", "value", "manual"]
@ -15,4 +15,3 @@ extensions:
- ["my.callback.qltest", "A", False, "produceConsume", "(Producer1,Consumer3)", "", "Argument[1].Parameter[0]", "ReturnValue", "value", "manual"]
- ["my.callback.qltest", "A", False, "applyConverter1", "(Object,Converter1)", "", "Argument[0]", "Argument[1].Parameter[0]", "value", "manual"]
- ["my.callback.qltest", "A", False, "applyConverter1", "(Object,Converter1)", "", "Argument[1].ReturnValue", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["", "B", False, "readElement", "(Spliterator)", "", "Argument[0].Element", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: sinkModel
data:
- ["my.qltest", "B", False, "sink1", "(Object)", "", "Argument[0]", "qltest", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: sourceModel
data:
- ["my.qltest", "A", False, "src1", "()", "", "ReturnValue", "qltest", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["my.qltest", "C", False, "stepArgRes", "(Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["my.qltest.synth", "A", False, "storeInArray", "(String)", "", "Argument[0]", "SyntheticGlobal[db1].ArrayElement", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newWithMapValueDefault", "(Object)", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newBundleWithMapValue", "(Object)", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "getMapKeyDefault", "(Bundle)", "", "Argument[0].MapKey", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newRBWithMapValue", "", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Client", False, "getURIBuilder_pathDefault", "(Object)", "", "Argument[0].SyntheticField[org.apache.http.client.utils.URIBuilder.path]", "ReturnValue", "taint", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newWithElementDefault", "(Object)", "", "Argument[0]", "ReturnValue.Element", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "getThrowable_messageDefault", "(Object)", "", "Argument[0].SyntheticField[java.lang.Throwable.message]", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "newWithMapValueDefault", "(Object)", "", "Argument[0]", "ReturnValue.MapValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "getElementSpliterator", "(Spliterator)", "", "Argument[0].Element", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -1,6 +1,6 @@
extensions:
- addsTo:
pack: codeql/java-tests
pack: codeql/java-all
extensible: summaryModel
data:
- ["generatedtest", "Test", False, "getStreamElement", "", "", "Argument[0].Element", "ReturnValue", "value", "manual"]

Просмотреть файл

@ -0,0 +1,22 @@
/**
* @name Print CFG
* @description Produces a representation of a file's Control Flow Graph.
* This query is used by the VS Code extension.
* @id rb/print-cfg
* @kind graph
* @tags ide-contextual-queries/print-cfg
*/
private import codeql.ruby.controlflow.internal.ControlFlowGraphImplShared::TestOutput
private import codeql.IDEContextual
/**
* Gets the source file to generate a CFG from.
*/
external string selectedSourceFile();
class MyRelevantNode extends RelevantNode {
MyRelevantNode() {
this.getScope().getLocation().getFile() = getFileBySourceArchiveName(selectedSourceFile())
}
}