зеркало из https://github.com/github/codeql.git
Merge branch 'main' into exclude-std-in-constant-size-array-off-by-one
This commit is contained in:
Коммит
65eebf1f40
|
@ -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())
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче