diff --git a/CODEOWNERS b/CODEOWNERS
index b2eb53f0bb0..738605d6032 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -8,6 +8,8 @@
/swift/ @github/codeql-swift
/misc/codegen/ @github/codeql-swift
/java/kotlin-extractor/ @github/codeql-kotlin
+/java/ql/test-kotlin1/ @github/codeql-kotlin
+/java/ql/test-kotlin2/ @github/codeql-kotlin
# ML-powered queries
/javascript/ql/experimental/adaptivethreatmodeling/ @github/codeql-ml-powered-queries-reviewers
diff --git a/codeql-workspace.yml b/codeql-workspace.yml
index 31c94676962..5d8b300c8f4 100644
--- a/codeql-workspace.yml
+++ b/codeql-workspace.yml
@@ -1,7 +1,7 @@
provide:
- "*/ql/src/qlpack.yml"
- "*/ql/lib/qlpack.yml"
- - "*/ql/test/qlpack.yml"
+ - "*/ql/test*/qlpack.yml"
- "*/ql/examples/qlpack.yml"
- "*/ql/consistency-queries/qlpack.yml"
- "*/ql/automodel/src/qlpack.yml"
diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md
index c458d28ec7d..cf81a85004d 100644
--- a/cpp/ql/lib/CHANGELOG.md
+++ b/cpp/ql/lib/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 0.12.0
+
+### Breaking Changes
+
+* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
+
+### Minor Analysis Improvements
+
+* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
+* Added models for `strlcpy` and `strlcat`.
+* Added models for the `sprintf` variants from the `StrSafe.h` header.
+* Added SQL API models for `ODBC`.
+* Added taint models for `realloc` and related functions.
+
## 0.11.0
### Breaking Changes
diff --git a/cpp/ql/lib/change-notes/2023-10-30-realloc-flow.md b/cpp/ql/lib/change-notes/2023-10-30-realloc-flow.md
deleted file mode 100644
index 69f00c5a820..00000000000
--- a/cpp/ql/lib/change-notes/2023-10-30-realloc-flow.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added taint models for `realloc` and related functions.
diff --git a/cpp/ql/lib/change-notes/2023-10-31-assign-pointer-add-sub-expr.md b/cpp/ql/lib/change-notes/2023-10-31-assign-pointer-add-sub-expr.md
deleted file mode 100644
index a1407c9222c..00000000000
--- a/cpp/ql/lib/change-notes/2023-10-31-assign-pointer-add-sub-expr.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: breaking
----
-* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
diff --git a/cpp/ql/lib/change-notes/2023-11-08-strsafe-models.md b/cpp/ql/lib/change-notes/2023-11-08-strsafe-models.md
deleted file mode 100644
index 26e9d6dc747..00000000000
--- a/cpp/ql/lib/change-notes/2023-11-08-strsafe-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added models for the `sprintf` variants from the `StrSafe.h` header.
diff --git a/cpp/ql/lib/change-notes/2023-11-10-strlcpy-strlcat-models.md b/cpp/ql/lib/change-notes/2023-11-10-strlcpy-strlcat-models.md
deleted file mode 100644
index 6e4e1fe8a53..00000000000
--- a/cpp/ql/lib/change-notes/2023-11-10-strlcpy-strlcat-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added models for `strlcpy` and `strlcat`.
diff --git a/cpp/ql/lib/change-notes/released/0.12.0.md b/cpp/ql/lib/change-notes/released/0.12.0.md
new file mode 100644
index 00000000000..e383369ad78
--- /dev/null
+++ b/cpp/ql/lib/change-notes/released/0.12.0.md
@@ -0,0 +1,13 @@
+## 0.12.0
+
+### Breaking Changes
+
+* The expressions `AssignPointerAddExpr` and `AssignPointerSubExpr` are no longer subtypes of `AssignBitwiseOperation`.
+
+### Minor Analysis Improvements
+
+* The "Returning stack-allocated memory" (`cpp/return-stack-allocated-memory`) query now also detects returning stack-allocated memory allocated by calls to `alloca`, `strdupa`, and `strndupa`.
+* Added models for `strlcpy` and `strlcat`.
+* Added models for the `sprintf` variants from the `StrSafe.h` header.
+* Added SQL API models for `ODBC`.
+* Added taint models for `realloc` and related functions.
diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml
index fce68697d68..5e2fb32b059 100644
--- a/cpp/ql/lib/codeql-pack.release.yml
+++ b/cpp/ql/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.11.0
+lastReleaseVersion: 0.12.0
diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml
index 28a3d13cd58..a8d13434ceb 100644
--- a/cpp/ql/lib/qlpack.yml
+++ b/cpp/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-all
-version: 0.11.1-dev
+version: 0.12.1-dev
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
index 9548ff68074..7b1a9ca3123 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll
@@ -645,6 +645,24 @@ class GlobalLikeVariable extends Variable {
}
}
+/**
+ * Returns the smallest indirection for the type `t`.
+ *
+ * For most types this is `1`, but for `ArrayType`s (which are allocated on
+ * the stack) this is `0`
+ */
+int getMinIndirectionsForType(Type t) {
+ if t.getUnspecifiedType() instanceof Cpp::ArrayType then result = 0 else result = 1
+}
+
+private int getMinIndirectionForGlobalUse(Ssa::GlobalUse use) {
+ result = getMinIndirectionsForType(use.getUnspecifiedType())
+}
+
+private int getMinIndirectionForGlobalDef(Ssa::GlobalDef def) {
+ result = getMinIndirectionsForType(def.getUnspecifiedType())
+}
+
/**
* Holds if data can flow from `node1` to `node2` in a way that loses the
* calling context. For example, this would happen with flow through a
@@ -656,7 +674,7 @@ predicate jumpStep(Node n1, Node n2) {
v = globalUse.getVariable() and
n1.(FinalGlobalValue).getGlobalUse() = globalUse
|
- globalUse.getIndirection() = 1 and
+ globalUse.getIndirection() = getMinIndirectionForGlobalUse(globalUse) and
v = n2.asVariable()
or
v = n2.asIndirectVariable(globalUse.getIndirection())
@@ -666,7 +684,7 @@ predicate jumpStep(Node n1, Node n2) {
v = globalDef.getVariable() and
n2.(InitialGlobalValue).getGlobalDef() = globalDef
|
- globalDef.getIndirection() = 1 and
+ globalDef.getIndirection() = getMinIndirectionForGlobalDef(globalDef) and
v = n1.asVariable()
or
v = n1.asIndirectVariable(globalDef.getIndirection())
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
index 50b374c5b04..07015db1c08 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
@@ -34,7 +34,8 @@ cached
private newtype TIRDataFlowNode =
TNode0(Node0Impl node) { DataFlowImplCommon::forceCachingInSameStage() } or
TVariableNode(Variable var, int indirectionIndex) {
- indirectionIndex = [1 .. Ssa::getMaxIndirectionsForType(var.getUnspecifiedType())]
+ indirectionIndex =
+ [getMinIndirectionsForType(var.getUnspecifiedType()) .. Ssa::getMaxIndirectionsForType(var.getUnspecifiedType())]
} or
TPostFieldUpdateNode(FieldAddress operand, int indirectionIndex) {
indirectionIndex =
@@ -346,7 +347,9 @@ class Node extends TIRDataFlowNode {
* Gets the variable corresponding to this node, if any. This can be used for
* modeling flow in and out of global variables.
*/
- Variable asVariable() { this = TVariableNode(result, 1) }
+ Variable asVariable() {
+ this = TVariableNode(result, getMinIndirectionsForType(result.getUnspecifiedType()))
+ }
/**
* Gets the `indirectionIndex`'th indirection of this node's underlying variable, if any.
@@ -354,7 +357,7 @@ class Node extends TIRDataFlowNode {
* This can be used for modeling flow in and out of global variables.
*/
Variable asIndirectVariable(int indirectionIndex) {
- indirectionIndex > 1 and
+ indirectionIndex > getMinIndirectionsForType(result.getUnspecifiedType()) and
this = TVariableNode(result, indirectionIndex)
}
@@ -1273,31 +1276,90 @@ abstract private class IndirectExprNodeBase extends Node {
}
}
-private class IndirectOperandIndirectExprNode extends IndirectExprNodeBase instanceof IndirectOperand
-{
- IndirectOperandIndirectExprNode() {
- exists(Expr e, int n, int indirectionIndex |
- indirectExprNodeShouldBeIndirectOperand(this, e, n, indirectionIndex) and
- not indirectExprNodeShouldBeIndirectOperand(_, e, n + 1, indirectionIndex)
- )
+/** A signature for converting an indirect node to an expression. */
+private signature module IndirectNodeToIndirectExprSig {
+ /** The indirect node class to be converted to an expression */
+ class IndirectNode;
+
+ /**
+ * Holds if the indirect expression at indirection index `indirectionIndex`
+ * of `node` is `e`. The integer `n` specifies how many conversions has been
+ * applied to `node`.
+ */
+ predicate indirectNodeHasIndirectExpr(IndirectNode node, Expr e, int n, int indirectionIndex);
+}
+
+/**
+ * A module that implements the logic for deciding whether an indirect node
+ * should be an `IndirectExprNode`.
+ */
+private module IndirectNodeToIndirectExpr {
+ import Sig
+
+ /**
+ * This predicate shifts the indirection index by one when `conv` is a
+ * `ReferenceDereferenceExpr`.
+ *
+ * This is necessary because `ReferenceDereferenceExpr` is a conversion
+ * in the AST, but appears as a `LoadInstruction` in the IR.
+ */
+ bindingset[e, indirectionIndex]
+ private predicate adjustForReference(
+ Expr e, int indirectionIndex, Expr conv, int adjustedIndirectionIndex
+ ) {
+ conv.(ReferenceDereferenceExpr).getExpr() = e and
+ adjustedIndirectionIndex = indirectionIndex - 1
+ or
+ not conv instanceof ReferenceDereferenceExpr and
+ conv = e and
+ adjustedIndirectionIndex = indirectionIndex
}
- final override Expr getConvertedExpr(int n, int index) {
- indirectExprNodeShouldBeIndirectOperand(this, result, n, index)
+ /** Holds if `node` should be an `IndirectExprNode`. */
+ predicate charpred(IndirectNode node) {
+ exists(Expr e, int n, int indirectionIndex |
+ indirectNodeHasIndirectExpr(node, e, n, indirectionIndex) and
+ not exists(Expr conv, int adjustedIndirectionIndex |
+ adjustForReference(e, indirectionIndex, conv, adjustedIndirectionIndex) and
+ indirectNodeHasIndirectExpr(_, conv, n + 1, adjustedIndirectionIndex)
+ )
+ )
}
}
-private class IndirectInstructionIndirectExprNode extends IndirectExprNodeBase instanceof IndirectInstruction
+private module IndirectOperandIndirectExprNodeImpl implements IndirectNodeToIndirectExprSig {
+ class IndirectNode = IndirectOperand;
+
+ predicate indirectNodeHasIndirectExpr = indirectExprNodeShouldBeIndirectOperand/4;
+}
+
+module IndirectOperandToIndirectExpr =
+ IndirectNodeToIndirectExpr;
+
+private class IndirectOperandIndirectExprNode extends IndirectExprNodeBase instanceof IndirectOperand
{
- IndirectInstructionIndirectExprNode() {
- exists(Expr e, int n, int indirectionIndex |
- indirectExprNodeShouldBeIndirectInstruction(this, e, n, indirectionIndex) and
- not indirectExprNodeShouldBeIndirectInstruction(_, e, n + 1, indirectionIndex)
- )
- }
+ IndirectOperandIndirectExprNode() { IndirectOperandToIndirectExpr::charpred(this) }
final override Expr getConvertedExpr(int n, int index) {
- indirectExprNodeShouldBeIndirectInstruction(this, result, n, index)
+ IndirectOperandToIndirectExpr::indirectNodeHasIndirectExpr(this, result, n, index)
+ }
+}
+
+private module IndirectInstructionIndirectExprNodeImpl implements IndirectNodeToIndirectExprSig {
+ class IndirectNode = IndirectInstruction;
+
+ predicate indirectNodeHasIndirectExpr = indirectExprNodeShouldBeIndirectInstruction/4;
+}
+
+module IndirectInstructionToIndirectExpr =
+ IndirectNodeToIndirectExpr;
+
+private class IndirectInstructionIndirectExprNode extends IndirectExprNodeBase instanceof IndirectInstruction
+{
+ IndirectInstructionIndirectExprNode() { IndirectInstructionToIndirectExpr::charpred(this) }
+
+ final override Expr getConvertedExpr(int n, int index) {
+ IndirectInstructionToIndirectExpr::indirectNodeHasIndirectExpr(this, result, n, index)
}
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
index 76741dfc5cc..5c0174be32d 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
@@ -59,6 +59,9 @@ private module SourceVariables {
then result = base.getType()
else result = getTypeImpl(base.getType(), ind - 1)
}
+
+ /** Gets the location of this variable. */
+ Location getLocation() { result = this.getBaseVariable().getLocation() }
}
}
@@ -869,7 +872,7 @@ private predicate sourceVariableIsGlobal(
)
}
-private module SsaInput implements SsaImplCommon::InputSig {
+private module SsaInput implements SsaImplCommon::InputSig {
import InputSigCommon
import SourceVariables
@@ -1092,7 +1095,7 @@ class Def extends DefOrUse {
predicate isCertain() { defOrUse.isCertain() }
}
-private module SsaImpl = SsaImplCommon::Make;
+private module SsaImpl = SsaImplCommon::Make;
class PhiNode extends SsaImpl::DefinitionExt {
PhiNode() {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
index fc718693dbd..0ea5c45df4f 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
@@ -377,6 +377,9 @@ abstract private class AbstractBaseSourceVariable extends TBaseSourceVariable {
/** Gets a textual representation of this element. */
abstract string toString();
+ /** Gets the location of this variable. */
+ abstract Location getLocation();
+
/** Gets the type of this base source variable. */
final DataFlowType getType() { this.getLanguageType().hasUnspecifiedType(result, _) }
@@ -395,6 +398,8 @@ class BaseIRVariable extends AbstractBaseSourceVariable, TBaseIRVariable {
override string toString() { result = var.toString() }
+ override Location getLocation() { result = var.getLocation() }
+
override CppType getLanguageType() { result = var.getLanguageType() }
}
@@ -407,6 +412,8 @@ class BaseCallVariable extends AbstractBaseSourceVariable, TBaseCallVariable {
override string toString() { result = call.toString() }
+ override Location getLocation() { result = call.getLocation() }
+
override CppType getLanguageType() { result = getResultLanguageType(call) }
}
@@ -872,7 +879,7 @@ private module Cached {
upper = countIndirectionsForCppType(type) and
ind = ind0 + [lower .. upper] and
indirectionIndex = ind - (ind0 + lower) and
- (if type.hasType(any(Cpp::ArrayType arrayType), true) then lower = 0 else lower = 1)
+ lower = getMinIndirectionsForType(any(Type t | type.hasUnspecifiedType(t, _)))
)
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll
index fd27a4e354f..ce53005470d 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll
@@ -229,7 +229,7 @@ private class FinalParameterUse extends UseImpl, TFinalParameterUse {
override predicate isCertain() { any() }
}
-private module SsaInput implements SsaImplCommon::InputSig {
+private module SsaInput implements SsaImplCommon::InputSig {
import InputSigCommon
import SourceVariables
@@ -335,7 +335,7 @@ class Def extends DefOrUse {
predicate isIteratorDef() { defOrUse instanceof IteratorDef }
}
-private module SsaImpl = SsaImplCommon::Make;
+private module SsaImpl = SsaImplCommon::Make;
class PhiNode extends SsaImpl::DefinitionExt {
PhiNode() {
diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md
index 487feb533c4..4d374ad0ccf 100644
--- a/cpp/ql/src/CHANGELOG.md
+++ b/cpp/ql/src/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 0.8.3
+
+### Minor Analysis Improvements
+
+* The `cpp/uninitialized-local` query has been improved to produce fewer false positives.
+
## 0.8.2
No user-facing changes.
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql
index af4bd8c61a3..16679d67fd2 100644
--- a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql
+++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql
@@ -27,16 +27,26 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
ReturnStackAllocatedMemoryConfig() { this = "ReturnStackAllocatedMemoryConfig" }
override predicate isSource(Instruction source) {
- // Holds if `source` is a node that represents the use of a stack variable
- exists(VariableAddressInstruction var, Function func |
- var = source and
- func = source.getEnclosingFunction() and
- var.getAstVariable() instanceof StackVariable and
- // Pointer-to-member types aren't properly handled in the dbscheme.
- not var.getResultType() instanceof PointerToMemberType and
+ exists(Function func |
// Rule out FPs caused by extraction errors.
not any(ErrorExpr e).getEnclosingFunction() = func and
- not intentionallyReturnsStackPointer(func)
+ not intentionallyReturnsStackPointer(func) and
+ func = source.getEnclosingFunction()
+ |
+ // `source` is an instruction that represents the use of a stack variable
+ exists(VariableAddressInstruction var |
+ var = source and
+ var.getAstVariable() instanceof StackVariable and
+ // Pointer-to-member types aren't properly handled in the dbscheme.
+ not var.getResultType() instanceof PointerToMemberType
+ )
+ or
+ // `source` is an instruction that represents the return value of a
+ // function that is known to return stack-allocated memory.
+ exists(Call call |
+ call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa", "_alloca", "_malloca"]) and
+ source.getUnconvertedResultExpression() = call
+ )
)
}
@@ -85,10 +95,10 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
}
from
- MustFlowPathNode source, MustFlowPathNode sink, VariableAddressInstruction var,
+ MustFlowPathNode source, MustFlowPathNode sink, Instruction instr,
ReturnStackAllocatedMemoryConfig conf
where
conf.hasFlowPath(pragma[only_bind_into](source), pragma[only_bind_into](sink)) and
- source.getInstruction() = var
+ source.getInstruction() = instr
select sink.getInstruction(), source, sink, "May return stack-allocated memory from $@.",
- var.getAst(), var.getAst().toString()
+ instr.getAst(), instr.getAst().toString()
diff --git a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql
index 883a6b07423..3e1c62b02c2 100644
--- a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql
+++ b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql
@@ -14,25 +14,47 @@
import cpp
import semmle.code.cpp.security.Security
-import semmle.code.cpp.ir.dataflow.internal.DefaultTaintTrackingImpl
-import TaintedWithPath
+import semmle.code.cpp.security.FlowSources
+import semmle.code.cpp.ir.dataflow.TaintTracking
+import semmle.code.cpp.ir.IR
+import Flow::PathGraph
-predicate isProcessOperationExplanation(Expr arg, string processOperation) {
+predicate isProcessOperationExplanation(DataFlow::Node arg, string processOperation) {
exists(int processOperationArg, FunctionCall call |
isProcessOperationArgument(processOperation, processOperationArg) and
call.getTarget().getName() = processOperation and
- call.getArgument(processOperationArg) = arg
+ call.getArgument(processOperationArg) = [arg.asExpr(), arg.asIndirectExpr()]
)
}
-class Configuration extends TaintTrackingConfiguration {
- override predicate isSink(Element arg) { isProcessOperationExplanation(arg, _) }
+predicate isSource(FlowSource source, string sourceType) {
+ not source instanceof DataFlow::ExprNode and
+ sourceType = source.getSourceType()
}
-from string processOperation, Expr arg, Expr source, PathNode sourceNode, PathNode sinkNode
+module Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node node) { isSource(node, _) }
+
+ predicate isSink(DataFlow::Node node) { isProcessOperationExplanation(node, _) }
+
+ predicate isBarrier(DataFlow::Node node) {
+ isSink(node) and node.asExpr().getUnspecifiedType() instanceof ArithmeticType
+ or
+ node.asInstruction().(StoreInstruction).getResultType() instanceof ArithmeticType
+ }
+}
+
+module Flow = TaintTracking::Global;
+
+from
+ string processOperation, string sourceType, DataFlow::Node source, DataFlow::Node sink,
+ Flow::PathNode sourceNode, Flow::PathNode sinkNode
where
- isProcessOperationExplanation(arg, processOperation) and
- taintedWithPath(source, arg, sourceNode, sinkNode)
-select arg, sourceNode, sinkNode,
+ source = sourceNode.getNode() and
+ sink = sinkNode.getNode() and
+ isSource(source, sourceType) and
+ isProcessOperationExplanation(sink, processOperation) and
+ Flow::flowPath(sourceNode, sinkNode)
+select sink, sourceNode, sinkNode,
"The value of this argument may come from $@ and is being passed to " + processOperation + ".",
- source, source.toString()
+ source, sourceType
diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.c b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.c
deleted file mode 100644
index 2700109a586..00000000000
--- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include
-
-char *copy;
-
-void copyArgv(char **argv) {
- copy = argv[1];
-}
-
-void printWrapper(char *str) {
- printf(str);
-}
-
-int main(int argc, char **argv) {
- copyArgv(argv);
-
- // This should be avoided
- printf(copy);
-
- // This should be avoided too, because it has the same effect
- printWrapper(copy);
-
- // This is fine
- printf("%s", copy);
-}
diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.qhelp b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.qhelp
deleted file mode 100644
index 80b84580a57..00000000000
--- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.qhelp
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
The program uses input from the user, propagated via a global variable, as a format string for printf style functions.
-This can lead to buffer overflows or data representation problems. An attacker can exploit this weakness to crash the program,
-disclose information or even execute arbitrary code.
-
-
This rule only identifies inputs from the user that are transferred through global variables before being used in printf style functions.
-Analyzing the flow of data through global variables is more prone to errors and so this rule may identify some examples of code where
-the input is not really from the user. For example, when a global variable is set in two places, one that comes from the user and one that does not.
-In this case we would mark all usages of the global variable as input from the user, but the input from the user may always came after the call to the
-printf style functions.
-
-
The results of this rule should be considered alongside the related rule "Uncontrolled format string" which tracks the flow of the
-values input by a user, excluding global variables, until the values are used as the format argument for a printf like function call.
-
-
-
-
Use constant expressions as the format strings. If you need to print a value from the user, use printf("%s", value_from_user).
-
-
-
-
diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql
deleted file mode 100644
index b37e34c296c..00000000000
--- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @name Uncontrolled format string (through global variable)
- * @description Using externally-controlled format strings in
- * printf-style functions can lead to buffer overflows
- * or data representation problems.
- * @kind path-problem
- * @problem.severity warning
- * @security-severity 9.3
- * @precision high
- * @id cpp/tainted-format-string-through-global
- * @tags reliability
- * security
- * external/cwe/cwe-134
- */
-
-import cpp
-import semmle.code.cpp.security.FunctionWithWrappers
-import semmle.code.cpp.security.Security
-import semmle.code.cpp.ir.dataflow.internal.DefaultTaintTrackingImpl
-import TaintedWithPath
-
-class Configuration extends TaintTrackingConfiguration {
- override predicate isSink(Element tainted) {
- exists(PrintfLikeFunction printf | printf.outermostWrapperFunctionCall(tainted, _))
- }
-
- override predicate taintThroughGlobals() { any() }
-}
-
-from
- PrintfLikeFunction printf, Expr arg, PathNode sourceNode, PathNode sinkNode,
- string printfFunction, Expr userValue, string cause
-where
- printf.outermostWrapperFunctionCall(arg, printfFunction) and
- not taintedWithoutGlobals(arg) and
- taintedWithPath(userValue, arg, sourceNode, sinkNode) and
- isUserInput(userValue, cause)
-select arg, sourceNode, sinkNode,
- "The value of this argument may come from $@ and is being used as a formatting argument to " +
- printfFunction + ".", userValue, cause
diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql
index 1981836a923..810039f4e1a 100644
--- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql
+++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql
@@ -14,10 +14,13 @@
import cpp
import semmle.code.cpp.security.Overflow
-import semmle.code.cpp.security.Security
-import semmle.code.cpp.ir.dataflow.internal.DefaultTaintTrackingImpl
-import TaintedWithPath
+import semmle.code.cpp.dataflow.new.TaintTracking
+import semmle.code.cpp.dataflow.new.DataFlow
+import semmle.code.cpp.ir.IR
+import semmle.code.cpp.controlflow.IRGuards as IRGuards
+import semmle.code.cpp.security.FlowSources as FS
import Bounded
+import Flow::PathGraph
bindingset[op]
predicate missingGuard(Operation op, Expr e, string effect) {
@@ -28,28 +31,90 @@ predicate missingGuard(Operation op, Expr e, string effect) {
not e instanceof VariableAccess and effect = "overflow"
}
-class Configuration extends TaintTrackingConfiguration {
- override predicate isSink(Element e) {
- exists(Operation op |
- missingGuard(op, e, _) and
- op.getAnOperand() = e
- |
- op instanceof UnaryArithmeticOperation or
- op instanceof BinaryArithmeticOperation or
- op instanceof AssignArithmeticOperation
- )
- }
+predicate isSource(FS::FlowSource source, string sourceType) { sourceType = source.getSourceType() }
- override predicate isBarrier(Expr e) {
- super.isBarrier(e) or bounded(e) or e.getUnspecifiedType().(IntegralType).getSize() <= 1
+predicate isSink(DataFlow::Node sink, Operation op, Expr e) {
+ e = sink.asExpr() and
+ missingGuard(op, e, _) and
+ op.getAnOperand() = e and
+ (
+ op instanceof UnaryArithmeticOperation or
+ op instanceof BinaryArithmeticOperation or
+ op instanceof AssignArithmeticOperation
+ )
+}
+
+predicate hasUpperBoundsCheck(Variable var) {
+ exists(RelationalOperation oper, VariableAccess access |
+ oper.getAnOperand() = access and
+ access.getTarget() = var and
+ // Comparing to 0 is not an upper bound check
+ not oper.getAnOperand().getValue() = "0"
+ )
+}
+
+predicate constantInstruction(Instruction instr) {
+ instr instanceof ConstantInstruction or
+ constantInstruction(instr.(UnaryInstruction).getUnary())
+}
+
+predicate readsVariable(LoadInstruction load, Variable var) {
+ load.getSourceAddress().(VariableAddressInstruction).getAstVariable() = var
+}
+
+predicate nodeIsBarrierEqualityCandidate(DataFlow::Node node, Operand access, Variable checkedVar) {
+ exists(Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ any(IRGuards::IRGuardCondition guard).ensuresEq(access, _, _, instr.getBlock(), true)
+ )
+}
+
+module Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { isSource(source, _) }
+
+ predicate isSink(DataFlow::Node sink) { isSink(sink, _, _) }
+
+ predicate isBarrier(DataFlow::Node node) {
+ exists(StoreInstruction store | store = node.asInstruction() |
+ // Block flow to "likely small expressions"
+ bounded(store.getSourceValue().getUnconvertedResultExpression())
+ or
+ // Block flow to "small types"
+ store.getResultType().getUnspecifiedType().(IntegralType).getSize() <= 1
+ )
+ or
+ // Block flow if there's an upper bound check of the variable anywhere in the program
+ exists(Variable checkedVar, Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ hasUpperBoundsCheck(checkedVar)
+ )
+ or
+ // Block flow if the node is guarded by an equality check
+ exists(Variable checkedVar, Operand access |
+ nodeIsBarrierEqualityCandidate(node, access, checkedVar) and
+ readsVariable(access.getDef(), checkedVar)
+ )
+ or
+ // Block flow to any binary instruction whose operands are both non-constants.
+ exists(BinaryInstruction iTo |
+ iTo = node.asInstruction() and
+ not constantInstruction(iTo.getLeft()) and
+ not constantInstruction(iTo.getRight()) and
+ // propagate taint from either the pointer or the offset, regardless of constantness
+ not iTo instanceof PointerArithmeticInstruction
+ )
}
}
-from Expr origin, Expr e, string effect, PathNode sourceNode, PathNode sinkNode, Operation op
+module Flow = TaintTracking::Global;
+
+from
+ Expr e, string effect, Flow::PathNode source, Flow::PathNode sink, Operation op, string sourceType
where
- taintedWithPath(origin, e, sourceNode, sinkNode) and
- op.getAnOperand() = e and
+ Flow::flowPath(source, sink) and
+ isSource(source.getNode(), sourceType) and
+ isSink(sink.getNode(), op, e) and
missingGuard(op, e, effect)
-select e, sourceNode, sinkNode,
+select e, source, sink,
"$@ flows to an operand of an arithmetic expression, potentially causing an " + effect + ".",
- origin, "User-provided value"
+ source, sourceType
diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql
index 6034b4f5ffd..15fd2cbca15 100644
--- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql
+++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql
@@ -16,45 +16,30 @@
import cpp
import semmle.code.cpp.security.Overflow
-import semmle.code.cpp.security.Security
-import semmle.code.cpp.ir.dataflow.internal.DefaultTaintTrackingImpl
+import semmle.code.cpp.dataflow.new.TaintTracking
+import semmle.code.cpp.ir.IR
+import semmle.code.cpp.controlflow.IRGuards as IRGuards
predicate isMaxValue(Expr mie) {
exists(MacroInvocation mi |
mi.getExpr() = mie and
- (
- mi.getMacroName() = "CHAR_MAX" or
- mi.getMacroName() = "LLONG_MAX" or
- mi.getMacroName() = "INT_MAX" or
- mi.getMacroName() = "SHRT_MAX" or
- mi.getMacroName() = "UINT_MAX"
- )
+ mi.getMacroName() = ["CHAR_MAX", "LLONG_MAX", "INT_MAX", "SHRT_MAX", "UINT_MAX"]
)
}
predicate isMinValue(Expr mie) {
exists(MacroInvocation mi |
mi.getExpr() = mie and
- (
- mi.getMacroName() = "CHAR_MIN" or
- mi.getMacroName() = "LLONG_MIN" or
- mi.getMacroName() = "INT_MIN" or
- mi.getMacroName() = "SHRT_MIN"
- )
+ mi.getMacroName() = ["CHAR_MIN", "LLONG_MIN", "INT_MIN", "SHRT_MIN"]
)
}
-class SecurityOptionsArith extends SecurityOptions {
- override predicate isUserInput(Expr expr, string cause) {
+predicate isSource(DataFlow::Node source, string cause) {
+ exists(Expr expr | expr = source.asExpr() |
isMaxValue(expr) and cause = "max value"
or
isMinValue(expr) and cause = "min value"
- }
-}
-
-predicate taintedVarAccess(Expr origin, VariableAccess va, string cause) {
- isUserInput(origin, cause) and
- tainted(origin, va)
+ )
}
predicate causeEffectCorrespond(string cause, string effect) {
@@ -65,16 +50,79 @@ predicate causeEffectCorrespond(string cause, string effect) {
effect = "underflow"
}
-from Expr origin, Operation op, VariableAccess va, string cause, string effect
-where
- taintedVarAccess(origin, va, cause) and
- op.getAnOperand() = va and
- (
+predicate isSink(DataFlow::Node sink, VariableAccess va, string effect) {
+ exists(Operation op |
+ sink.asExpr() = va and
+ op.getAnOperand() = va
+ |
missingGuardAgainstUnderflow(op, va) and effect = "underflow"
or
missingGuardAgainstOverflow(op, va) and effect = "overflow"
- ) and
- causeEffectCorrespond(cause, effect)
+ )
+}
+
+predicate hasUpperBoundsCheck(Variable var) {
+ exists(RelationalOperation oper, VariableAccess access |
+ oper.getAnOperand() = access and
+ access.getTarget() = var and
+ // Comparing to 0 is not an upper bound check
+ not oper.getAnOperand().getValue() = "0"
+ )
+}
+
+predicate constantInstruction(Instruction instr) {
+ instr instanceof ConstantInstruction or
+ constantInstruction(instr.(UnaryInstruction).getUnary())
+}
+
+predicate readsVariable(LoadInstruction load, Variable var) {
+ load.getSourceAddress().(VariableAddressInstruction).getAstVariable() = var
+}
+
+predicate nodeIsBarrierEqualityCandidate(DataFlow::Node node, Operand access, Variable checkedVar) {
+ exists(Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ any(IRGuards::IRGuardCondition guard).ensuresEq(access, _, _, instr.getBlock(), true)
+ )
+}
+
+module Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { isSource(source, _) }
+
+ predicate isSink(DataFlow::Node sink) { isSink(sink, _, _) }
+
+ predicate isBarrier(DataFlow::Node node) {
+ // Block flow if there's an upper bound check of the variable anywhere in the program
+ exists(Variable checkedVar, Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ hasUpperBoundsCheck(checkedVar)
+ )
+ or
+ // Block flow if the node is guarded by an equality check
+ exists(Variable checkedVar, Operand access |
+ nodeIsBarrierEqualityCandidate(node, access, checkedVar) and
+ readsVariable(access.getDef(), checkedVar)
+ )
+ or
+ // Block flow to any binary instruction whose operands are both non-constants.
+ exists(BinaryInstruction iTo |
+ iTo = node.asInstruction() and
+ not constantInstruction(iTo.getLeft()) and
+ not constantInstruction(iTo.getRight()) and
+ // propagate taint from either the pointer or the offset, regardless of constantness
+ not iTo instanceof PointerArithmeticInstruction
+ )
+ }
+}
+
+module Flow = TaintTracking::Global;
+
+from DataFlow::Node source, DataFlow::Node sink, VariableAccess va, string cause, string effect
+where
+ Flow::flow(source, sink) and
+ isSource(source, cause) and
+ causeEffectCorrespond(cause, effect) and
+ isSink(sink, va, effect)
select va,
"$@ flows to an operand of an arithmetic expression, potentially causing an " + effect + ".",
- origin, "Extreme value"
+ source, "Extreme value"
diff --git a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql
index 19fe7df4c44..98c53828d2a 100644
--- a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql
+++ b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql
@@ -15,7 +15,11 @@
import cpp
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
-import semmle.code.cpp.ir.dataflow.internal.DefaultTaintTrackingImpl
+import semmle.code.cpp.dataflow.new.DataFlow
+import semmle.code.cpp.security.FlowSources as FS
+import semmle.code.cpp.dataflow.new.TaintTracking
+import semmle.code.cpp.ir.IR
+import semmle.code.cpp.controlflow.IRGuards as IRGuards
/** Holds if `expr` might overflow. */
predicate outOfBoundsExpr(Expr expr, string kind) {
@@ -27,13 +31,76 @@ predicate outOfBoundsExpr(Expr expr, string kind) {
else none()
}
-from Expr use, Expr origin, string kind
+predicate isSource(FS::FlowSource source, string sourceType) { sourceType = source.getSourceType() }
+
+predicate isSink(DataFlow::Node sink, string kind) {
+ exists(Expr use |
+ use = sink.asExpr() and
+ not use.getUnspecifiedType() instanceof PointerType and
+ outOfBoundsExpr(use, kind) and
+ not inSystemMacroExpansion(use)
+ )
+}
+
+predicate hasUpperBoundsCheck(Variable var) {
+ exists(RelationalOperation oper, VariableAccess access |
+ oper.getAnOperand() = access and
+ access.getTarget() = var and
+ // Comparing to 0 is not an upper bound check
+ not oper.getAnOperand().getValue() = "0"
+ )
+}
+
+predicate constantInstruction(Instruction instr) {
+ instr instanceof ConstantInstruction or
+ constantInstruction(instr.(UnaryInstruction).getUnary())
+}
+
+predicate readsVariable(LoadInstruction load, Variable var) {
+ load.getSourceAddress().(VariableAddressInstruction).getAstVariable() = var
+}
+
+predicate nodeIsBarrierEqualityCandidate(DataFlow::Node node, Operand access, Variable checkedVar) {
+ exists(Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ any(IRGuards::IRGuardCondition guard).ensuresEq(access, _, _, instr.getBlock(), true)
+ )
+}
+
+module Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) { isSource(source, _) }
+
+ predicate isSink(DataFlow::Node sink) { isSink(sink, _) }
+
+ predicate isBarrier(DataFlow::Node node) {
+ // Block flow if there's an upper bound check of the variable anywhere in the program
+ exists(Variable checkedVar, Instruction instr | instr = node.asInstruction() |
+ readsVariable(instr, checkedVar) and
+ hasUpperBoundsCheck(checkedVar)
+ )
+ or
+ // Block flow if the node is guarded by an equality check
+ exists(Variable checkedVar, Operand access |
+ nodeIsBarrierEqualityCandidate(node, access, checkedVar) and
+ readsVariable(access.getDef(), checkedVar)
+ )
+ or
+ // Block flow to any binary instruction whose operands are both non-constants.
+ exists(BinaryInstruction iTo |
+ iTo = node.asInstruction() and
+ not constantInstruction(iTo.getLeft()) and
+ not constantInstruction(iTo.getRight()) and
+ // propagate taint from either the pointer or the offset, regardless of constantness
+ not iTo instanceof PointerArithmeticInstruction
+ )
+ }
+}
+
+module Flow = TaintTracking::Global;
+
+from DataFlow::Node source, DataFlow::Node sink, string kind, string sourceType
where
- not use.getUnspecifiedType() instanceof PointerType and
- outOfBoundsExpr(use, kind) and
- tainted(origin, use) and
- origin != use and
- not inSystemMacroExpansion(use) and
- // Avoid double-counting: don't include all the conversions of `use`.
- not use instanceof Conversion
-select use, "$@ flows an expression which might " + kind + ".", origin, "User-provided value"
+ Flow::flow(source, sink) and
+ isSource(source, sourceType) and
+ isSink(sink, kind)
+select sink, "$@ flows an expression which might " + kind + ".", source, sourceType
diff --git a/cpp/ql/src/Summary/LinesOfCode.ql b/cpp/ql/src/Summary/LinesOfCode.ql
index 3b2aa2ac4c9..9e2cab4851b 100644
--- a/cpp/ql/src/Summary/LinesOfCode.ql
+++ b/cpp/ql/src/Summary/LinesOfCode.ql
@@ -4,6 +4,7 @@
* @description The total number of lines of C/C++ code across all files, including system headers, libraries, and auto-generated files. This is a useful metric of the size of a database. For all files that were seen during the build, this query counts the lines of code, excluding whitespace or comments.
* @kind metric
* @tags summary
+ * telemetry
*/
import cpp
diff --git a/cpp/ql/src/change-notes/2023-10-31-odbc-models.md b/cpp/ql/src/change-notes/2023-10-31-odbc-models.md
deleted file mode 100644
index c31883675b3..00000000000
--- a/cpp/ql/src/change-notes/2023-10-31-odbc-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added SQL API models for `ODBC`.
diff --git a/cpp/ql/src/change-notes/2023-11-16-tainted-format-string-through-global-deleted.md b/cpp/ql/src/change-notes/2023-11-16-tainted-format-string-through-global-deleted.md
new file mode 100644
index 00000000000..a4b3be355bc
--- /dev/null
+++ b/cpp/ql/src/change-notes/2023-11-16-tainted-format-string-through-global-deleted.md
@@ -0,0 +1,4 @@
+---
+category: breaking
+---
+* The `cpp/tainted-format-string-through-global` query has been deleted. This does not lead to a loss of relevant alerts, as the query duplicated a subset of the alerts from `cpp/tainted-format-string`.
diff --git a/cpp/ql/src/change-notes/2023-11-07-uninitialized-local.md b/cpp/ql/src/change-notes/released/0.8.3.md
similarity index 67%
rename from cpp/ql/src/change-notes/2023-11-07-uninitialized-local.md
rename to cpp/ql/src/change-notes/released/0.8.3.md
index bdb67692534..80a15f8fccc 100644
--- a/cpp/ql/src/change-notes/2023-11-07-uninitialized-local.md
+++ b/cpp/ql/src/change-notes/released/0.8.3.md
@@ -1,4 +1,5 @@
----
-category: minorAnalysis
----
+## 0.8.3
+
+### Minor Analysis Improvements
+
* The `cpp/uninitialized-local` query has been improved to produce fewer false positives.
diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml
index 404110129dc..b6e46394f37 100644
--- a/cpp/ql/src/codeql-pack.release.yml
+++ b/cpp/ql/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.8.2
+lastReleaseVersion: 0.8.3
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/AllAsymmetricAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/AllAsymmetricAlgorithms.ql
index 138664b7665..275049d8aea 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/AllAsymmetricAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/AllAsymmetricAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/all-asymmetric-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/AllCryptoAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/AllCryptoAlgorithms.ql
index 1fe71b00a58..41c3d625a70 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/AllCryptoAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/AllCryptoAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/all-cryptographic-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/AsymmetricEncryptionAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/AsymmetricEncryptionAlgorithms.ql
index 29e429af95f..4edafed9499 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/AsymmetricEncryptionAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/AsymmetricEncryptionAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/all-asymmetric-encryption-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/AuthenticatedEncryptionAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/AuthenticatedEncryptionAlgorithms.ql
index d855e50ea88..cbf62036359 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/AuthenticatedEncryptionAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/AuthenticatedEncryptionAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/authenticated-encryption-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeAlgorithms.ql
index 36b5d52a7c1..33cb44742d2 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/block-cipher-mode
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeKnownIVsOrNonces.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeKnownIVsOrNonces.ql
index 6b91e84edba..9bfafee3696 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeKnownIVsOrNonces.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeKnownIVsOrNonces.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/iv-sources
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeUnknownIVsOrNonces.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeUnknownIVsOrNonces.ql
index 6acf3bb598f..4d54d6acce5 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeUnknownIVsOrNonces.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/BlockModeUnknownIVsOrNonces.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/unkown-iv-sources
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithmSize.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithmSize.ql
index ad9206b5ba4..4fbe4cc881a 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithmSize.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithmSize.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/elliptic-curve-key-length
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithms.ql
index 06aa44cd1bb..79d4ab7750a 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/EllipticCurveAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/elliptic-curve-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/HashingAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/HashingAlgorithms.ql
index 175ba39e138..17541f45177 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/HashingAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/HashingAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/hash-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/KeyExchangeAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/KeyExchangeAlgorithms.ql
index 7f7ceb17c39..193a895f30e 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/KeyExchangeAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/KeyExchangeAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/key-exchange
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/KnownAsymmetricKeyGeneration.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/KnownAsymmetricKeyGeneration.ql
index 34fca159fdb..240c6e6c8ca 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/KnownAsymmetricKeyGeneration.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/KnownAsymmetricKeyGeneration.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/asymmetric-key-generation
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/SigningAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/SigningAlgorithms.ql
index b052e48a664..fa79d6635d9 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/SigningAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/SigningAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/signing-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/SymmetricEncryptionAlgorithms.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/SymmetricEncryptionAlgorithms.ql
index 2a4c3f1056a..4d518d09058 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/SymmetricEncryptionAlgorithms.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/SymmetricEncryptionAlgorithms.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/symmetric-encryption-algorithms
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/experimental/cryptography/inventory/new_models/UnknownAsymmetricKeyGeneration.ql b/cpp/ql/src/experimental/cryptography/inventory/new_models/UnknownAsymmetricKeyGeneration.ql
index 63ab3fdcffb..6c1018ecc2a 100644
--- a/cpp/ql/src/experimental/cryptography/inventory/new_models/UnknownAsymmetricKeyGeneration.ql
+++ b/cpp/ql/src/experimental/cryptography/inventory/new_models/UnknownAsymmetricKeyGeneration.ql
@@ -4,7 +4,6 @@
* @kind problem
* @id cpp/quantum-readiness/cbom/unkwon-asymmetric-key-generation
* @problem.severity error
- * @precision high
* @tags cbom
* cryptography
*/
diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml
index 7f07ad77a21..72f1a8849e0 100644
--- a/cpp/ql/src/qlpack.yml
+++ b/cpp/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-queries
-version: 0.8.3-dev
+version: 0.8.4-dev
groups:
- cpp
- queries
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/TestBase.qll b/cpp/ql/test/library-tests/dataflow/dataflow-tests/TestBase.qll
new file mode 100644
index 00000000000..528e7ca6ad3
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/TestBase.qll
@@ -0,0 +1,111 @@
+module AstTest {
+ import semmle.code.cpp.dataflow.DataFlow
+ private import semmle.code.cpp.controlflow.Guards
+
+ /**
+ * A `BarrierGuard` that stops flow to all occurrences of `x` within statement
+ * S in `if (guarded(x)) S`.
+ */
+ // This is tested in `BarrierGuard.cpp`.
+ predicate testBarrierGuard(GuardCondition g, Expr checked, boolean isTrue) {
+ g.(FunctionCall).getTarget().getName() = "guarded" and
+ checked = g.(FunctionCall).getArgument(0) and
+ isTrue = true
+ }
+
+ /** Common data flow configuration to be used by tests. */
+ module AstTestAllocationConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asExpr().(FunctionCall).getTarget().getName() = "source"
+ or
+ source.asParameter().getName().matches("source%")
+ or
+ source.asExpr().(FunctionCall).getTarget().getName() = "indirect_source"
+ or
+ source.(DataFlow::DefinitionByReferenceNode).getParameter().getName().matches("ref_source%")
+ or
+ // Track uninitialized variables
+ exists(source.asUninitialized())
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call |
+ call.getTarget().getName() = ["sink", "indirect_sink"] and
+ sink.asExpr() = call.getAnArgument()
+ )
+ }
+
+ predicate isBarrier(DataFlow::Node barrier) {
+ barrier.asExpr().(VariableAccess).getTarget().hasName("barrier") or
+ barrier = DataFlow::BarrierGuard::getABarrierNode()
+ }
+ }
+
+ module AstFlow = DataFlow::Global;
+}
+
+module IRTest {
+ private import cpp
+ import semmle.code.cpp.ir.dataflow.DataFlow
+ private import semmle.code.cpp.ir.IR
+ private import semmle.code.cpp.controlflow.IRGuards
+
+ /**
+ * A `BarrierGuard` that stops flow to all occurrences of `x` within statement
+ * S in `if (guarded(x)) S`.
+ */
+ // This is tested in `BarrierGuard.cpp`.
+ predicate testBarrierGuard(IRGuardCondition g, Expr checked, boolean isTrue) {
+ exists(Call call |
+ call = g.getUnconvertedResultExpression() and
+ call.getTarget().hasName("guarded") and
+ checked = call.getArgument(0) and
+ isTrue = true
+ )
+ }
+
+ /** Common data flow configuration to be used by tests. */
+ module IRTestAllocationConfig implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asExpr().(FunctionCall).getTarget().getName() = "source"
+ or
+ source.asIndirectExpr(1).(FunctionCall).getTarget().getName() = "indirect_source"
+ or
+ source.asExpr().(StringLiteral).getValue() = "source"
+ or
+ // indirect_source(n) gives the dataflow node representing the indirect node after n dereferences.
+ exists(int n, string s |
+ n = s.regexpCapture("indirect_source\\((\\d)\\)", 1).toInt() and
+ source.asIndirectExpr(n).(StringLiteral).getValue() = s
+ )
+ or
+ source.asParameter().getName().matches("source%")
+ or
+ source.(DataFlow::DefinitionByReferenceNode).getParameter().getName().matches("ref_source%")
+ or
+ exists(source.asUninitialized())
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ exists(FunctionCall call, Expr e | e = call.getAnArgument() |
+ call.getTarget().getName() = "sink" and
+ sink.asExpr() = e
+ or
+ call.getTarget().getName() = "indirect_sink" and
+ sink.asIndirectExpr() = e
+ )
+ }
+
+ predicate isBarrier(DataFlow::Node barrier) {
+ exists(Expr barrierExpr | barrierExpr in [barrier.asExpr(), barrier.asIndirectExpr()] |
+ barrierExpr.(VariableAccess).getTarget().hasName("barrier")
+ )
+ or
+ barrier = DataFlow::BarrierGuard::getABarrierNode()
+ or
+ barrier = DataFlow::BarrierGuard::getAnIndirectBarrierNode()
+ }
+ }
+
+ module IRFlow = DataFlow::Global;
+}
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
index da59987d742..a98cfd7e22a 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
@@ -1,5 +1,11 @@
uniqueEnclosingCallable
+| test.cpp:864:44:864:58 | {...} | Node should have one enclosing callable but has 0. |
+| test.cpp:864:47:864:54 | call to source | Node should have one enclosing callable but has 0. |
+| test.cpp:872:46:872:51 | call to source | Node should have one enclosing callable but has 0. |
+| test.cpp:872:53:872:56 | 1 | Node should have one enclosing callable but has 0. |
uniqueCallEnclosingCallable
+| test.cpp:864:47:864:54 | call to source | Call should have one enclosing callable but has 0. |
+| test.cpp:872:46:872:51 | call to source | Call should have one enclosing callable but has 0. |
uniqueType
uniqueNodeLocation
missingLocation
@@ -24,6 +30,7 @@ argHasPostUpdate
| lambdas.cpp:45:2:45:2 | e | ArgumentNode is missing PostUpdateNode. |
| test.cpp:67:29:67:35 | source1 | ArgumentNode is missing PostUpdateNode. |
| test.cpp:813:19:813:35 | * ... | ArgumentNode is missing PostUpdateNode. |
+| test.cpp:848:23:848:25 | rpx | ArgumentNode is missing PostUpdateNode. |
postWithInFlow
| BarrierGuard.cpp:49:6:49:6 | x [post update] | PostUpdateNode should not be the target of local flow. |
| BarrierGuard.cpp:60:7:60:7 | x [post update] | PostUpdateNode should not be the target of local flow. |
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected
new file mode 100644
index 00000000000..c98bc68c884
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected
@@ -0,0 +1,306 @@
+WARNING: Module DataFlow has been deprecated and may be removed in future (test-source-sink.ql:3,25-42)
+WARNING: Module DataFlow has been deprecated and may be removed in future (test-source-sink.ql:3,57-74)
+astFlow
+| BarrierGuard.cpp:5:19:5:24 | source | BarrierGuard.cpp:9:10:9:15 | source |
+| BarrierGuard.cpp:13:17:13:22 | source | BarrierGuard.cpp:15:10:15:15 | source |
+| BarrierGuard.cpp:21:17:21:22 | source | BarrierGuard.cpp:25:10:25:15 | source |
+| BarrierGuard.cpp:29:16:29:21 | source | BarrierGuard.cpp:31:10:31:15 | source |
+| BarrierGuard.cpp:29:16:29:21 | source | BarrierGuard.cpp:33:10:33:15 | source |
+| BarrierGuard.cpp:49:10:49:15 | call to source | BarrierGuard.cpp:51:13:51:13 | x |
+| BarrierGuard.cpp:49:10:49:15 | call to source | BarrierGuard.cpp:53:13:53:13 | x |
+| BarrierGuard.cpp:49:10:49:15 | call to source | BarrierGuard.cpp:55:13:55:13 | x |
+| BarrierGuard.cpp:60:11:60:16 | call to source | BarrierGuard.cpp:62:14:62:14 | x |
+| BarrierGuard.cpp:60:11:60:16 | call to source | BarrierGuard.cpp:64:14:64:14 | x |
+| BarrierGuard.cpp:60:11:60:16 | call to source | BarrierGuard.cpp:66:14:66:14 | x |
+| acrossLinkTargets.cpp:19:27:19:32 | call to source | acrossLinkTargets.cpp:12:8:12:8 | x |
+| clang.cpp:12:9:12:20 | sourceArray1 | clang.cpp:18:8:18:19 | sourceArray1 |
+| clang.cpp:12:9:12:20 | sourceArray1 | clang.cpp:22:8:22:20 | & ... |
+| clang.cpp:12:9:12:20 | sourceArray1 | clang.cpp:23:17:23:29 | & ... |
+| clang.cpp:29:27:29:32 | call to source | clang.cpp:30:27:30:28 | m1 |
+| clang.cpp:29:27:29:32 | call to source | clang.cpp:31:27:31:34 | call to getFirst |
+| clang.cpp:35:32:35:37 | call to source | clang.cpp:38:10:38:11 | m2 |
+| clang.cpp:44:35:44:40 | call to source | clang.cpp:46:17:46:18 | m2 |
+| clang.cpp:51:19:51:24 | call to source | clang.cpp:52:8:52:17 | stackArray |
+| clang.cpp:51:19:51:24 | call to source | clang.cpp:53:17:53:26 | stackArray |
+| dispatch.cpp:9:37:9:42 | call to source | dispatch.cpp:35:16:35:25 | call to notSource1 |
+| dispatch.cpp:9:37:9:42 | call to source | dispatch.cpp:43:15:43:24 | call to notSource1 |
+| dispatch.cpp:10:37:10:42 | call to source | dispatch.cpp:36:16:36:25 | call to notSource2 |
+| dispatch.cpp:10:37:10:42 | call to source | dispatch.cpp:44:15:44:24 | call to notSource2 |
+| dispatch.cpp:37:19:37:24 | call to source | dispatch.cpp:11:38:11:38 | x |
+| dispatch.cpp:45:18:45:23 | call to source | dispatch.cpp:11:38:11:38 | x |
+| globals.cpp:5:17:5:22 | call to source | globals.cpp:6:10:6:14 | local |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:14:3:14:6 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:18:8:18:8 | call to operator() |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:21:3:21:6 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:29:3:29:6 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:35:8:35:8 | a |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:41:8:41:8 | a |
+| lambdas.cpp:43:7:43:12 | call to source | lambdas.cpp:46:7:46:7 | w |
+| ref.cpp:29:11:29:16 | call to source | ref.cpp:62:10:62:11 | x3 |
+| ref.cpp:53:9:53:10 | x1 | ref.cpp:56:10:56:11 | x1 |
+| ref.cpp:53:13:53:14 | x2 | ref.cpp:59:10:59:11 | x2 |
+| ref.cpp:53:17:53:18 | x3 | ref.cpp:62:10:62:11 | x3 |
+| ref.cpp:53:21:53:22 | x4 | ref.cpp:65:10:65:11 | x4 |
+| ref.cpp:55:23:55:28 | call to source | ref.cpp:56:10:56:11 | x1 |
+| ref.cpp:94:15:94:20 | call to source | ref.cpp:129:13:129:15 | val |
+| ref.cpp:109:15:109:20 | call to source | ref.cpp:132:13:132:15 | val |
+| ref.cpp:122:23:122:28 | call to source | ref.cpp:123:13:123:15 | val |
+| ref.cpp:125:19:125:24 | call to source | ref.cpp:126:13:126:15 | val |
+| self-Iterator.cpp:19:23:19:28 | call to source | self-Iterator.cpp:20:10:20:10 | x |
+| test.cpp:6:12:6:17 | call to source | test.cpp:7:8:7:9 | t1 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:9:8:9:9 | t1 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:10:8:10:9 | t2 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:15:8:15:9 | t2 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:26:8:26:9 | t1 |
+| test.cpp:35:10:35:15 | call to source | test.cpp:30:8:30:8 | t |
+| test.cpp:36:13:36:18 | call to source | test.cpp:31:8:31:8 | c |
+| test.cpp:50:14:50:19 | call to source | test.cpp:58:10:58:10 | t |
+| test.cpp:66:30:66:36 | source1 | test.cpp:71:8:71:9 | x4 |
+| test.cpp:75:7:75:8 | u1 | test.cpp:76:8:76:9 | u1 |
+| test.cpp:83:7:83:8 | u2 | test.cpp:84:8:84:18 | ... ? ... : ... |
+| test.cpp:83:7:83:8 | u2 | test.cpp:86:8:86:9 | i1 |
+| test.cpp:89:28:89:34 | source1 | test.cpp:90:8:90:14 | source1 |
+| test.cpp:100:13:100:18 | call to source | test.cpp:103:10:103:12 | ref |
+| test.cpp:138:27:138:32 | call to source | test.cpp:140:8:140:8 | y |
+| test.cpp:151:33:151:38 | call to source | test.cpp:144:8:144:8 | s |
+| test.cpp:151:33:151:38 | call to source | test.cpp:152:8:152:8 | y |
+| test.cpp:164:34:164:39 | call to source | test.cpp:157:8:157:8 | x |
+| test.cpp:164:34:164:39 | call to source | test.cpp:165:8:165:8 | y |
+| test.cpp:171:11:171:16 | call to source | test.cpp:178:8:178:8 | y |
+| test.cpp:245:14:245:19 | call to source | test.cpp:260:12:260:12 | x |
+| test.cpp:265:22:265:27 | call to source | test.cpp:266:12:266:12 | x |
+| test.cpp:305:17:305:22 | call to source | test.cpp:289:14:289:14 | x |
+| test.cpp:314:4:314:9 | call to source | test.cpp:318:7:318:7 | x |
+| test.cpp:347:17:347:22 | call to source | test.cpp:349:10:349:18 | globalVar |
+| test.cpp:359:13:359:18 | call to source | test.cpp:365:10:365:14 | field |
+| test.cpp:373:13:373:18 | call to source | test.cpp:369:10:369:14 | field |
+| test.cpp:373:13:373:18 | call to source | test.cpp:375:10:375:14 | field |
+| test.cpp:382:48:382:54 | source1 | test.cpp:385:8:385:10 | tmp |
+| test.cpp:388:53:388:59 | source1 | test.cpp:392:8:392:10 | tmp |
+| test.cpp:388:53:388:59 | source1 | test.cpp:394:10:394:12 | tmp |
+| test.cpp:399:7:399:9 | tmp | test.cpp:401:8:401:10 | tmp |
+| test.cpp:405:7:405:9 | tmp | test.cpp:408:8:408:10 | tmp |
+| test.cpp:416:7:416:11 | local | test.cpp:418:8:418:12 | local |
+| test.cpp:417:16:417:20 | ref arg local | test.cpp:418:8:418:12 | local |
+| test.cpp:422:7:422:11 | local | test.cpp:424:8:424:12 | local |
+| test.cpp:423:20:423:25 | ref arg & ... | test.cpp:424:8:424:12 | local |
+| test.cpp:433:7:433:11 | local | test.cpp:435:8:435:12 | local |
+| test.cpp:433:7:433:11 | local | test.cpp:436:8:436:13 | * ... |
+| test.cpp:434:20:434:24 | ref arg local | test.cpp:435:8:435:12 | local |
+| test.cpp:434:20:434:24 | ref arg local | test.cpp:436:8:436:13 | * ... |
+| test.cpp:440:7:440:11 | local | test.cpp:442:8:442:12 | local |
+| test.cpp:441:18:441:23 | ref arg & ... | test.cpp:442:8:442:12 | local |
+| test.cpp:448:7:448:11 | local | test.cpp:450:8:450:12 | local |
+| test.cpp:448:7:448:11 | local | test.cpp:451:8:451:13 | * ... |
+| test.cpp:449:18:449:22 | ref arg local | test.cpp:450:8:450:12 | local |
+| test.cpp:449:18:449:22 | ref arg local | test.cpp:451:8:451:13 | * ... |
+| test.cpp:456:26:456:32 | source1 | test.cpp:457:9:457:22 | (statement expression) |
+| test.cpp:456:26:456:32 | source1 | test.cpp:468:8:468:12 | local |
+| test.cpp:472:8:472:13 | call to source | test.cpp:478:8:478:8 | x |
+| test.cpp:506:8:506:13 | call to source | test.cpp:513:8:513:8 | x |
+| test.cpp:517:7:517:16 | stackArray | test.cpp:521:8:521:20 | access to array |
+| test.cpp:519:19:519:24 | call to source | test.cpp:521:8:521:20 | access to array |
+| test.cpp:551:9:551:9 | y | test.cpp:541:10:541:10 | y |
+| test.cpp:583:11:583:16 | call to source | test.cpp:590:8:590:8 | x |
+| test.cpp:628:20:628:25 | ref arg buffer | test.cpp:629:17:629:22 | buffer |
+| test.cpp:633:18:633:23 | call to source | test.cpp:634:8:634:8 | x |
+| test.cpp:702:38:702:43 | source | test.cpp:695:8:695:10 | buf |
+| test.cpp:726:11:726:16 | call to source | test.cpp:735:8:735:8 | x |
+| test.cpp:733:7:733:7 | x | test.cpp:735:8:735:8 | x |
+| test.cpp:749:27:749:32 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:751:27:751:32 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:753:32:753:37 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:755:32:755:37 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:769:27:769:32 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:771:27:771:32 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:773:32:773:37 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:775:32:775:37 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:788:31:788:36 | call to source | test.cpp:782:12:782:12 | x |
+| test.cpp:790:31:790:36 | call to source | test.cpp:782:12:782:12 | x |
+| test.cpp:797:22:797:28 | ref arg content | test.cpp:798:19:798:25 | content |
+| test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y |
+| test.cpp:846:13:846:27 | call to indirect_source | test.cpp:848:23:848:25 | rpx |
+| test.cpp:860:54:860:59 | call to source | test.cpp:861:10:861:37 | static_local_pointer_dynamic |
+| true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x |
+| true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x |
+| true_upon_entry.cpp:33:11:33:16 | call to source | true_upon_entry.cpp:39:8:39:8 | x |
+| true_upon_entry.cpp:43:11:43:16 | call to source | true_upon_entry.cpp:49:8:49:8 | x |
+| true_upon_entry.cpp:54:11:54:16 | call to source | true_upon_entry.cpp:57:8:57:8 | x |
+| true_upon_entry.cpp:70:11:70:16 | call to source | true_upon_entry.cpp:78:8:78:8 | x |
+| true_upon_entry.cpp:83:11:83:16 | call to source | true_upon_entry.cpp:86:8:86:8 | x |
+irFlow
+| BarrierGuard.cpp:5:19:5:24 | source | BarrierGuard.cpp:9:10:9:15 | source |
+| BarrierGuard.cpp:13:17:13:22 | source | BarrierGuard.cpp:15:10:15:15 | source |
+| BarrierGuard.cpp:21:17:21:22 | source | BarrierGuard.cpp:25:10:25:15 | source |
+| BarrierGuard.cpp:29:16:29:21 | source | BarrierGuard.cpp:31:10:31:15 | source |
+| BarrierGuard.cpp:29:16:29:21 | source | BarrierGuard.cpp:33:10:33:15 | source |
+| BarrierGuard.cpp:49:10:49:15 | call to source | BarrierGuard.cpp:53:13:53:13 | x |
+| BarrierGuard.cpp:49:10:49:15 | call to source | BarrierGuard.cpp:55:13:55:13 | x |
+| BarrierGuard.cpp:60:11:60:16 | call to source | BarrierGuard.cpp:64:14:64:14 | x |
+| BarrierGuard.cpp:60:11:60:16 | call to source | BarrierGuard.cpp:66:14:66:14 | x |
+| acrossLinkTargets.cpp:19:27:19:32 | call to source | acrossLinkTargets.cpp:12:8:12:8 | x |
+| clang.cpp:12:9:12:20 | sourceArray1 | clang.cpp:18:8:18:19 | sourceArray1 |
+| clang.cpp:12:9:12:20 | sourceArray1 | clang.cpp:23:17:23:29 | & ... indirection |
+| clang.cpp:29:27:29:32 | call to source | clang.cpp:30:27:30:28 | m1 |
+| clang.cpp:29:27:29:32 | call to source | clang.cpp:31:27:31:34 | call to getFirst |
+| clang.cpp:35:32:35:37 | call to source | clang.cpp:38:10:38:11 | m2 |
+| clang.cpp:40:42:40:47 | call to source | clang.cpp:42:18:42:19 | m2 |
+| clang.cpp:44:35:44:40 | call to source | clang.cpp:46:17:46:18 | m2 |
+| clang.cpp:50:7:50:16 | definition of stackArray | clang.cpp:52:8:52:17 | stackArray |
+| clang.cpp:50:25:50:30 | call to source | clang.cpp:53:17:53:26 | stackArray indirection |
+| clang.cpp:50:35:50:40 | call to source | clang.cpp:53:17:53:26 | stackArray indirection |
+| clang.cpp:51:19:51:24 | call to source | clang.cpp:53:17:53:26 | stackArray indirection |
+| dispatch.cpp:9:37:9:42 | call to source | dispatch.cpp:35:16:35:25 | call to notSource1 |
+| dispatch.cpp:9:37:9:42 | call to source | dispatch.cpp:43:15:43:24 | call to notSource1 |
+| dispatch.cpp:10:37:10:42 | call to source | dispatch.cpp:36:16:36:25 | call to notSource2 |
+| dispatch.cpp:10:37:10:42 | call to source | dispatch.cpp:44:15:44:24 | call to notSource2 |
+| dispatch.cpp:16:37:16:42 | call to source | dispatch.cpp:32:16:32:24 | call to isSource2 |
+| dispatch.cpp:16:37:16:42 | call to source | dispatch.cpp:40:15:40:23 | call to isSource2 |
+| dispatch.cpp:22:37:22:42 | call to source | dispatch.cpp:31:16:31:24 | call to isSource1 |
+| dispatch.cpp:22:37:22:42 | call to source | dispatch.cpp:39:15:39:23 | call to isSource1 |
+| dispatch.cpp:22:37:22:42 | call to source | dispatch.cpp:55:22:55:30 | call to isSource1 |
+| dispatch.cpp:22:37:22:42 | call to source | dispatch.cpp:58:28:58:36 | call to isSource1 |
+| dispatch.cpp:33:18:33:23 | call to source | dispatch.cpp:23:38:23:38 | x |
+| dispatch.cpp:37:19:37:24 | call to source | dispatch.cpp:11:38:11:38 | x |
+| dispatch.cpp:41:17:41:22 | call to source | dispatch.cpp:23:38:23:38 | x |
+| dispatch.cpp:45:18:45:23 | call to source | dispatch.cpp:11:38:11:38 | x |
+| dispatch.cpp:69:15:69:20 | call to source | dispatch.cpp:23:38:23:38 | x |
+| dispatch.cpp:73:14:73:19 | call to source | dispatch.cpp:23:38:23:38 | x |
+| dispatch.cpp:81:13:81:18 | call to source | dispatch.cpp:23:38:23:38 | x |
+| dispatch.cpp:107:17:107:22 | call to source | dispatch.cpp:96:8:96:8 | x |
+| dispatch.cpp:140:8:140:13 | call to source | dispatch.cpp:96:8:96:8 | x |
+| dispatch.cpp:144:8:144:13 | call to source | dispatch.cpp:96:8:96:8 | x |
+| flowOut.cpp:5:16:5:21 | call to source | flowOut.cpp:19:9:19:9 | x |
+| globals.cpp:5:17:5:22 | call to source | globals.cpp:6:10:6:14 | local |
+| globals.cpp:13:23:13:28 | call to source | globals.cpp:12:10:12:24 | flowTestGlobal1 |
+| globals.cpp:23:23:23:28 | call to source | globals.cpp:19:10:19:24 | flowTestGlobal2 |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:14:8:14:8 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:18:8:18:8 | call to operator() |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:21:8:21:8 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:29:8:29:8 | t |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:35:8:35:8 | a |
+| lambdas.cpp:8:10:8:15 | call to source | lambdas.cpp:41:8:41:8 | a |
+| lambdas.cpp:43:7:43:12 | call to source | lambdas.cpp:46:7:46:7 | w |
+| ref.cpp:29:11:29:16 | call to source | ref.cpp:62:10:62:11 | x3 |
+| ref.cpp:53:9:53:10 | definition of x1 | ref.cpp:56:10:56:11 | x1 |
+| ref.cpp:53:13:53:14 | definition of x2 | ref.cpp:59:10:59:11 | x2 |
+| ref.cpp:53:17:53:18 | definition of x3 | ref.cpp:62:10:62:11 | x3 |
+| ref.cpp:53:21:53:22 | definition of x4 | ref.cpp:65:10:65:11 | x4 |
+| ref.cpp:55:23:55:28 | call to source | ref.cpp:56:10:56:11 | x1 |
+| ref.cpp:94:15:94:20 | call to source | ref.cpp:129:13:129:15 | val |
+| ref.cpp:109:15:109:20 | call to source | ref.cpp:132:13:132:15 | val |
+| ref.cpp:122:23:122:28 | call to source | ref.cpp:123:13:123:15 | val |
+| ref.cpp:125:19:125:24 | call to source | ref.cpp:126:13:126:15 | val |
+| self-Iterator.cpp:19:23:19:30 | call to source | self-Iterator.cpp:20:10:20:10 | x |
+| test.cpp:6:12:6:17 | call to source | test.cpp:7:8:7:9 | t1 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:9:8:9:9 | t1 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:10:8:10:9 | t2 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:15:8:15:9 | t2 |
+| test.cpp:6:12:6:17 | call to source | test.cpp:26:8:26:9 | t1 |
+| test.cpp:35:10:35:15 | call to source | test.cpp:30:8:30:8 | t |
+| test.cpp:36:13:36:18 | call to source | test.cpp:31:8:31:8 | c |
+| test.cpp:50:14:50:19 | call to source | test.cpp:58:10:58:10 | t |
+| test.cpp:66:30:66:36 | source1 | test.cpp:71:8:71:9 | x4 |
+| test.cpp:75:7:75:8 | definition of u1 | test.cpp:76:8:76:9 | u1 |
+| test.cpp:83:7:83:8 | definition of u2 | test.cpp:84:8:84:18 | ... ? ... : ... |
+| test.cpp:83:7:83:8 | definition of u2 | test.cpp:86:8:86:9 | i1 |
+| test.cpp:89:28:89:34 | source1 indirection | test.cpp:90:8:90:14 | source1 |
+| test.cpp:100:13:100:18 | call to source | test.cpp:103:10:103:12 | ref |
+| test.cpp:138:27:138:32 | call to source | test.cpp:140:8:140:8 | y |
+| test.cpp:151:33:151:38 | call to source | test.cpp:144:8:144:8 | s |
+| test.cpp:151:33:151:38 | call to source | test.cpp:152:8:152:8 | y |
+| test.cpp:164:34:164:39 | call to source | test.cpp:157:8:157:8 | x |
+| test.cpp:164:34:164:39 | call to source | test.cpp:165:8:165:8 | y |
+| test.cpp:171:11:171:16 | call to source | test.cpp:178:8:178:8 | y |
+| test.cpp:245:14:245:19 | call to source | test.cpp:260:12:260:12 | x |
+| test.cpp:265:22:265:27 | call to source | test.cpp:266:12:266:12 | x |
+| test.cpp:305:17:305:22 | call to source | test.cpp:289:14:289:14 | x |
+| test.cpp:314:4:314:9 | call to source | test.cpp:318:7:318:7 | x |
+| test.cpp:333:17:333:22 | call to source | test.cpp:337:10:337:18 | globalVar |
+| test.cpp:333:17:333:22 | call to source | test.cpp:339:10:339:18 | globalVar |
+| test.cpp:333:17:333:22 | call to source | test.cpp:343:10:343:18 | globalVar |
+| test.cpp:333:17:333:22 | call to source | test.cpp:349:10:349:18 | globalVar |
+| test.cpp:347:17:347:22 | call to source | test.cpp:337:10:337:18 | globalVar |
+| test.cpp:347:17:347:22 | call to source | test.cpp:339:10:339:18 | globalVar |
+| test.cpp:347:17:347:22 | call to source | test.cpp:343:10:343:18 | globalVar |
+| test.cpp:347:17:347:22 | call to source | test.cpp:349:10:349:18 | globalVar |
+| test.cpp:359:13:359:18 | call to source | test.cpp:365:10:365:14 | field |
+| test.cpp:373:13:373:18 | call to source | test.cpp:369:10:369:14 | field |
+| test.cpp:373:13:373:18 | call to source | test.cpp:375:10:375:14 | field |
+| test.cpp:382:48:382:54 | source1 | test.cpp:385:8:385:10 | tmp |
+| test.cpp:388:53:388:59 | source1 | test.cpp:392:8:392:10 | tmp |
+| test.cpp:388:53:388:59 | source1 | test.cpp:394:10:394:12 | tmp |
+| test.cpp:399:7:399:9 | definition of tmp | test.cpp:401:8:401:10 | tmp |
+| test.cpp:405:7:405:9 | definition of tmp | test.cpp:408:8:408:10 | tmp |
+| test.cpp:416:7:416:11 | definition of local | test.cpp:418:8:418:12 | local |
+| test.cpp:417:16:417:20 | intRefSource output argument | test.cpp:418:8:418:12 | local |
+| test.cpp:422:7:422:11 | definition of local | test.cpp:424:8:424:12 | local |
+| test.cpp:423:20:423:25 | intPointerSource output argument | test.cpp:424:8:424:12 | local |
+| test.cpp:433:7:433:11 | definition of local | test.cpp:435:8:435:12 | local |
+| test.cpp:434:20:434:24 | intPointerSource output argument | test.cpp:436:8:436:13 | * ... |
+| test.cpp:440:7:440:11 | definition of local | test.cpp:442:8:442:12 | local |
+| test.cpp:441:18:441:23 | intArraySource output argument | test.cpp:442:8:442:12 | local |
+| test.cpp:448:7:448:11 | definition of local | test.cpp:450:8:450:12 | local |
+| test.cpp:449:18:449:22 | intArraySource output argument | test.cpp:451:8:451:13 | * ... |
+| test.cpp:456:26:456:32 | source1 | test.cpp:457:9:457:22 | (statement expression) |
+| test.cpp:456:26:456:32 | source1 | test.cpp:468:8:468:12 | local |
+| test.cpp:472:8:472:13 | call to source | test.cpp:478:8:478:8 | x |
+| test.cpp:506:8:506:13 | call to source | test.cpp:513:8:513:8 | x |
+| test.cpp:519:19:519:24 | call to source | test.cpp:521:8:521:20 | access to array |
+| test.cpp:531:29:531:34 | call to source | test.cpp:532:8:532:9 | * ... |
+| test.cpp:547:9:547:9 | definition of x | test.cpp:536:10:536:11 | * ... |
+| test.cpp:551:9:551:9 | definition of y | test.cpp:541:10:541:10 | y |
+| test.cpp:562:17:562:31 | call to indirect_source indirection | test.cpp:566:10:566:19 | * ... |
+| test.cpp:562:17:562:31 | call to indirect_source indirection | test.cpp:568:10:568:19 | * ... |
+| test.cpp:562:17:562:31 | call to indirect_source indirection | test.cpp:572:10:572:19 | * ... |
+| test.cpp:562:17:562:31 | call to indirect_source indirection | test.cpp:578:10:578:19 | * ... |
+| test.cpp:576:17:576:31 | call to indirect_source indirection | test.cpp:566:10:566:19 | * ... |
+| test.cpp:576:17:576:31 | call to indirect_source indirection | test.cpp:568:10:568:19 | * ... |
+| test.cpp:576:17:576:31 | call to indirect_source indirection | test.cpp:572:10:572:19 | * ... |
+| test.cpp:576:17:576:31 | call to indirect_source indirection | test.cpp:578:10:578:19 | * ... |
+| test.cpp:594:12:594:26 | call to indirect_source indirection | test.cpp:597:8:597:13 | * ... |
+| test.cpp:601:20:601:20 | intPointerSource output argument | test.cpp:603:8:603:9 | * ... |
+| test.cpp:607:20:607:20 | intPointerSource output argument | test.cpp:609:8:609:9 | * ... |
+| test.cpp:614:20:614:20 | intPointerSource output argument | test.cpp:616:8:616:17 | * ... |
+| test.cpp:628:20:628:25 | intPointerSource output argument | test.cpp:629:17:629:22 | buffer indirection |
+| test.cpp:633:18:633:23 | call to source | test.cpp:634:8:634:8 | x |
+| test.cpp:646:7:646:12 | call to source | test.cpp:645:8:645:8 | x |
+| test.cpp:660:7:660:12 | call to source | test.cpp:658:8:658:8 | x |
+| test.cpp:664:18:664:23 | call to source | test.cpp:666:8:666:16 | * ... |
+| test.cpp:681:7:681:12 | call to source | test.cpp:679:8:679:16 | * ... |
+| test.cpp:733:7:733:7 | definition of x | test.cpp:735:8:735:8 | x |
+| test.cpp:751:27:751:32 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:753:32:753:37 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:755:32:755:37 | call to source | test.cpp:740:10:740:10 | x |
+| test.cpp:771:27:771:32 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:773:32:773:37 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:775:32:775:37 | call to source | test.cpp:760:10:760:10 | x |
+| test.cpp:788:31:788:36 | call to source | test.cpp:782:12:782:12 | x |
+| test.cpp:790:31:790:36 | call to source | test.cpp:782:12:782:12 | x |
+| test.cpp:797:22:797:28 | intPointerSource output argument | test.cpp:798:19:798:25 | content indirection |
+| test.cpp:808:25:808:39 | call to indirect_source indirection | test.cpp:813:19:813:35 | * ... indirection |
+| test.cpp:818:26:818:31 | call to source | test.cpp:823:10:823:27 | * ... |
+| test.cpp:832:21:832:26 | call to source | test.cpp:836:10:836:22 | global_direct |
+| test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y |
+| test.cpp:846:13:846:27 | call to indirect_source indirection | test.cpp:848:17:848:25 | rpx indirection |
+| test.cpp:853:55:853:62 | call to source | test.cpp:854:10:854:36 | * ... |
+| test.cpp:860:54:860:59 | call to source | test.cpp:861:10:861:37 | static_local_pointer_dynamic |
+| test.cpp:872:46:872:51 | call to source | test.cpp:875:10:875:31 | global_pointer_dynamic |
+| test.cpp:880:64:880:83 | indirect_source(1) indirection | test.cpp:883:10:883:45 | static_local_array_static_indirect_1 |
+| test.cpp:881:64:881:83 | indirect_source(2) indirection | test.cpp:886:19:886:54 | static_local_array_static_indirect_2 indirection |
+| test.cpp:890:54:890:61 | source | test.cpp:893:10:893:36 | static_local_pointer_static |
+| test.cpp:891:65:891:84 | indirect_source(1) indirection | test.cpp:895:19:895:56 | static_local_pointer_static_indirect_1 indirection |
+| test.cpp:901:56:901:75 | indirect_source(1) indirection | test.cpp:907:10:907:39 | global_array_static_indirect_1 |
+| test.cpp:902:56:902:75 | indirect_source(2) indirection | test.cpp:911:19:911:48 | global_array_static_indirect_2 indirection |
+| test.cpp:914:46:914:53 | source | test.cpp:919:10:919:30 | global_pointer_static |
+| test.cpp:915:57:915:76 | indirect_source(1) indirection | test.cpp:921:19:921:50 | global_pointer_static_indirect_1 indirection |
+| true_upon_entry.cpp:9:11:9:16 | call to source | true_upon_entry.cpp:13:8:13:8 | x |
+| true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x |
+| true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x |
+| true_upon_entry.cpp:33:11:33:16 | call to source | true_upon_entry.cpp:39:8:39:8 | x |
+| true_upon_entry.cpp:43:11:43:16 | call to source | true_upon_entry.cpp:49:8:49:8 | x |
+| true_upon_entry.cpp:54:11:54:16 | call to source | true_upon_entry.cpp:57:8:57:8 | x |
+| true_upon_entry.cpp:62:11:62:16 | call to source | true_upon_entry.cpp:66:8:66:8 | x |
+| true_upon_entry.cpp:70:11:70:16 | call to source | true_upon_entry.cpp:78:8:78:8 | x |
+| true_upon_entry.cpp:83:11:83:16 | call to source | true_upon_entry.cpp:86:8:86:8 | x |
+| true_upon_entry.cpp:98:11:98:16 | call to source | true_upon_entry.cpp:105:8:105:8 | x |
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.ql
new file mode 100644
index 00000000000..4198e007d2e
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.ql
@@ -0,0 +1,9 @@
+import TestBase
+
+query predicate astFlow(AstTest::DataFlow::Node source, AstTest::DataFlow::Node sink) {
+ AstTest::AstFlow::flow(source, sink)
+}
+
+query predicate irFlow(IRTest::DataFlow::Node source, IRTest::DataFlow::Node sink) {
+ IRTest::IRFlow::flow(source, sink)
+}
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
index 73c9fd28b93..b5883963620 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
@@ -1,5 +1,5 @@
int source();
-void sink(int); void sink(const int *); void sink(int **); void indirect_sink(...);
+void sink(...); void indirect_sink(...);
void intraprocedural_with_local_flow() {
int t2;
@@ -836,4 +836,90 @@ namespace MoreGlobalTests {
sink(global_direct); // $ ir MISSING: ast
indirect_sink(global_direct); // clean
}
+}
+
+void test_references() {
+ int x = source();
+ int &y = x;
+ sink(y); // $ ast,ir
+
+ int* px = indirect_source();
+ int*& rpx = px;
+ indirect_sink((int*)rpx); // $ ast,ir
+}
+
+namespace GlobalArrays {
+ void test1() {
+ static const int static_local_array_dynamic[] = { ::source() };
+ sink(*static_local_array_dynamic); // $ ir MISSING: ast
+ }
+
+ const int* source(bool);
+
+ void test2() {
+ static const int* static_local_pointer_dynamic = source(true);
+ sink(static_local_pointer_dynamic); // $ ast,ir
+ }
+
+ static const int global_array_dynamic[] = { ::source() };
+
+ void test3() {
+ sink(*global_array_dynamic); // $ MISSING: ir,ast // Missing in IR because no 'IRFunction' for global_array is generated because the type of global_array_dynamic is "deeply const".
+ }
+
+ const int* source(bool);
+
+ static const int* global_pointer_dynamic = source(true);
+
+ void test4() {
+ sink(global_pointer_dynamic); // $ ir MISSING: ast
+ }
+
+ void test5() {
+ static const char static_local_array_static[] = "source";
+ static const char static_local_array_static_indirect_1[] = "indirect_source(1)";
+ static const char static_local_array_static_indirect_2[] = "indirect_source(2)";
+ sink(static_local_array_static); // clean
+ sink(static_local_array_static_indirect_1); // $ ir MISSING: ast
+ indirect_sink(static_local_array_static_indirect_1); // clean
+ sink(static_local_array_static_indirect_2); // clean
+ indirect_sink(static_local_array_static_indirect_2); // $ ir MISSING: ast
+ }
+
+ void test6() {
+ static const char* static_local_pointer_static = "source";
+ static const char* static_local_pointer_static_indirect_1 = "indirect_source(1)";
+ static const char* static_local_pointer_static_indirect_2 = "indirect_source(2)";
+ sink(static_local_pointer_static); // $ ir MISSING: ast
+ sink(static_local_pointer_static_indirect_1); // clean
+ indirect_sink(static_local_pointer_static_indirect_1); // $ ir MISSING: ast
+ sink(static_local_pointer_static_indirect_2); // clean: static_local_pointer_static_indirect_2 does not have 2 indirections
+ indirect_sink(static_local_pointer_static_indirect_2); // clean: static_local_pointer_static_indirect_2 does not have 2 indirections
+ }
+
+ static const char global_array_static[] = "source";
+ static const char global_array_static_indirect_1[] = "indirect_source(1)";
+ static const char global_array_static_indirect_2[] = "indirect_source(2)";
+
+ void test7() {
+ sink(global_array_static); // clean
+ sink(*global_array_static); // clean
+ sink(global_array_static_indirect_1); // $ ir MISSING: ast
+ sink(*global_array_static_indirect_1); // clean
+ indirect_sink(global_array_static); // clean
+ indirect_sink(global_array_static_indirect_1); // clean
+ indirect_sink(global_array_static_indirect_2); // $ ir MISSING: ast
+ }
+
+ static const char* global_pointer_static = "source";
+ static const char* global_pointer_static_indirect_1 = "indirect_source(1)";
+ static const char* global_pointer_static_indirect_2 = "indirect_source(2)";
+
+ void test8() {
+ sink(global_pointer_static); // $ ir MISSING: ast
+ sink(global_pointer_static_indirect_1); // clean
+ indirect_sink(global_pointer_static_indirect_1); // $ ir MISSING: ast
+ sink(global_pointer_static_indirect_2); // clean: global_pointer_static_indirect_2 does not have 2 indirections
+ indirect_sink(global_pointer_static_indirect_2); // clean: global_pointer_static_indirect_2 does not have 2 indirections
+ }
}
\ No newline at end of file
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.expected
index d4756e8d808..8ec8033d086 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.expected
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.expected
@@ -1,9 +1,2 @@
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:19,45-53)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:20,24-32)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:27,15-23)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:33,22-30)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:40,25-33)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:42,17-25)
-WARNING: Module DataFlow has been deprecated and may be removed in future (test.ql:46,20-28)
testFailures
failures
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql
index ea27ec0d51d..05e1112d5f3 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql
@@ -1,107 +1,3 @@
+import TestBase
import TestUtilities.dataflow.FlowTestCommon
-
-module AstTest {
- private import semmle.code.cpp.dataflow.DataFlow
- private import semmle.code.cpp.controlflow.Guards
-
- /**
- * A `BarrierGuard` that stops flow to all occurrences of `x` within statement
- * S in `if (guarded(x)) S`.
- */
- // This is tested in `BarrierGuard.cpp`.
- predicate testBarrierGuard(GuardCondition g, Expr checked, boolean isTrue) {
- g.(FunctionCall).getTarget().getName() = "guarded" and
- checked = g.(FunctionCall).getArgument(0) and
- isTrue = true
- }
-
- /** Common data flow configuration to be used by tests. */
- module AstTestAllocationConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) {
- source.asExpr().(FunctionCall).getTarget().getName() = "source"
- or
- source.asParameter().getName().matches("source%")
- or
- source.asExpr().(FunctionCall).getTarget().getName() = "indirect_source"
- or
- source.(DataFlow::DefinitionByReferenceNode).getParameter().getName().matches("ref_source%")
- or
- // Track uninitialized variables
- exists(source.asUninitialized())
- }
-
- predicate isSink(DataFlow::Node sink) {
- exists(FunctionCall call |
- call.getTarget().getName() = ["sink", "indirect_sink"] and
- sink.asExpr() = call.getAnArgument()
- )
- }
-
- predicate isBarrier(DataFlow::Node barrier) {
- barrier.asExpr().(VariableAccess).getTarget().hasName("barrier") or
- barrier = DataFlow::BarrierGuard::getABarrierNode()
- }
- }
-
- module AstFlow = DataFlow::Global;
-}
-
-module IRTest {
- private import cpp
- private import semmle.code.cpp.ir.dataflow.DataFlow
- private import semmle.code.cpp.ir.IR
- private import semmle.code.cpp.controlflow.IRGuards
-
- /**
- * A `BarrierGuard` that stops flow to all occurrences of `x` within statement
- * S in `if (guarded(x)) S`.
- */
- // This is tested in `BarrierGuard.cpp`.
- predicate testBarrierGuard(IRGuardCondition g, Expr checked, boolean isTrue) {
- exists(Call call |
- call = g.getUnconvertedResultExpression() and
- call.getTarget().hasName("guarded") and
- checked = call.getArgument(0) and
- isTrue = true
- )
- }
-
- /** Common data flow configuration to be used by tests. */
- module IRTestAllocationConfig implements DataFlow::ConfigSig {
- predicate isSource(DataFlow::Node source) {
- source.asExpr().(FunctionCall).getTarget().getName() = "source"
- or
- source.asIndirectExpr(1).(FunctionCall).getTarget().getName() = "indirect_source"
- or
- source.asParameter().getName().matches("source%")
- or
- source.(DataFlow::DefinitionByReferenceNode).getParameter().getName().matches("ref_source%")
- or
- exists(source.asUninitialized())
- }
-
- predicate isSink(DataFlow::Node sink) {
- exists(FunctionCall call, Expr e | e = call.getAnArgument() |
- call.getTarget().getName() = "sink" and
- sink.asExpr() = e
- or
- call.getTarget().getName() = "indirect_sink" and
- sink.asIndirectExpr() = e
- )
- }
-
- predicate isBarrier(DataFlow::Node barrier) {
- exists(Expr barrierExpr | barrierExpr in [barrier.asExpr(), barrier.asIndirectExpr()] |
- barrierExpr.(VariableAccess).getTarget().hasName("barrier")
- )
- or
- barrier = DataFlow::BarrierGuard::getABarrierNode()
- or
- barrier = DataFlow::BarrierGuard::getAnIndirectBarrierNode()
- }
- }
-
- module IRFlow = DataFlow::Global;
-}
-
import MakeTest, IRFlowTest>>
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/ReturnStackAllocatedMemory.expected b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/ReturnStackAllocatedMemory.expected
index b7b598a13c5..6aa457b1e8a 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/ReturnStackAllocatedMemory.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/ReturnStackAllocatedMemory.expected
@@ -43,6 +43,11 @@ edges
| test.cpp:189:16:189:16 | p | test.cpp:189:16:189:16 | (reference to) |
| test.cpp:190:10:190:13 | (reference dereference) | test.cpp:190:10:190:13 | (reference to) |
| test.cpp:190:10:190:13 | pRef | test.cpp:190:10:190:13 | (reference dereference) |
+| test.cpp:237:12:237:17 | call to alloca | test.cpp:237:12:237:17 | call to alloca |
+| test.cpp:237:12:237:17 | call to alloca | test.cpp:238:9:238:9 | p |
+| test.cpp:249:13:249:20 | call to strndupa | test.cpp:249:13:249:20 | call to strndupa |
+| test.cpp:249:13:249:20 | call to strndupa | test.cpp:250:9:250:10 | s2 |
+| test.cpp:250:9:250:10 | s2 | test.cpp:250:9:250:10 | (void *)... |
nodes
| test.cpp:17:9:17:11 | & ... | semmle.label | & ... |
| test.cpp:17:10:17:11 | mc | semmle.label | mc |
@@ -101,6 +106,14 @@ nodes
| test.cpp:190:10:190:13 | (reference dereference) | semmle.label | (reference dereference) |
| test.cpp:190:10:190:13 | (reference to) | semmle.label | (reference to) |
| test.cpp:190:10:190:13 | pRef | semmle.label | pRef |
+| test.cpp:237:12:237:17 | call to alloca | semmle.label | call to alloca |
+| test.cpp:237:12:237:17 | call to alloca | semmle.label | call to alloca |
+| test.cpp:238:9:238:9 | p | semmle.label | p |
+| test.cpp:245:9:245:15 | call to strdupa | semmle.label | call to strdupa |
+| test.cpp:249:13:249:20 | call to strndupa | semmle.label | call to strndupa |
+| test.cpp:249:13:249:20 | call to strndupa | semmle.label | call to strndupa |
+| test.cpp:250:9:250:10 | (void *)... | semmle.label | (void *)... |
+| test.cpp:250:9:250:10 | s2 | semmle.label | s2 |
#select
| test.cpp:17:9:17:11 | CopyValue: & ... | test.cpp:17:10:17:11 | mc | test.cpp:17:9:17:11 | & ... | May return stack-allocated memory from $@. | test.cpp:17:10:17:11 | mc | mc |
| test.cpp:25:9:25:11 | Load: ptr | test.cpp:23:18:23:19 | mc | test.cpp:25:9:25:11 | ptr | May return stack-allocated memory from $@. | test.cpp:23:18:23:19 | mc | mc |
@@ -115,3 +128,6 @@ nodes
| test.cpp:177:10:177:23 | Convert: (void *)... | test.cpp:176:25:176:34 | localArray | test.cpp:177:10:177:23 | (void *)... | May return stack-allocated memory from $@. | test.cpp:176:25:176:34 | localArray | localArray |
| test.cpp:183:10:183:19 | CopyValue: (reference to) | test.cpp:182:21:182:27 | myLocal | test.cpp:183:10:183:19 | (reference to) | May return stack-allocated memory from $@. | test.cpp:182:21:182:27 | myLocal | myLocal |
| test.cpp:190:10:190:13 | CopyValue: (reference to) | test.cpp:189:16:189:16 | p | test.cpp:190:10:190:13 | (reference to) | May return stack-allocated memory from $@. | test.cpp:189:16:189:16 | p | p |
+| test.cpp:238:9:238:9 | Load: p | test.cpp:237:12:237:17 | call to alloca | test.cpp:238:9:238:9 | p | May return stack-allocated memory from $@. | test.cpp:237:12:237:17 | call to alloca | call to alloca |
+| test.cpp:245:9:245:15 | Call: call to strdupa | test.cpp:245:9:245:15 | call to strdupa | test.cpp:245:9:245:15 | call to strdupa | May return stack-allocated memory from $@. | test.cpp:245:9:245:15 | call to strdupa | call to strdupa |
+| test.cpp:250:9:250:10 | Convert: (void *)... | test.cpp:249:13:249:20 | call to strndupa | test.cpp:250:9:250:10 | (void *)... | May return stack-allocated memory from $@. | test.cpp:249:13:249:20 | call to strndupa | call to strndupa |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp
index 487a4e77285..44afcd7ee5f 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp
+++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp
@@ -229,4 +229,23 @@ int* id(int* px) {
void f() {
int x;
int* px = id(&x); // GOOD
+}
+
+void *alloca(size_t);
+
+void* test_alloca() {
+ void* p = alloca(10);
+ return p; // BAD
+}
+
+char *strdupa(const char *);
+char *strndupa(const char *, size_t);
+
+char* test_strdupa(const char* s) {
+ return strdupa(s); // BAD
+}
+
+void* test_strndupa(const char* s, size_t size) {
+ char* s2 = strndupa(s, size);
+ return s2; // BAD
}
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-114/SAMATE/UncontrolledProcessOperation/UncontrolledProcessOperation.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-114/SAMATE/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
index 66433529adf..35161adb8f8 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-114/SAMATE/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-114/SAMATE/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
@@ -1,23 +1,12 @@
edges
-| test.cpp:37:73:37:76 | data | test.cpp:43:32:43:35 | data |
-| test.cpp:37:73:37:76 | data | test.cpp:43:32:43:35 | data |
-| test.cpp:37:73:37:76 | data indirection | test.cpp:43:32:43:35 | data |
-| test.cpp:37:73:37:76 | data indirection | test.cpp:43:32:43:35 | data |
-| test.cpp:64:30:64:35 | call to getenv | test.cpp:73:24:73:27 | data |
-| test.cpp:64:30:64:35 | call to getenv | test.cpp:73:24:73:27 | data |
-| test.cpp:64:30:64:35 | call to getenv | test.cpp:73:24:73:27 | data indirection |
-| test.cpp:64:30:64:35 | call to getenv | test.cpp:73:24:73:27 | data indirection |
-| test.cpp:73:24:73:27 | data | test.cpp:37:73:37:76 | data |
+| test.cpp:37:73:37:76 | data indirection | test.cpp:43:32:43:35 | data indirection |
+| test.cpp:64:30:64:35 | call to getenv indirection | test.cpp:73:24:73:27 | data indirection |
| test.cpp:73:24:73:27 | data indirection | test.cpp:37:73:37:76 | data indirection |
-subpaths
nodes
-| test.cpp:37:73:37:76 | data | semmle.label | data |
| test.cpp:37:73:37:76 | data indirection | semmle.label | data indirection |
-| test.cpp:43:32:43:35 | data | semmle.label | data |
-| test.cpp:43:32:43:35 | data | semmle.label | data |
-| test.cpp:64:30:64:35 | call to getenv | semmle.label | call to getenv |
-| test.cpp:64:30:64:35 | call to getenv | semmle.label | call to getenv |
-| test.cpp:73:24:73:27 | data | semmle.label | data |
+| test.cpp:43:32:43:35 | data indirection | semmle.label | data indirection |
+| test.cpp:64:30:64:35 | call to getenv indirection | semmle.label | call to getenv indirection |
| test.cpp:73:24:73:27 | data indirection | semmle.label | data indirection |
+subpaths
#select
-| test.cpp:43:32:43:35 | data | test.cpp:64:30:64:35 | call to getenv | test.cpp:43:32:43:35 | data | The value of this argument may come from $@ and is being passed to LoadLibraryA. | test.cpp:64:30:64:35 | call to getenv | call to getenv |
+| test.cpp:43:32:43:35 | data indirection | test.cpp:64:30:64:35 | call to getenv indirection | test.cpp:43:32:43:35 | data indirection | The value of this argument may come from $@ and is being passed to LoadLibraryA. | test.cpp:64:30:64:35 | call to getenv indirection | an environment variable |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-114/semmle/UncontrolledProcessOperation/UncontrolledProcessOperation.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-114/semmle/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
index 08f5d0161d5..816c8f156e7 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-114/semmle/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-114/semmle/UncontrolledProcessOperation/UncontrolledProcessOperation.expected
@@ -1,112 +1,45 @@
edges
-| test.cpp:24:30:24:36 | command | test.cpp:26:10:26:16 | command |
-| test.cpp:24:30:24:36 | command | test.cpp:26:10:26:16 | command |
-| test.cpp:29:30:29:36 | command | test.cpp:31:10:31:16 | command |
-| test.cpp:29:30:29:36 | command | test.cpp:31:10:31:16 | command |
-| test.cpp:42:18:42:23 | call to getenv | test.cpp:24:30:24:36 | command |
-| test.cpp:42:18:42:34 | call to getenv | test.cpp:24:30:24:36 | command |
-| test.cpp:43:18:43:23 | call to getenv | test.cpp:29:30:29:36 | command |
-| test.cpp:43:18:43:34 | call to getenv | test.cpp:29:30:29:36 | command |
-| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | buffer | test.cpp:65:10:65:14 | data2 |
-| test.cpp:56:12:56:17 | buffer | test.cpp:65:10:65:14 | data2 |
-| test.cpp:56:12:56:17 | buffer | test.cpp:65:10:65:14 | data2 |
-| test.cpp:56:12:56:17 | buffer | test.cpp:65:10:65:14 | data2 |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:62:10:62:15 | buffer |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:63:10:63:13 | data |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:64:10:64:16 | dataref |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:65:10:65:14 | data2 |
-| test.cpp:56:12:56:17 | fgets output argument | test.cpp:65:10:65:14 | data2 |
-| test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer |
-| test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer |
-| test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer |
-| test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer |
-| test.cpp:76:12:76:17 | fgets output argument | test.cpp:78:10:78:15 | buffer |
-| test.cpp:76:12:76:17 | fgets output argument | test.cpp:78:10:78:15 | buffer |
-| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer |
-| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer |
-| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer |
-| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer |
-| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer |
-| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer |
-| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer |
-| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer |
-| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer |
-| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer |
-| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer |
-| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer |
-| test.cpp:113:8:113:12 | call to fgets | test.cpp:114:9:114:11 | ptr |
-| test.cpp:113:8:113:12 | call to fgets | test.cpp:114:9:114:11 | ptr |
-| test.cpp:113:8:113:12 | call to fgets | test.cpp:114:9:114:11 | ptr |
-| test.cpp:113:8:113:12 | call to fgets | test.cpp:114:9:114:11 | ptr |
-subpaths
+| test.cpp:24:30:24:36 | command indirection | test.cpp:26:10:26:16 | command indirection |
+| test.cpp:29:30:29:36 | command indirection | test.cpp:31:10:31:16 | command indirection |
+| test.cpp:42:18:42:34 | call to getenv indirection | test.cpp:24:30:24:36 | command indirection |
+| test.cpp:43:18:43:34 | call to getenv indirection | test.cpp:29:30:29:36 | command indirection |
+| test.cpp:56:12:56:17 | fgets output argument | test.cpp:62:10:62:15 | buffer indirection |
+| test.cpp:56:12:56:17 | fgets output argument | test.cpp:63:10:63:13 | data indirection |
+| test.cpp:56:12:56:17 | fgets output argument | test.cpp:64:10:64:16 | dataref indirection |
+| test.cpp:56:12:56:17 | fgets output argument | test.cpp:65:10:65:14 | data2 indirection |
+| test.cpp:76:12:76:17 | fgets output argument | test.cpp:78:10:78:15 | buffer indirection |
+| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer indirection |
+| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer indirection |
+| test.cpp:113:8:113:12 | call to fgets indirection | test.cpp:114:9:114:11 | ptr indirection |
nodes
-| test.cpp:24:30:24:36 | command | semmle.label | command |
-| test.cpp:26:10:26:16 | command | semmle.label | command |
-| test.cpp:26:10:26:16 | command | semmle.label | command |
-| test.cpp:29:30:29:36 | command | semmle.label | command |
-| test.cpp:31:10:31:16 | command | semmle.label | command |
-| test.cpp:31:10:31:16 | command | semmle.label | command |
-| test.cpp:42:18:42:23 | call to getenv | semmle.label | call to getenv |
-| test.cpp:42:18:42:34 | call to getenv | semmle.label | call to getenv |
-| test.cpp:43:18:43:23 | call to getenv | semmle.label | call to getenv |
-| test.cpp:43:18:43:34 | call to getenv | semmle.label | call to getenv |
-| test.cpp:56:12:56:17 | buffer | semmle.label | buffer |
-| test.cpp:56:12:56:17 | buffer | semmle.label | buffer |
+| test.cpp:24:30:24:36 | command indirection | semmle.label | command indirection |
+| test.cpp:26:10:26:16 | command indirection | semmle.label | command indirection |
+| test.cpp:29:30:29:36 | command indirection | semmle.label | command indirection |
+| test.cpp:31:10:31:16 | command indirection | semmle.label | command indirection |
+| test.cpp:42:18:42:34 | call to getenv indirection | semmle.label | call to getenv indirection |
+| test.cpp:43:18:43:34 | call to getenv indirection | semmle.label | call to getenv indirection |
| test.cpp:56:12:56:17 | fgets output argument | semmle.label | fgets output argument |
-| test.cpp:62:10:62:15 | buffer | semmle.label | buffer |
-| test.cpp:62:10:62:15 | buffer | semmle.label | buffer |
-| test.cpp:63:10:63:13 | data | semmle.label | data |
-| test.cpp:63:10:63:13 | data | semmle.label | data |
-| test.cpp:64:10:64:16 | dataref | semmle.label | dataref |
-| test.cpp:64:10:64:16 | dataref | semmle.label | dataref |
-| test.cpp:64:10:64:16 | dataref | semmle.label | dataref |
-| test.cpp:65:10:65:14 | data2 | semmle.label | data2 |
-| test.cpp:65:10:65:14 | data2 | semmle.label | data2 |
-| test.cpp:76:12:76:17 | buffer | semmle.label | buffer |
-| test.cpp:76:12:76:17 | buffer | semmle.label | buffer |
+| test.cpp:62:10:62:15 | buffer indirection | semmle.label | buffer indirection |
+| test.cpp:63:10:63:13 | data indirection | semmle.label | data indirection |
+| test.cpp:64:10:64:16 | dataref indirection | semmle.label | dataref indirection |
+| test.cpp:65:10:65:14 | data2 indirection | semmle.label | data2 indirection |
| test.cpp:76:12:76:17 | fgets output argument | semmle.label | fgets output argument |
-| test.cpp:78:10:78:15 | buffer | semmle.label | buffer |
-| test.cpp:78:10:78:15 | buffer | semmle.label | buffer |
-| test.cpp:98:17:98:22 | buffer | semmle.label | buffer |
-| test.cpp:98:17:98:22 | buffer | semmle.label | buffer |
+| test.cpp:78:10:78:15 | buffer indirection | semmle.label | buffer indirection |
| test.cpp:98:17:98:22 | recv output argument | semmle.label | recv output argument |
-| test.cpp:99:15:99:20 | buffer | semmle.label | buffer |
-| test.cpp:99:15:99:20 | buffer | semmle.label | buffer |
-| test.cpp:106:17:106:22 | buffer | semmle.label | buffer |
-| test.cpp:106:17:106:22 | buffer | semmle.label | buffer |
+| test.cpp:99:15:99:20 | buffer indirection | semmle.label | buffer indirection |
| test.cpp:106:17:106:22 | recv output argument | semmle.label | recv output argument |
-| test.cpp:107:15:107:20 | buffer | semmle.label | buffer |
-| test.cpp:107:15:107:20 | buffer | semmle.label | buffer |
-| test.cpp:113:8:113:12 | call to fgets | semmle.label | call to fgets |
-| test.cpp:113:8:113:12 | call to fgets | semmle.label | call to fgets |
-| test.cpp:114:9:114:11 | ptr | semmle.label | ptr |
-| test.cpp:114:9:114:11 | ptr | semmle.label | ptr |
+| test.cpp:107:15:107:20 | buffer indirection | semmle.label | buffer indirection |
+| test.cpp:113:8:113:12 | call to fgets indirection | semmle.label | call to fgets indirection |
+| test.cpp:114:9:114:11 | ptr indirection | semmle.label | ptr indirection |
+subpaths
#select
-| test.cpp:26:10:26:16 | command | test.cpp:42:18:42:23 | call to getenv | test.cpp:26:10:26:16 | command | The value of this argument may come from $@ and is being passed to system. | test.cpp:42:18:42:23 | call to getenv | call to getenv |
-| test.cpp:31:10:31:16 | command | test.cpp:43:18:43:23 | call to getenv | test.cpp:31:10:31:16 | command | The value of this argument may come from $@ and is being passed to system. | test.cpp:43:18:43:23 | call to getenv | call to getenv |
-| test.cpp:62:10:62:15 | buffer | test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | buffer | buffer |
-| test.cpp:63:10:63:13 | data | test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | buffer | buffer |
-| test.cpp:64:10:64:16 | dataref | test.cpp:56:12:56:17 | buffer | test.cpp:64:10:64:16 | dataref | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | buffer | buffer |
-| test.cpp:65:10:65:14 | data2 | test.cpp:56:12:56:17 | buffer | test.cpp:65:10:65:14 | data2 | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | buffer | buffer |
-| test.cpp:78:10:78:15 | buffer | test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer | The value of this argument may come from $@ and is being passed to system. | test.cpp:76:12:76:17 | buffer | buffer |
-| test.cpp:99:15:99:20 | buffer | test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer | The value of this argument may come from $@ and is being passed to LoadLibrary. | test.cpp:98:17:98:22 | buffer | buffer |
-| test.cpp:107:15:107:20 | buffer | test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer | The value of this argument may come from $@ and is being passed to LoadLibrary. | test.cpp:106:17:106:22 | buffer | buffer |
-| test.cpp:114:9:114:11 | ptr | test.cpp:113:8:113:12 | call to fgets | test.cpp:114:9:114:11 | ptr | The value of this argument may come from $@ and is being passed to system. | test.cpp:113:8:113:12 | call to fgets | call to fgets |
+| test.cpp:26:10:26:16 | command indirection | test.cpp:42:18:42:34 | call to getenv indirection | test.cpp:26:10:26:16 | command indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:42:18:42:34 | call to getenv indirection | an environment variable |
+| test.cpp:31:10:31:16 | command indirection | test.cpp:43:18:43:34 | call to getenv indirection | test.cpp:31:10:31:16 | command indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:43:18:43:34 | call to getenv indirection | an environment variable |
+| test.cpp:62:10:62:15 | buffer indirection | test.cpp:56:12:56:17 | fgets output argument | test.cpp:62:10:62:15 | buffer indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | fgets output argument | string read by fgets |
+| test.cpp:63:10:63:13 | data indirection | test.cpp:56:12:56:17 | fgets output argument | test.cpp:63:10:63:13 | data indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | fgets output argument | string read by fgets |
+| test.cpp:64:10:64:16 | dataref indirection | test.cpp:56:12:56:17 | fgets output argument | test.cpp:64:10:64:16 | dataref indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | fgets output argument | string read by fgets |
+| test.cpp:65:10:65:14 | data2 indirection | test.cpp:56:12:56:17 | fgets output argument | test.cpp:65:10:65:14 | data2 indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:56:12:56:17 | fgets output argument | string read by fgets |
+| test.cpp:78:10:78:15 | buffer indirection | test.cpp:76:12:76:17 | fgets output argument | test.cpp:78:10:78:15 | buffer indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:76:12:76:17 | fgets output argument | string read by fgets |
+| test.cpp:99:15:99:20 | buffer indirection | test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer indirection | The value of this argument may come from $@ and is being passed to LoadLibrary. | test.cpp:98:17:98:22 | recv output argument | buffer read by recv |
+| test.cpp:107:15:107:20 | buffer indirection | test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer indirection | The value of this argument may come from $@ and is being passed to LoadLibrary. | test.cpp:106:17:106:22 | recv output argument | buffer read by recv |
+| test.cpp:114:9:114:11 | ptr indirection | test.cpp:113:8:113:12 | call to fgets indirection | test.cpp:114:9:114:11 | ptr indirection | The value of this argument may come from $@ and is being passed to system. | test.cpp:113:8:113:12 | call to fgets indirection | string read by fgets |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.expected
deleted file mode 100644
index 6aca673fb4b..00000000000
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.expected
+++ /dev/null
@@ -1,69 +0,0 @@
-edges
-| globalVars.c:8:7:8:10 | copy | globalVars.c:27:9:27:12 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:27:9:27:12 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:33:15:33:18 | copy |
-| globalVars.c:8:7:8:10 | copy | globalVars.c:35:11:35:14 | copy |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:38:9:38:13 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:38:9:38:13 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:44:15:44:19 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-| globalVars.c:9:7:9:11 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-| globalVars.c:11:22:11:25 | argv | globalVars.c:8:7:8:10 | copy |
-| globalVars.c:11:22:11:25 | argv | globalVars.c:12:2:12:15 | ... = ... |
-| globalVars.c:12:2:12:15 | ... = ... | globalVars.c:8:7:8:10 | copy |
-| globalVars.c:15:21:15:23 | val | globalVars.c:9:7:9:11 | copy2 |
-| globalVars.c:15:21:15:23 | val | globalVars.c:16:2:16:12 | ... = ... |
-| globalVars.c:16:2:16:12 | ... = ... | globalVars.c:9:7:9:11 | copy2 |
-| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | argv |
-| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | argv |
-| globalVars.c:30:15:30:18 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:30:15:30:18 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:30:15:30:18 | copy | globalVars.c:30:15:30:18 | copy |
-| globalVars.c:30:15:30:18 | copy | globalVars.c:35:11:35:14 | copy |
-| globalVars.c:33:15:33:18 | copy | globalVars.c:35:11:35:14 | copy |
-| globalVars.c:35:11:35:14 | copy | globalVars.c:15:21:15:23 | val |
-| globalVars.c:35:11:35:14 | copy | globalVars.c:35:11:35:14 | copy |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:41:15:41:19 | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-| globalVars.c:44:15:44:19 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-| globalVars.c:44:15:44:19 | copy2 | globalVars.c:50:9:50:13 | copy2 |
-subpaths
-nodes
-| globalVars.c:8:7:8:10 | copy | semmle.label | copy |
-| globalVars.c:9:7:9:11 | copy2 | semmle.label | copy2 |
-| globalVars.c:11:22:11:25 | argv | semmle.label | argv |
-| globalVars.c:12:2:12:15 | ... = ... | semmle.label | ... = ... |
-| globalVars.c:15:21:15:23 | val | semmle.label | val |
-| globalVars.c:16:2:16:12 | ... = ... | semmle.label | ... = ... |
-| globalVars.c:24:11:24:14 | argv | semmle.label | argv |
-| globalVars.c:24:11:24:14 | argv | semmle.label | argv |
-| globalVars.c:27:9:27:12 | copy | semmle.label | copy |
-| globalVars.c:27:9:27:12 | copy | semmle.label | copy |
-| globalVars.c:30:15:30:18 | copy | semmle.label | copy |
-| globalVars.c:30:15:30:18 | copy | semmle.label | copy |
-| globalVars.c:30:15:30:18 | copy | semmle.label | copy |
-| globalVars.c:33:15:33:18 | copy | semmle.label | copy |
-| globalVars.c:35:11:35:14 | copy | semmle.label | copy |
-| globalVars.c:38:9:38:13 | copy2 | semmle.label | copy2 |
-| globalVars.c:38:9:38:13 | copy2 | semmle.label | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | semmle.label | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | semmle.label | copy2 |
-| globalVars.c:41:15:41:19 | copy2 | semmle.label | copy2 |
-| globalVars.c:44:15:44:19 | copy2 | semmle.label | copy2 |
-| globalVars.c:50:9:50:13 | copy2 | semmle.label | copy2 |
-| globalVars.c:50:9:50:13 | copy2 | semmle.label | copy2 |
-#select
-| globalVars.c:27:9:27:12 | copy | globalVars.c:24:11:24:14 | argv | globalVars.c:27:9:27:12 | copy | The value of this argument may come from $@ and is being used as a formatting argument to printf(format). | globalVars.c:24:11:24:14 | argv | argv |
-| globalVars.c:30:15:30:18 | copy | globalVars.c:24:11:24:14 | argv | globalVars.c:30:15:30:18 | copy | The value of this argument may come from $@ and is being used as a formatting argument to printWrapper(str), which calls printf(format). | globalVars.c:24:11:24:14 | argv | argv |
-| globalVars.c:38:9:38:13 | copy2 | globalVars.c:24:11:24:14 | argv | globalVars.c:38:9:38:13 | copy2 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format). | globalVars.c:24:11:24:14 | argv | argv |
-| globalVars.c:41:15:41:19 | copy2 | globalVars.c:24:11:24:14 | argv | globalVars.c:41:15:41:19 | copy2 | The value of this argument may come from $@ and is being used as a formatting argument to printWrapper(str), which calls printf(format). | globalVars.c:24:11:24:14 | argv | argv |
-| globalVars.c:50:9:50:13 | copy2 | globalVars.c:24:11:24:14 | argv | globalVars.c:50:9:50:13 | copy2 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format). | globalVars.c:24:11:24:14 | argv | argv |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.qlref b/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.qlref
deleted file mode 100644
index eac059de2bb..00000000000
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.qlref
+++ /dev/null
@@ -1 +0,0 @@
-Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql
\ No newline at end of file
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/ArithmeticTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/ArithmeticTainted.expected
index b86b85a91eb..d266afbe445 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/ArithmeticTainted.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/ArithmeticTainted.expected
@@ -1,13 +1,8 @@
edges
-| examples.cpp:63:26:63:30 | & ... | examples.cpp:66:11:66:14 | data |
-| examples.cpp:63:26:63:30 | & ... | examples.cpp:66:11:66:14 | data |
| examples.cpp:63:26:63:30 | fscanf output argument | examples.cpp:66:11:66:14 | data |
-| examples.cpp:63:26:63:30 | fscanf output argument | examples.cpp:66:11:66:14 | data |
-subpaths
nodes
-| examples.cpp:63:26:63:30 | & ... | semmle.label | & ... |
| examples.cpp:63:26:63:30 | fscanf output argument | semmle.label | fscanf output argument |
| examples.cpp:66:11:66:14 | data | semmle.label | data |
-| examples.cpp:66:11:66:14 | data | semmle.label | data |
+subpaths
#select
-| examples.cpp:66:11:66:14 | data | examples.cpp:63:26:63:30 | & ... | examples.cpp:66:11:66:14 | data | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | examples.cpp:63:26:63:30 | & ... | User-provided value |
+| examples.cpp:66:11:66:14 | data | examples.cpp:63:26:63:30 | fscanf output argument | examples.cpp:66:11:66:14 | data | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | examples.cpp:63:26:63:30 | fscanf output argument | value read by fscanf |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/IntegerOverflowTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/IntegerOverflowTainted.expected
index 81a97849431..bd2085e9863 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/IntegerOverflowTainted.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/SAMATE/IntegerOverflowTainted.expected
@@ -1 +1 @@
-| examples.cpp:66:9:66:14 | -- ... | $@ flows an expression which might overflow negatively. | examples.cpp:63:26:63:30 | & ... | User-provided value |
+| examples.cpp:66:9:66:14 | -- ... | $@ flows an expression which might overflow negatively. | examples.cpp:63:26:63:30 | fscanf output argument | value read by fscanf |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected
index 9b632194f4a..f3edc87450e 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected
@@ -1,86 +1,59 @@
edges
| test2.cpp:12:21:12:21 | v | test2.cpp:14:11:14:11 | v |
-| test2.cpp:12:21:12:21 | v | test2.cpp:14:11:14:11 | v |
-| test2.cpp:25:22:25:23 | & ... | test2.cpp:27:13:27:13 | v |
| test2.cpp:25:22:25:23 | fscanf output argument | test2.cpp:27:13:27:13 | v |
| test2.cpp:27:13:27:13 | v | test2.cpp:12:21:12:21 | v |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:39:9:39:11 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:39:9:39:11 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:39:9:39:11 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:39:9:39:11 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:40:3:40:5 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:40:3:40:5 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:40:3:40:5 | num |
-| test2.cpp:36:9:36:14 | buffer | test2.cpp:40:3:40:5 | num |
-| test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:39:9:39:11 | num |
| test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:39:9:39:11 | num |
| test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:40:3:40:5 | num |
-| test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:40:3:40:5 | num |
-| test5.cpp:5:5:5:17 | getTaintedInt indirection | test5.cpp:17:6:17:18 | call to getTaintedInt |
+| test3.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections |
+| test3.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 |
+| test3.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 |
| test5.cpp:5:5:5:17 | getTaintedInt indirection | test5.cpp:17:6:17:18 | call to getTaintedInt |
| test5.cpp:5:5:5:17 | getTaintedInt indirection | test5.cpp:18:6:18:18 | call to getTaintedInt |
-| test5.cpp:9:7:9:9 | buf | test5.cpp:5:5:5:17 | getTaintedInt indirection |
-| test5.cpp:9:7:9:9 | buf | test5.cpp:5:5:5:17 | getTaintedInt indirection |
| test5.cpp:9:7:9:9 | gets output argument | test5.cpp:5:5:5:17 | getTaintedInt indirection |
| test5.cpp:18:6:18:18 | call to getTaintedInt | test5.cpp:19:6:19:6 | y |
-| test5.cpp:18:6:18:18 | call to getTaintedInt | test5.cpp:19:6:19:6 | y |
-| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections |
-| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections |
-| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections |
-| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections |
-| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 |
-| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 |
-| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 |
-| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 |
-| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 |
-| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 |
-| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 |
-| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 |
-subpaths
+| test.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections |
+| test.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 |
+| test.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 |
nodes
| test2.cpp:12:21:12:21 | v | semmle.label | v |
| test2.cpp:14:11:14:11 | v | semmle.label | v |
-| test2.cpp:14:11:14:11 | v | semmle.label | v |
-| test2.cpp:25:22:25:23 | & ... | semmle.label | & ... |
| test2.cpp:25:22:25:23 | fscanf output argument | semmle.label | fscanf output argument |
| test2.cpp:27:13:27:13 | v | semmle.label | v |
-| test2.cpp:36:9:36:14 | buffer | semmle.label | buffer |
-| test2.cpp:36:9:36:14 | buffer | semmle.label | buffer |
| test2.cpp:36:9:36:14 | fgets output argument | semmle.label | fgets output argument |
| test2.cpp:39:9:39:11 | num | semmle.label | num |
-| test2.cpp:39:9:39:11 | num | semmle.label | num |
-| test2.cpp:40:3:40:5 | num | semmle.label | num |
| test2.cpp:40:3:40:5 | num | semmle.label | num |
+| test3.c:10:27:10:30 | argv indirection | semmle.label | argv indirection |
| test5.cpp:5:5:5:17 | getTaintedInt indirection | semmle.label | getTaintedInt indirection |
-| test5.cpp:9:7:9:9 | buf | semmle.label | buf |
-| test5.cpp:9:7:9:9 | buf | semmle.label | buf |
| test5.cpp:9:7:9:9 | gets output argument | semmle.label | gets output argument |
| test5.cpp:17:6:17:18 | call to getTaintedInt | semmle.label | call to getTaintedInt |
-| test5.cpp:17:6:17:18 | call to getTaintedInt | semmle.label | call to getTaintedInt |
| test5.cpp:18:6:18:18 | call to getTaintedInt | semmle.label | call to getTaintedInt |
| test5.cpp:19:6:19:6 | y | semmle.label | y |
-| test5.cpp:19:6:19:6 | y | semmle.label | y |
-| test.c:11:29:11:32 | argv | semmle.label | argv |
-| test.c:11:29:11:32 | argv | semmle.label | argv |
+| test.c:10:27:10:30 | argv indirection | semmle.label | argv indirection |
| test.c:14:15:14:28 | maxConnections | semmle.label | maxConnections |
-| test.c:14:15:14:28 | maxConnections | semmle.label | maxConnections |
-| test.c:41:17:41:20 | argv | semmle.label | argv |
-| test.c:41:17:41:20 | argv | semmle.label | argv |
| test.c:44:7:44:10 | len2 | semmle.label | len2 |
-| test.c:44:7:44:10 | len2 | semmle.label | len2 |
-| test.c:51:17:51:20 | argv | semmle.label | argv |
-| test.c:51:17:51:20 | argv | semmle.label | argv |
-| test.c:54:7:54:10 | len3 | semmle.label | len3 |
| test.c:54:7:54:10 | len3 | semmle.label | len3 |
+subpaths
#select
-| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | & ... | test2.cpp:14:11:14:11 | v | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | & ... | test2.cpp:14:11:14:11 | v | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:39:9:39:11 | num | test2.cpp:36:9:36:14 | buffer | test2.cpp:39:9:39:11 | num | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:36:9:36:14 | buffer | User-provided value |
-| test2.cpp:40:3:40:5 | num | test2.cpp:36:9:36:14 | buffer | test2.cpp:40:3:40:5 | num | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:36:9:36:14 | buffer | User-provided value |
-| test5.cpp:17:6:17:18 | call to getTaintedInt | test5.cpp:9:7:9:9 | buf | test5.cpp:17:6:17:18 | call to getTaintedInt | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | buf | test5.cpp:19:6:19:6 | y | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | buf | test5.cpp:19:6:19:6 | y | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test.c:14:15:14:28 | maxConnections | test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test.c:11:29:11:32 | argv | User-provided value |
-| test.c:14:15:14:28 | maxConnections | test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:11:29:11:32 | argv | User-provided value |
-| test.c:44:7:44:10 | len2 | test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:41:17:41:20 | argv | User-provided value |
-| test.c:54:7:54:10 | len3 | test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:51:17:51:20 | argv | User-provided value |
+| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | fscanf output argument | test2.cpp:14:11:14:11 | v | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | fscanf output argument | test2.cpp:14:11:14:11 | v | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:39:9:39:11 | num | test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:39:9:39:11 | num | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:36:9:36:14 | fgets output argument | string read by fgets |
+| test2.cpp:40:3:40:5 | num | test2.cpp:36:9:36:14 | fgets output argument | test2.cpp:40:3:40:5 | num | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test2.cpp:36:9:36:14 | fgets output argument | string read by fgets |
+| test5.cpp:17:6:17:18 | call to getTaintedInt | test5.cpp:9:7:9:9 | gets output argument | test5.cpp:17:6:17:18 | call to getTaintedInt | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | gets output argument | test5.cpp:19:6:19:6 | y | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | gets output argument | test5.cpp:19:6:19:6 | y | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test.c:14:15:14:28 | maxConnections | test3.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test3.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test3.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test3.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an overflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:28 | maxConnections | test.c:10:27:10:30 | argv indirection | test.c:14:15:14:28 | maxConnections | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:10 | len2 | test3.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:10 | len2 | test3.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:10 | len2 | test.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:10 | len2 | test.c:10:27:10:30 | argv indirection | test.c:44:7:44:10 | len2 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:10 | len3 | test3.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:10 | len3 | test3.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:10 | len3 | test.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:10 | len3 | test.c:10:27:10:30 | argv indirection | test.c:54:7:54:10 | len3 | $@ flows to an operand of an arithmetic expression, potentially causing an underflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected
index 4b6f14663c0..2f01718f0f4 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected
@@ -1,18 +1,23 @@
-| test2.cpp:14:11:14:15 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:15:11:15:19 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:16:11:16:21 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:17:11:17:22 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value |
-| test2.cpp:39:9:39:18 | ... + ... | $@ flows an expression which might overflow. | test2.cpp:36:9:36:14 | buffer | User-provided value |
-| test2.cpp:40:3:40:13 | ... += ... | $@ flows an expression which might overflow. | test2.cpp:36:9:36:14 | buffer | User-provided value |
-| test3.c:12:31:12:34 | * ... | $@ flows an expression which might overflow negatively. | test3.c:11:15:11:18 | argv | User-provided value |
-| test3.c:13:16:13:19 | * ... | $@ flows an expression which might overflow negatively. | test3.c:11:15:11:18 | argv | User-provided value |
-| test4.cpp:13:17:13:20 | access to array | $@ flows an expression which might overflow negatively. | test4.cpp:9:13:9:16 | argv | User-provided value |
-| test5.cpp:10:9:10:15 | call to strtoul | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test5.cpp:17:6:17:27 | ... * ... | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test5.cpp:19:6:19:13 | ... * ... | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | buf | User-provided value |
-| test6.cpp:11:15:11:15 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | & ... | User-provided value |
-| test6.cpp:16:15:16:15 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | & ... | User-provided value |
-| test6.cpp:30:16:30:16 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | & ... | User-provided value |
-| test.c:14:15:14:35 | ... * ... | $@ flows an expression which might overflow. | test.c:11:29:11:32 | argv | User-provided value |
-| test.c:44:7:44:12 | ... -- | $@ flows an expression which might overflow negatively. | test.c:41:17:41:20 | argv | User-provided value |
-| test.c:54:7:54:12 | ... -- | $@ flows an expression which might overflow negatively. | test.c:51:17:51:20 | argv | User-provided value |
+| test2.cpp:14:11:14:15 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:15:11:15:19 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:16:11:16:21 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:17:11:17:22 | ... * ... | $@ flows an expression which might overflow. | test2.cpp:25:22:25:23 | fscanf output argument | value read by fscanf |
+| test2.cpp:39:9:39:18 | ... + ... | $@ flows an expression which might overflow. | test2.cpp:36:9:36:14 | fgets output argument | string read by fgets |
+| test2.cpp:40:3:40:13 | ... += ... | $@ flows an expression which might overflow. | test2.cpp:36:9:36:14 | fgets output argument | string read by fgets |
+| test3.c:12:11:12:34 | * ... | $@ flows an expression which might overflow negatively. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test3.c:12:11:12:34 | * ... | $@ flows an expression which might overflow negatively. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test3.c:13:11:13:20 | * ... | $@ flows an expression which might overflow negatively. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test3.c:13:11:13:20 | * ... | $@ flows an expression which might overflow negatively. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test4.cpp:13:7:13:20 | access to array | $@ flows an expression which might overflow negatively. | test4.cpp:8:27:8:30 | argv indirection | a command-line argument |
+| test5.cpp:10:9:10:27 | call to strtoul | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test5.cpp:17:6:17:27 | ... * ... | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test5.cpp:19:6:19:13 | ... * ... | $@ flows an expression which might overflow. | test5.cpp:9:7:9:9 | gets output argument | string read by gets |
+| test6.cpp:11:10:11:15 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | fscanf output argument | value read by fscanf |
+| test6.cpp:16:10:16:15 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | fscanf output argument | value read by fscanf |
+| test6.cpp:30:11:30:16 | s | $@ flows an expression which might overflow. | test6.cpp:39:23:39:24 | fscanf output argument | value read by fscanf |
+| test.c:14:15:14:35 | ... * ... | $@ flows an expression which might overflow. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:14:15:14:35 | ... * ... | $@ flows an expression which might overflow. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:12 | ... -- | $@ flows an expression which might overflow negatively. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:44:7:44:12 | ... -- | $@ flows an expression which might overflow negatively. | test.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:12 | ... -- | $@ flows an expression which might overflow negatively. | test3.c:10:27:10:30 | argv indirection | a command-line argument |
+| test.c:54:7:54:12 | ... -- | $@ flows an expression which might overflow negatively. | test.c:10:27:10:30 | argv indirection | a command-line argument |
diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-197/SAMATE/IntegerOverflowTainted/IntegerOverflowTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-197/SAMATE/IntegerOverflowTainted/IntegerOverflowTainted.expected
index 9965c10070d..cb31529859e 100644
--- a/cpp/ql/test/query-tests/Security/CWE/CWE-197/SAMATE/IntegerOverflowTainted/IntegerOverflowTainted.expected
+++ b/cpp/ql/test/query-tests/Security/CWE/CWE-197/SAMATE/IntegerOverflowTainted/IntegerOverflowTainted.expected
@@ -1 +1 @@
-| tests.cpp:38:31:38:34 | data | $@ flows an expression which might overflow. | tests.cpp:57:27:57:31 | & ... | User-provided value |
+| tests.cpp:38:25:38:34 | data | $@ flows an expression which might overflow. | tests.cpp:57:27:57:31 | fscanf output argument | value read by fscanf |
diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Assets.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Assets.cs
index 7558fd7970f..38db871d1b6 100644
--- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Assets.cs
+++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Assets.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using Newtonsoft.Json.Linq;
@@ -14,14 +15,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
private readonly ProgressMonitor progressMonitor;
- private static readonly string[] netFrameworks = new[] {
- "microsoft.aspnetcore.app.ref",
- "microsoft.netcore.app.ref",
- "microsoft.netframework.referenceassemblies",
- "microsoft.windowsdesktop.app.ref",
- "netstandard.library.ref"
- };
-
internal Assets(ProgressMonitor progressMonitor)
{
this.progressMonitor = progressMonitor;
@@ -68,19 +61,19 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
/// }
/// }
///
- /// Returns dependencies
- /// RequiredPaths = {
+ /// Adds the following dependencies
+ /// Paths: {
/// "castle.core/4.4.1/lib/netstandard1.5/Castle.Core.dll",
/// "json.net/1.0.33/lib/netstandard2.0/Json.Net.dll"
/// }
- /// UsedPackages = {
+ /// Packages: {
/// "castle.core",
/// "json.net"
/// }
///
- private DependencyContainer AddPackageDependencies(JObject json, DependencyContainer dependencies)
+ private void AddPackageDependencies(JObject json, DependencyContainer dependencies)
{
- // If there are more than one framework we need to pick just one.
+ // If there is more than one framework we need to pick just one.
// To ensure stability we pick one based on the lexicographic order of
// the framework names.
var references = json
@@ -93,7 +86,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
if (references is null)
{
progressMonitor.LogDebug("No references found in the targets section in the assets file.");
- return dependencies;
+ return;
}
// Find all the compile dependencies for each reference and
@@ -108,19 +101,83 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
return;
}
- // If this is a .NET framework reference then include everything.
- if (netFrameworks.Any(framework => name.StartsWith(framework)))
+ if (info.Compile is null || !info.Compile.Any())
{
- dependencies.Add(name);
- }
- else
- {
- info.Compile?
- .ForEach(r => dependencies.Add(name, r.Key));
+ // If this is a framework reference then include everything.
+ if (FrameworkPackageNames.AllFrameworks.Any(framework => name.StartsWith(framework)))
+ {
+ dependencies.AddFramework(name);
+ }
+ return;
}
+
+ info.Compile
+ .ForEach(r => dependencies.Add(name, r.Key));
});
- return dependencies;
+ return;
+ }
+
+ ///
+ /// Add the framework dependencies from the assets file to dependencies.
+ ///
+ /// Example:
+ /// "project": {
+ // "version": "1.0.0",
+ // "frameworks": {
+ // "net7.0": {
+ // "frameworkReferences": {
+ // "Microsoft.AspNetCore.App": {
+ // "privateAssets": "none"
+ // },
+ // "Microsoft.NETCore.App": {
+ // "privateAssets": "all"
+ // }
+ // }
+ // }
+ // }
+ // }
+ //
+ /// Adds the following dependencies
+ /// Paths: {
+ /// "microsoft.aspnetcore.app.ref",
+ /// "microsoft.netcore.app.ref"
+ /// }
+ /// Packages: {
+ /// "microsoft.aspnetcore.app.ref",
+ /// "microsoft.netcore.app.ref"
+ /// }
+ ///
+ private void AddFrameworkDependencies(JObject json, DependencyContainer dependencies)
+ {
+
+ var frameworks = json
+ .GetProperty("project")?
+ .GetProperty("frameworks");
+
+ if (frameworks is null)
+ {
+ progressMonitor.LogDebug("No framework section in assets.json.");
+ return;
+ }
+
+ // If there is more than one framework we need to pick just one.
+ // To ensure stability we pick one based on the lexicographic order of
+ // the framework names.
+ var references = frameworks
+ .Properties()?
+ .MaxBy(p => p.Name)?
+ .Value["frameworkReferences"] as JObject;
+
+ if (references is null)
+ {
+ progressMonitor.LogDebug("No framework references in assets.json.");
+ return;
+ }
+
+ references
+ .Properties()
+ .ForEach(f => dependencies.AddFramework($"{f.Name}.Ref".ToLowerInvariant()));
}
///
@@ -134,6 +191,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
var obj = JObject.Parse(json);
AddPackageDependencies(obj, dependencies);
+ AddFrameworkDependencies(obj, dependencies);
return true;
}
catch (Exception e)
@@ -143,14 +201,31 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
}
+ private static bool TryReadAllText(string path, ProgressMonitor progressMonitor, [NotNullWhen(returnValue: true)] out string? content)
+ {
+ try
+ {
+ content = File.ReadAllText(path);
+ return true;
+ }
+ catch (Exception e)
+ {
+ progressMonitor.LogInfo($"Failed to read assets file '{path}': {e.Message}");
+ content = null;
+ return false;
+ }
+ }
+
public static DependencyContainer GetCompilationDependencies(ProgressMonitor progressMonitor, IEnumerable assets)
{
var parser = new Assets(progressMonitor);
var dependencies = new DependencyContainer();
assets.ForEach(asset =>
{
- var json = File.ReadAllText(asset);
- parser.TryParse(json, dependencies);
+ if (TryReadAllText(asset, progressMonitor, out var json))
+ {
+ parser.TryParse(json, dependencies);
+ }
});
return dependencies;
}
diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyContainer.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyContainer.cs
index 4c0586c7f83..d3858f17fe1 100644
--- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyContainer.cs
+++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyContainer.cs
@@ -9,14 +9,19 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
///
internal class DependencyContainer
{
- private readonly List requiredPaths = new();
- private readonly HashSet usedPackages = new();
+ ///
+ /// Paths to dependencies required for compilation.
+ ///
+ public List Paths { get; } = new();
///
- /// In most cases paths in asset files point to dll's or the empty _._ file, which
- /// is sometimes there to avoid the directory being empty.
- /// That is, if the path specifically adds a .dll we use that, otherwise we as a fallback
- /// add the entire directory (which should be fine in case of _._ as well).
+ /// Packages that are used as a part of the required dependencies.
+ ///
+ public HashSet Packages { get; } = new();
+
+ ///
+ /// If the path specifically adds a .dll we use that, otherwise we as a fallback
+ /// add the entire directory.
///
private static string ParseFilePath(string path)
{
@@ -32,16 +37,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
.Split(Path.DirectorySeparatorChar)
.First();
- ///
- /// Paths to dependencies required for compilation.
- ///
- public IEnumerable RequiredPaths => requiredPaths;
-
- ///
- /// Packages that are used as a part of the required dependencies.
- ///
- public HashSet UsedPackages => usedPackages;
-
///
/// Add a dependency inside a package.
///
@@ -50,20 +45,27 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
var p = package.Replace('/', Path.DirectorySeparatorChar);
var d = dependency.Replace('/', Path.DirectorySeparatorChar);
+ // In most cases paths in asset files point to dll's or the empty _._ file.
+ // That is, for _._ we don't need to add anything.
+ if (Path.GetFileName(d) == "_._")
+ {
+ return;
+ }
+
var path = Path.Combine(p, ParseFilePath(d));
- requiredPaths.Add(path);
- usedPackages.Add(GetPackageName(p));
+ Paths.Add(path);
+ Packages.Add(GetPackageName(p));
}
///
- /// Add a dependency to an entire package
+ /// Add a dependency to an entire framework package.
///
- public void Add(string package)
+ public void AddFramework(string framework)
{
- var p = package.Replace('/', Path.DirectorySeparatorChar);
+ var p = framework.Replace('/', Path.DirectorySeparatorChar);
- requiredPaths.Add(p);
- usedPackages.Add(GetPackageName(p));
+ Paths.Add(p);
+ Packages.Add(GetPackageName(p));
}
}
}
\ No newline at end of file
diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs
index e315b194bd0..9bb78cc8d7c 100644
--- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs
+++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs
@@ -119,7 +119,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
var dependencies = Assets.GetCompilationDependencies(progressMonitor, assets1.Union(assets2));
var paths = dependencies
- .RequiredPaths
+ .Paths
.Select(d => Path.Combine(packageDirectory.DirInfo.FullName, d))
.ToList();
dllPaths.UnionWith(paths);
@@ -232,13 +232,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
// Multiple dotnet framework packages could be present.
// The order of the packages is important, we're adding the first one that is present in the nuget cache.
- var packagesInPrioOrder = new string[]
- {
- "microsoft.netcore.app.ref", // net7.0, ... net5.0, netcoreapp3.1, netcoreapp3.0
- "microsoft.netframework.referenceassemblies.", // net48, ..., net20
- "netstandard.library.ref", // netstandard2.1
- "netstandard.library" // netstandard2.0
- };
+ var packagesInPrioOrder = FrameworkPackageNames.NetFrameworks;
var frameworkPath = packagesInPrioOrder
.Select((s, index) => (Index: index, Path: GetPackageDirectory(s)))
@@ -308,7 +302,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
// First try to find ASP.NET Core assemblies in the NuGet packages
- if (GetPackageDirectory("microsoft.aspnetcore.app.ref") is string aspNetCorePackage)
+ if (GetPackageDirectory(FrameworkPackageNames.AspNetCoreFramework) is string aspNetCorePackage)
{
progressMonitor.LogInfo($"Found ASP.NET Core in NuGet packages. Not adding installation directory.");
dllPaths.Add(aspNetCorePackage);
@@ -322,7 +316,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
private void AddMicrosoftWindowsDesktopDlls(ISet dllPaths)
{
- if (GetPackageDirectory("microsoft.windowsdesktop.app.ref") is string windowsDesktopApp)
+ if (GetPackageDirectory(FrameworkPackageNames.WindowsDesktopFramework) is string windowsDesktopApp)
{
progressMonitor.LogInfo($"Found Windows Desktop App in NuGet packages.");
dllPaths.Add(windowsDesktopApp);
@@ -356,7 +350,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
private void LogAllUnusedPackages(DependencyContainer dependencies) =>
GetAllPackageDirectories()
- .Where(package => !dependencies.UsedPackages.Contains(package))
+ .Where(package => !dependencies.Packages.Contains(package))
.ForEach(package => progressMonitor.LogInfo($"Unused package: {package}"));
private void GenerateSourceFileFromImplicitUsings()
diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs
index e8493a770db..a2af85a1c48 100644
--- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs
+++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs
@@ -128,7 +128,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
[GeneratedRegex("Restored\\s+(.+\\.csproj)", RegexOptions.Compiled)]
private static partial Regex RestoredProjectRegex();
- [GeneratedRegex("[Assets\\sfile\\shas\\snot\\schanged.\\sSkipping\\sassets\\sfile\\swriting.|Writing\\sassets\\sfile\\sto\\sdisk.]\\sPath:\\s(.*)", RegexOptions.Compiled)]
+ [GeneratedRegex("[Assets\\sfile\\shas\\snot\\schanged.\\sSkipping\\sassets\\sfile\\swriting.|Writing\\sassets\\sfile\\sto\\sdisk.]\\sPath:\\s(.+)", RegexOptions.Compiled)]
private static partial Regex AssetsFileRegex();
}
}
diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FrameworkPackageNames.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FrameworkPackageNames.cs
new file mode 100644
index 00000000000..7b4a076f99f
--- /dev/null
+++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FrameworkPackageNames.cs
@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Semmle.Extraction.CSharp.DependencyFetching
+{
+ internal static class FrameworkPackageNames
+ {
+ public static string AspNetCoreFramework { get; } = "microsoft.aspnetcore.app.ref";
+
+ public static string WindowsDesktopFramework { get; } = "microsoft.windowsdesktop.app.ref";
+
+ // The order of the packages is important.
+ public static string[] NetFrameworks { get; } = new string[]
+ {
+ "microsoft.netcore.app.ref", // net7.0, ... net5.0, netcoreapp3.1, netcoreapp3.0
+ "microsoft.netframework.referenceassemblies.", // net48, ..., net20
+ "netstandard.library.ref", // netstandard2.1
+ "netstandard.library" // netstandard2.0
+ };
+
+ public static IEnumerable AllFrameworks { get; } =
+ NetFrameworks
+ .Union(new string[] { AspNetCoreFramework, WindowsDesktopFramework });
+ }
+}
diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Populators/TypeContainerVisitor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Populators/TypeContainerVisitor.cs
index 2bd5a9f4e03..3a2caff6102 100644
--- a/csharp/extractor/Semmle.Extraction.CSharp/Populators/TypeContainerVisitor.cs
+++ b/csharp/extractor/Semmle.Extraction.CSharp/Populators/TypeContainerVisitor.cs
@@ -89,8 +89,10 @@ namespace Semmle.Extraction.CSharp.Populators
SyntaxKind.ModuleKeyword => Entities.AttributeKind.Module,
_ => throw new InternalError(node, "Unhandled global target")
};
- foreach (var attribute in node.Attributes)
+ var attributes = node.Attributes;
+ for (var i = 0; i < attributes.Count; i++)
{
+ var attribute = attributes[i];
if (attributeLookup.Value(attribute) is AttributeData attributeData)
{
var ae = Entities.Attribute.Create(Cx, attributeData, outputAssembly, kind);
diff --git a/csharp/extractor/Semmle.Extraction.Tests/Assets.cs b/csharp/extractor/Semmle.Extraction.Tests/Assets.cs
index 1dbd6f9d41c..85e56b6de64 100644
--- a/csharp/extractor/Semmle.Extraction.Tests/Assets.cs
+++ b/csharp/extractor/Semmle.Extraction.Tests/Assets.cs
@@ -21,49 +21,26 @@ namespace Semmle.Extraction.Tests
// Verify
Assert.True(success);
- Assert.Equal(5, dependencies.RequiredPaths.Count());
- Assert.Equal(4, dependencies.UsedPackages.Count());
+ Assert.Equal(6, dependencies.Paths.Count());
+ Assert.Equal(5, dependencies.Packages.Count());
- var normalizedPaths = dependencies.RequiredPaths.Select(FixExpectedPathOnWindows);
- // Required references
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+ // Used references
Assert.Contains("castle.core/4.4.1/lib/netstandard1.5/Castle.Core.dll", normalizedPaths);
Assert.Contains("castle.core/4.4.1/lib/netstandard1.5/Castle.Core2.dll", normalizedPaths);
Assert.Contains("json.net/1.0.33/lib/netstandard2.0/Json.Net.dll", normalizedPaths);
Assert.Contains("microsoft.aspnetcore.cryptography.internal/6.0.8/lib/net6.0/Microsoft.AspNetCore.Cryptography.Internal.dll", normalizedPaths);
- Assert.Contains("humanizer.core/2.8.26/lib/netstandard2.0", normalizedPaths);
// Used packages
- Assert.Contains("castle.core", dependencies.UsedPackages);
- Assert.Contains("json.net", dependencies.UsedPackages);
- Assert.Contains("microsoft.aspnetcore.cryptography.internal", dependencies.UsedPackages);
- Assert.Contains("humanizer.core", dependencies.UsedPackages);
+ Assert.Contains("castle.core", dependencies.Packages);
+ Assert.Contains("json.net", dependencies.Packages);
+ Assert.Contains("microsoft.aspnetcore.cryptography.internal", dependencies.Packages);
+ // Used frameworks
+ Assert.Contains("microsoft.netcore.app.ref", dependencies.Packages);
+ Assert.Contains("microsoft.aspnetcore.app.ref", dependencies.Packages);
}
[Fact]
- public void TestAssets2()
- {
- // Setup
- var assets = new Assets(new ProgressMonitor(new LoggerStub()));
- var json = assetsJson2;
- var dependencies = new DependencyContainer();
-
- // Execute
- var success = assets.TryParse(json, dependencies);
-
- // Verify
- Assert.True(success);
- Assert.Equal(2, dependencies.RequiredPaths.Count());
-
- var normalizedPaths = dependencies.RequiredPaths.Select(FixExpectedPathOnWindows);
- // Required references
- Assert.Contains("microsoft.netframework.referenceassemblies/1.0.3", normalizedPaths);
- Assert.Contains("microsoft.netframework.referenceassemblies.net48/1.0.3", normalizedPaths);
- // Used packages
- Assert.Contains("microsoft.netframework.referenceassemblies", dependencies.UsedPackages);
- Assert.Contains("microsoft.netframework.referenceassemblies.net48", dependencies.UsedPackages);
- }
-
- [Fact]
- public void TestAssets3()
+ public void TestAssetsFailure()
{
// Setup
var assets = new Assets(new ProgressMonitor(new LoggerStub()));
@@ -75,9 +52,186 @@ namespace Semmle.Extraction.Tests
// Verify
Assert.False(success);
- Assert.Empty(dependencies.RequiredPaths);
+ Assert.Empty(dependencies.Paths);
}
+ [Fact]
+ public void TestAssetsNet70()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNet70;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+ Assert.Equal(4, dependencies.Paths.Count);
+ Assert.Equal(4, dependencies.Packages.Count);
+
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+ // Used paths
+ Assert.Contains("microsoft.netcore.app.ref", normalizedPaths);
+ Assert.Contains("microsoft.aspnetcore.app.ref", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/netstandard2.0/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/netstandard2.0/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("microsoft.netcore.app.ref", dependencies.Packages);
+ Assert.Contains("microsoft.aspnetcore.app.ref", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+
+ }
+
+ [Fact]
+ public void TestAssetsNet48()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNet48;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+ Assert.Equal(3, dependencies.Paths.Count);
+ Assert.Equal(3, dependencies.Packages.Count);
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+ // Used references
+ Assert.Contains("microsoft.netframework.referenceassemblies.net48/1.0.2", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/net45/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/net45/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("microsoft.netframework.referenceassemblies.net48", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+ }
+
+ [Fact]
+ public void TestAssetsNetstandard21()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNetstandard21;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+ Assert.Equal(3, dependencies.Paths.Count);
+ Assert.Equal(3, dependencies.Packages.Count);
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+
+ // Used references
+ Assert.Contains("netstandard.library.ref", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/netstandard2.0/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/netstandard2.0/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("netstandard.library.ref", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+ }
+
+ [Fact]
+ public void TestAssetsNetStandard16()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNetstandard16;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+ Assert.Equal(5, dependencies.Paths.Count);
+ Assert.Equal(5, dependencies.Packages.Count);
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+
+ // Used references
+ Assert.Contains("netstandard.library/1.6.1", normalizedPaths);
+ Assert.Contains("microsoft.csharp/4.3.0/ref/netstandard1.0/Microsoft.CSharp.dll", normalizedPaths);
+ Assert.Contains("microsoft.win32.primitives/4.3.0/ref/netstandard1.3/Microsoft.Win32.Primitives.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/netstandard1.3/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/netstandard1.3/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("netstandard.library", dependencies.Packages);
+ Assert.Contains("microsoft.csharp", dependencies.Packages);
+ Assert.Contains("microsoft.win32.primitives", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+ }
+
+ [Fact]
+ public void TestAssetsNetcoreapp20()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNetcoreapp20;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+ Assert.Equal(144, dependencies.Paths.Count);
+ Assert.Equal(3, dependencies.Packages.Count);
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+
+ // Used references (only some of them)
+ Assert.Contains("microsoft.netcore.app/2.0.0/ref/netcoreapp2.0/Microsoft.CSharp.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/netstandard2.0/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/netstandard2.0/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("microsoft.netcore.app", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+ }
+
+ [Fact]
+ public void TestAssetsNetcoreapp31()
+ {
+ // Setup
+ var assets = new Assets(new ProgressMonitor(new LoggerStub()));
+ var json = assetsNetcoreapp31;
+ var dependencies = new DependencyContainer();
+
+ // Execute
+ var success = assets.TryParse(json, dependencies);
+
+ // Verify
+ Assert.True(success);
+
+ var normalizedPaths = dependencies.Paths.Select(FixExpectedPathOnWindows);
+
+ // Used paths
+ Assert.Contains("microsoft.netcore.app.ref", normalizedPaths);
+ Assert.Contains("microsoft.aspnetcore.app.ref", normalizedPaths);
+ Assert.Contains("newtonsoft.json/12.0.1/lib/netstandard2.0/Newtonsoft.Json.dll", normalizedPaths);
+ Assert.Contains("newtonsoft.json.bson/1.0.2/lib/netstandard2.0/Newtonsoft.Json.Bson.dll", normalizedPaths);
+ // Used packages
+ Assert.Contains("microsoft.netcore.app.ref", dependencies.Packages);
+ Assert.Contains("microsoft.aspnetcore.app.ref", dependencies.Packages);
+ Assert.Contains("newtonsoft.json", dependencies.Packages);
+ Assert.Contains("newtonsoft.json.bson", dependencies.Packages);
+ }
+
+ ///
+ /// This is manually created JSON string with the same structure as the assets file.
+ ///
private readonly string assetsJson1 = """
{
"version": 3,
@@ -181,25 +335,1326 @@ namespace Semmle.Extraction.Tests
}
""";
- private readonly string assetsJson2 = """
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// net70
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNet70 = """
{
- "version": 3,
- "targets": {
- ".NETFramework,Version=v4.8": {
- "Microsoft.NETFramework.ReferenceAssemblies/1.0.3": {
- "type": "package",
- "dependencies": {
- "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
- }
- },
- "Microsoft.NETFramework.ReferenceAssemblies.net48/1.0.3": {
- "type": "package",
- "build": {
- "build/Microsoft.NETFramework.ReferenceAssemblies.net48.targets": {}
- }
- }
+ "version": 3,
+ "targets": {
+ "net7.0": {
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
}
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net70"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net7.0": {
+ "targetAlias": "net70",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net7.0": {
+ "targetAlias": "net70",
+ "dependencies": {
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "downloadDependencies": [
+ {
+ "name": "Microsoft.AspNetCore.App.Ref",
+ "version": "[7.0.2, 7.0.2]"
+ },
+ {
+ "name": "Microsoft.NETCore.App.Host.osx-x64",
+ "version": "[7.0.2, 7.0.2]"
+ },
+ {
+ "name": "Microsoft.NETCore.App.Ref",
+ "version": "[7.0.2, 7.0.2]"
+ }
+ ],
+ "frameworkReferences": {
+ "Microsoft.AspNetCore.App": {
+ "privateAssets": "none"
+ },
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
+""";
+
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// net4.8
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNet48 = """
+{
+ "version": 3,
+ "targets": {
+ ".NETFramework,Version=v4.8": {
+ "Microsoft.NETFramework.ReferenceAssemblies/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.2"
+ }
+ },
+ "Microsoft.NETFramework.ReferenceAssemblies.net48/1.0.2": {
+ "type": "package",
+ "build": {
+ "build/Microsoft.NETFramework.ReferenceAssemblies.net48.targets": {}
+ }
+ },
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "compile": {
+ "lib/net45/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/net45/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/net45/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/net45/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETFramework,Version=v4.8": [
+ "Microsoft.NETFramework.ReferenceAssemblies >= 1.0.2",
+ "Newtonsoft.Json.Bson >= 1.0.2"
+ ]
+ },
+ "packageFolders": {
+ "/Users/michaelnebel/Work/playground/csharpwebapp/packages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "net4.8"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "net48": {
+ "targetAlias": "net4.8",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "net48": {
+ "targetAlias": "net4.8",
+ "dependencies": {
+ "Microsoft.NETFramework.ReferenceAssemblies": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[1.0.2, )",
+ "autoReferenced": true
+ },
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
+""";
+
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// netstandard2.1
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNetstandard21 = """
+{
+ "version": 3,
+ "targets": {
+ ".NETStandard,Version=v2.1": {
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETStandard,Version=v2.1": [
+ "Newtonsoft.Json.Bson >= 1.0.2"
+ ]
+ },
+ "packageFolders": {
+ "/Users/michaelnebel/Work/playground/csharpwebapp/packages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "netstandard2.1"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netstandard2.1": {
+ "targetAlias": "netstandard2.1",
+ "dependencies": {
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "downloadDependencies": [
+ {
+ "name": "NETStandard.Library.Ref",
+ "version": "[2.1.0, 2.1.0]"
+ }
+ ],
+ "frameworkReferences": {
+ "NETStandard.Library": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
+""";
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// netstandard1.6
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNetstandard16 = """
+{
+ "version": 3,
+ "targets": {
+ ".NETStandard,Version=v1.6": {
+ "Microsoft.CSharp/4.3.0": {
+ "type": "package",
+ "dependencies": {
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Dynamic.Runtime": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Linq.Expressions": "4.3.0",
+ "System.ObjectModel": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Reflection.Extensions": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Reflection.TypeExtensions": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Threading": "4.3.0"
+ },
+ "compile": {
+ "ref/netstandard1.0/Microsoft.CSharp.dll": {
+ "related": ".xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard1.3/Microsoft.CSharp.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard1.0/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard1.0/_._": {}
+ }
+ },
+ "Microsoft.NETCore.Targets/1.1.0": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard1.0/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard1.0/_._": {}
+ }
+ },
+ "Microsoft.Win32.Primitives/4.3.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ },
+ "compile": {
+ "ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {
+ "related": ".xml"
+ }
+ }
+ },
+ "NETStandard.Library/1.6.1": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.Win32.Primitives": "4.3.0",
+ "System.AppContext": "4.3.0",
+ "System.Collections": "4.3.0",
+ "System.Collections.Concurrent": "4.3.0",
+ "System.Console": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Diagnostics.Tools": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.Globalization.Calendars": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.Compression": "4.3.0",
+ "System.IO.Compression.ZipFile": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Linq.Expressions": "4.3.0",
+ "System.Net.Http": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Net.Sockets": "4.3.0",
+ "System.ObjectModel": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Reflection.Extensions": "4.3.0",
+ "System.Reflection.Primitives": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
+ "System.Runtime.Numerics": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Security.Cryptography.X509Certificates": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Text.Encoding.Extensions": "4.3.0",
+ "System.Text.RegularExpressions": "4.3.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Tasks": "4.3.0",
+ "System.Threading.Timer": "4.3.0",
+ "System.Xml.ReaderWriter": "4.3.0",
+ "System.Xml.XDocument": "4.3.0"
+ }
+ },
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.CSharp": "4.3.0",
+ "NETStandard.Library": "1.6.1",
+ "System.ComponentModel.TypeConverter": "4.3.0",
+ "System.Runtime.Serialization.Formatters": "4.3.0",
+ "System.Runtime.Serialization.Primitives": "4.3.0",
+ "System.Xml.XmlDocument": "4.3.0"
+ },
+ "compile": {
+ "lib/netstandard1.3/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard1.3/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "NETStandard.Library": "1.6.1",
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETStandard,Version=v1.6": [
+ "NETStandard.Library >= 1.6.1",
+ "Newtonsoft.Json.Bson >= 1.0.2"
+ ]
+ },
+ "packageFolders": {
+ "/Users/michaelnebel/Work/playground/csharpwebapp/packages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "netstandard1.6"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netstandard1.6": {
+ "targetAlias": "netstandard1.6",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netstandard1.6": {
+ "targetAlias": "netstandard1.6",
+ "dependencies": {
+ "NETStandard.Library": {
+ "target": "Package",
+ "version": "[1.6.1, )",
+ "autoReferenced": true
+ },
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
+""";
+
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// netcoreapp2.0
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNetcoreapp20 = """
+{
+ "version": 3,
+ "targets": {
+ ".NETCoreApp,Version=v2.0": {
+ "Microsoft.NETCore.App/2.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.DotNetHostPolicy": "2.0.0",
+ "Microsoft.NETCore.Platforms": "2.0.0",
+ "NETStandard.Library": "2.0.0"
+ },
+ "compile": {
+ "ref/netcoreapp2.0/Microsoft.CSharp.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/Microsoft.VisualBasic.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/Microsoft.Win32.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.AppContext.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Buffers.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Collections.Concurrent.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Collections.Immutable.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Collections.NonGeneric.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Collections.Specialized.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Collections.dll": {
+ "related": ".Concurrent.xml;.Immutable.xml;.NonGeneric.xml;.Specialized.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.ComponentModel.Annotations.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.ComponentModel.Composition.dll": {},
+ "ref/netcoreapp2.0/System.ComponentModel.DataAnnotations.dll": {},
+ "ref/netcoreapp2.0/System.ComponentModel.EventBasedAsync.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.ComponentModel.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.ComponentModel.TypeConverter.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.ComponentModel.dll": {
+ "related": ".Annotations.xml;.EventBasedAsync.xml;.Primitives.xml;.TypeConverter.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Configuration.dll": {},
+ "ref/netcoreapp2.0/System.Console.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Core.dll": {},
+ "ref/netcoreapp2.0/System.Data.Common.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Data.dll": {
+ "related": ".Common.xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.Contracts.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.Debug.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.DiagnosticSource.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.FileVersionInfo.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.Process.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.StackTrace.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.TextWriterTraceListener.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.Tools.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.TraceSource.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Diagnostics.Tracing.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Drawing.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Drawing.dll": {
+ "related": ".Primitives.xml"
+ },
+ "ref/netcoreapp2.0/System.Dynamic.Runtime.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Globalization.Calendars.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Globalization.Extensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Globalization.dll": {
+ "related": ".Calendars.xml;.Extensions.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.IO.Compression.FileSystem.dll": {},
+ "ref/netcoreapp2.0/System.IO.Compression.ZipFile.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.Compression.dll": {
+ "related": ".xml;.ZipFile.xml"
+ },
+ "ref/netcoreapp2.0/System.IO.FileSystem.DriveInfo.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.FileSystem.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.FileSystem.Watcher.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.FileSystem.dll": {
+ "related": ".DriveInfo.xml;.Primitives.xml;.Watcher.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.IO.IsolatedStorage.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.MemoryMappedFiles.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.Pipes.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.UnmanagedMemoryStream.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.IO.dll": {
+ "related": ".Compression.xml;.Compression.ZipFile.xml;.FileSystem.DriveInfo.xml;.FileSystem.Primitives.xml;.FileSystem.Watcher.xml;.FileSystem.xml;.IsolatedStorage.xml;.MemoryMappedFiles.xml;.Pipes.xml;.UnmanagedMemoryStream.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Linq.Expressions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Linq.Parallel.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Linq.Queryable.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Linq.dll": {
+ "related": ".Expressions.xml;.Parallel.xml;.Queryable.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Http.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.HttpListener.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Mail.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.NameResolution.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.NetworkInformation.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Ping.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Requests.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Security.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.ServicePoint.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.Sockets.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.WebClient.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.WebHeaderCollection.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.WebProxy.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.WebSockets.Client.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Net.WebSockets.dll": {
+ "related": ".Client.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Net.dll": {
+ "related": ".Http.xml;.HttpListener.xml;.Mail.xml;.NameResolution.xml;.NetworkInformation.xml;.Ping.xml;.Primitives.xml;.Requests.xml;.Security.xml;.ServicePoint.xml;.Sockets.xml;.WebClient.xml;.WebHeaderCollection.xml;.WebProxy.xml;.WebSockets.Client.xml;.WebSockets.xml"
+ },
+ "ref/netcoreapp2.0/System.Numerics.Vectors.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Numerics.dll": {
+ "related": ".Vectors.xml"
+ },
+ "ref/netcoreapp2.0/System.ObjectModel.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.DispatchProxy.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Emit.ILGeneration.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Emit.Lightweight.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Emit.dll": {
+ "related": ".ILGeneration.xml;.Lightweight.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Extensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Metadata.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.TypeExtensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Reflection.dll": {
+ "related": ".DispatchProxy.xml;.Emit.ILGeneration.xml;.Emit.Lightweight.xml;.Emit.xml;.Extensions.xml;.Metadata.xml;.Primitives.xml;.TypeExtensions.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Resources.Reader.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Resources.ResourceManager.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Resources.Writer.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.CompilerServices.VisualC.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Extensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Handles.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.InteropServices.RuntimeInformation.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.InteropServices.WindowsRuntime.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.InteropServices.dll": {
+ "related": ".RuntimeInformation.xml;.WindowsRuntime.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Loader.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Numerics.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Serialization.Formatters.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Serialization.Json.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Serialization.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Serialization.Xml.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.Serialization.dll": {
+ "related": ".Formatters.xml;.Json.xml;.Primitives.xml;.Xml.xml"
+ },
+ "ref/netcoreapp2.0/System.Runtime.dll": {
+ "related": ".CompilerServices.VisualC.xml;.Extensions.xml;.Handles.xml;.InteropServices.RuntimeInformation.xml;.InteropServices.WindowsRuntime.xml;.InteropServices.xml;.Loader.xml;.Numerics.xml;.Serialization.Formatters.xml;.Serialization.Json.xml;.Serialization.Primitives.xml;.Serialization.Xml.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Claims.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Cryptography.Algorithms.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Cryptography.Csp.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Cryptography.Encoding.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Cryptography.Primitives.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Cryptography.X509Certificates.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.Principal.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.SecureString.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Security.dll": {
+ "related": ".Claims.xml;.Cryptography.Algorithms.xml;.Cryptography.Csp.xml;.Cryptography.Encoding.xml;.Cryptography.Primitives.xml;.Cryptography.X509Certificates.xml;.Principal.xml;.SecureString.xml"
+ },
+ "ref/netcoreapp2.0/System.ServiceModel.Web.dll": {},
+ "ref/netcoreapp2.0/System.ServiceProcess.dll": {},
+ "ref/netcoreapp2.0/System.Text.Encoding.Extensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Text.Encoding.dll": {
+ "related": ".Extensions.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Text.RegularExpressions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Overlapped.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Tasks.Dataflow.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Tasks.Extensions.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Tasks.Parallel.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Tasks.dll": {
+ "related": ".Dataflow.xml;.Extensions.xml;.Parallel.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Thread.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.ThreadPool.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.Timer.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Threading.dll": {
+ "related": ".Overlapped.xml;.Tasks.Dataflow.xml;.Tasks.Extensions.xml;.Tasks.Parallel.xml;.Tasks.xml;.Thread.xml;.ThreadPool.xml;.Timer.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Transactions.Local.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Transactions.dll": {
+ "related": ".Local.xml"
+ },
+ "ref/netcoreapp2.0/System.ValueTuple.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Web.HttpUtility.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Web.dll": {
+ "related": ".HttpUtility.xml"
+ },
+ "ref/netcoreapp2.0/System.Windows.dll": {},
+ "ref/netcoreapp2.0/System.Xml.Linq.dll": {},
+ "ref/netcoreapp2.0/System.Xml.ReaderWriter.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.Serialization.dll": {},
+ "ref/netcoreapp2.0/System.Xml.XDocument.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.XPath.XDocument.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.XPath.dll": {
+ "related": ".XDocument.xml;.xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.XmlDocument.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.XmlSerializer.dll": {
+ "related": ".xml"
+ },
+ "ref/netcoreapp2.0/System.Xml.dll": {
+ "related": ".ReaderWriter.xml;.XDocument.xml;.XmlDocument.xml;.XmlSerializer.xml;.XPath.XDocument.xml;.XPath.xml"
+ },
+ "ref/netcoreapp2.0/System.dll": {
+ "related": ".AppContext.xml;.Buffers.xml;.Collections.Concurrent.xml;.Collections.Immutable.xml;.Collections.NonGeneric.xml;.Collections.Specialized.xml;.Collections.xml;.ComponentModel.Annotations.xml;.ComponentModel.EventBasedAsync.xml;.ComponentModel.Primitives.xml;.ComponentModel.TypeConverter.xml;.ComponentModel.xml;.Console.xml;.Data.Common.xml;.Diagnostics.Contracts.xml;.Diagnostics.Debug.xml;.Diagnostics.DiagnosticSource.xml;.Diagnostics.FileVersionInfo.xml;.Diagnostics.Process.xml;.Diagnostics.StackTrace.xml;.Diagnostics.TextWriterTraceListener.xml;.Diagnostics.Tools.xml;.Diagnostics.TraceSource.xml;.Diagnostics.Tracing.xml;.Drawing.Primitives.xml;.Dynamic.Runtime.xml;.Globalization.Calendars.xml;.Globalization.Extensions.xml;.Globalization.xml;.IO.Compression.xml;.IO.Compression.ZipFile.xml;.IO.FileSystem.DriveInfo.xml;.IO.FileSystem.Primitives.xml;.IO.FileSystem.Watcher.xml;.IO.FileSystem.xml;.IO.IsolatedStorage.xml;.IO.MemoryMappedFiles.xml;.IO.Pipes.xml;.IO.UnmanagedMemoryStream.xml;.IO.xml;.Linq.Expressions.xml;.Linq.Parallel.xml;.Linq.Queryable.xml;.Linq.xml;.Net.Http.xml;.Net.HttpListener.xml;.Net.Mail.xml;.Net.NameResolution.xml;.Net.NetworkInformation.xml;.Net.Ping.xml;.Net.Primitives.xml;.Net.Requests.xml;.Net.Security.xml;.Net.ServicePoint.xml;.Net.Sockets.xml;.Net.WebClient.xml;.Net.WebHeaderCollection.xml;.Net.WebProxy.xml;.Net.WebSockets.Client.xml;.Net.WebSockets.xml;.Numerics.Vectors.xml;.ObjectModel.xml;.Reflection.DispatchProxy.xml;.Reflection.Emit.ILGeneration.xml;.Reflection.Emit.Lightweight.xml;.Reflection.Emit.xml;.Reflection.Extensions.xml;.Reflection.Metadata.xml;.Reflection.Primitives.xml;.Reflection.TypeExtensions.xml;.Reflection.xml;.Resources.Reader.xml;.Resources.ResourceManager.xml;.Resources.Writer.xml;.Runtime.CompilerServices.VisualC.xml;.Runtime.Extensions.xml;.Runtime.Handles.xml;.Runtime.InteropServices.RuntimeInformation.xml;.Runtime.InteropServices.WindowsRuntime.xml;.Runtime.InteropServices.xml;.Runtime.Loader.xml;.Runtime.Numerics.xml;.Runtime.Serialization.Formatters.xml;.Runtime.Serialization.Json.xml;.Runtime.Serialization.Primitives.xml;.Runtime.Serialization.Xml.xml;.Runtime.xml;.Security.Claims.xml;.Security.Cryptography.Algorithms.xml;.Security.Cryptography.Csp.xml;.Security.Cryptography.Encoding.xml;.Security.Cryptography.Primitives.xml;.Security.Cryptography.X509Certificates.xml;.Security.Principal.xml;.Security.SecureString.xml;.Text.Encoding.Extensions.xml;.Text.Encoding.xml;.Text.RegularExpressions.xml;.Threading.Overlapped.xml;.Threading.Tasks.Dataflow.xml;.Threading.Tasks.Extensions.xml;.Threading.Tasks.Parallel.xml;.Threading.Tasks.xml;.Threading.Thread.xml;.Threading.ThreadPool.xml;.Threading.Timer.xml;.Threading.xml;.Transactions.Local.xml;.ValueTuple.xml;.Web.HttpUtility.xml;.Xml.ReaderWriter.xml;.Xml.XDocument.xml;.Xml.XmlDocument.xml;.Xml.XmlSerializer.xml;.Xml.XPath.XDocument.xml;.Xml.XPath.xml"
+ },
+ "ref/netcoreapp2.0/WindowsBase.dll": {},
+ "ref/netcoreapp2.0/mscorlib.dll": {},
+ "ref/netcoreapp2.0/netstandard.dll": {}
+ },
+ "build": {
+ "build/netcoreapp2.0/Microsoft.NETCore.App.props": {},
+ "build/netcoreapp2.0/Microsoft.NETCore.App.targets": {}
+ }
+ },
+ "Microsoft.NETCore.DotNetAppHost/2.0.0": {
+ "type": "package"
+ },
+ "Microsoft.NETCore.DotNetHostPolicy/2.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.DotNetHostResolver": "2.0.0"
+ }
+ },
+ "Microsoft.NETCore.DotNetHostResolver/2.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.DotNetAppHost": "2.0.0"
+ }
+ },
+ "Microsoft.NETCore.Platforms/2.0.0": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard1.0/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard1.0/_._": {}
+ }
+ },
+ "NETStandard.Library/2.0.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ },
+ "compile": {
+ "lib/netstandard1.0/_._": {}
+ },
+ "runtime": {
+ "lib/netstandard1.0/_._": {}
+ },
+ "build": {
+ "build/netstandard2.0/NETStandard.Library.targets": {}
+ }
+ },
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETCoreApp,Version=v2.0": [
+ "Microsoft.NETCore.App >= 2.0.0",
+ "Newtonsoft.Json.Bson >= 1.0.2"
+ ]
+ },
+ "packageFolders": {
+ "/Users/michaelnebel/Work/playground/csharpwebapp/packages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp2.0"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp2.0": {
+ "targetAlias": "netcoreapp2.0",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp2.0": {
+ "targetAlias": "netcoreapp2.0",
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "suppressParent": "All",
+ "target": "Package",
+ "version": "[2.0.0, )",
+ "autoReferenced": true
+ },
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
+""";
+
+ ///
+ /// This is part of the content of the assets file that dotnet generates based on the
+ /// following project file content.
+ ///
+ ///
+ ///
+ /// netcoreapp3.1
+ /// enable
+ /// enable
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private readonly string assetsNetcoreapp31 = """
+{
+ "version": 3,
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {
+ "Newtonsoft.Json/12.0.1": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ },
+ "Newtonsoft.Json.Bson/1.0.2": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.1"
+ },
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
+ "related": ".pdb;.xml"
+ }
+ }
+ }
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETCoreApp,Version=v3.1": [
+ "Newtonsoft.Json.Bson >= 1.0.2"
+ ]
+ },
+ "packageFolders": {
+ "/Users/michaelnebel/Work/playground/csharpwebapp/packages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "projectName": "csharpwebapp",
+ "projectPath": "/Users/michaelnebel/Work/playground/csharpwebapp/csharpwebapp.csproj",
+ "packagesPath": "/Users/michaelnebel/Work/playground/csharpwebapp/packages",
+ "outputPath": "/Users/michaelnebel/Work/playground/csharpwebapp/obj/",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "/Users/michaelnebel/.nuget/NuGet/NuGet.Config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "dependencies": {
+ "Newtonsoft.Json.Bson": {
+ "target": "Package",
+ "version": "[1.0.2, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "downloadDependencies": [
+ {
+ "name": "Microsoft.AspNetCore.App.Ref",
+ "version": "[3.1.10, 3.1.10]"
+ },
+ {
+ "name": "Microsoft.NETCore.App.Host.osx-x64",
+ "version": "[3.1.32, 3.1.32]"
+ },
+ {
+ "name": "Microsoft.NETCore.App.Ref",
+ "version": "[3.1.0, 3.1.0]"
+ }
+ ],
+ "frameworkReferences": {
+ "Microsoft.AspNetCore.App": {
+ "privateAssets": "none"
+ },
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "/Users/michaelnebel/.dotnet/sdk/7.0.102/RuntimeIdentifierGraph.json"
+ }
+ }
+ }
}
""";
}
diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md
index 8e37908e0fc..e9d0229bf18 100644
--- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md
+++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.7.3
+
+No user-facing changes.
+
## 1.7.2
No user-facing changes.
diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.3.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.3.md
new file mode 100644
index 00000000000..a629082e215
--- /dev/null
+++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.3.md
@@ -0,0 +1,3 @@
+## 1.7.3
+
+No user-facing changes.
diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml
index 39bbba86c19..9f9661b1e77 100644
--- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml
+++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 1.7.2
+lastReleaseVersion: 1.7.3
diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml
index 2adbcb7101e..5d2515728d1 100644
--- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml
+++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-all
-version: 1.7.3-dev
+version: 1.7.4-dev
groups:
- csharp
- solorigate
diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md
index 8e37908e0fc..e9d0229bf18 100644
--- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md
+++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.7.3
+
+No user-facing changes.
+
## 1.7.2
No user-facing changes.
diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.3.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.3.md
new file mode 100644
index 00000000000..a629082e215
--- /dev/null
+++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.3.md
@@ -0,0 +1,3 @@
+## 1.7.3
+
+No user-facing changes.
diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml
index 39bbba86c19..9f9661b1e77 100644
--- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml
+++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 1.7.2
+lastReleaseVersion: 1.7.3
diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml
index 2b213c24246..0f973ee2b36 100644
--- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml
+++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-queries
-version: 1.7.3-dev
+version: 1.7.4-dev
groups:
- csharp
- solorigate
diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py
index b91e73ef11c..258f5f3b764 100644
--- a/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py
+++ b/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py
@@ -2,10 +2,10 @@ import os
from create_database_utils import *
from diagnostics_test_utils import *
-run_codeql_database_create(['dotnet pack'], db=None, lang="csharp")
+run_codeql_database_create(['dotnet pack -o nugetpackage'], db=None, lang="csharp")
## Check that the NuGet package is created.
-if not os.path.isfile("bin/Debug/dotnet_pack.1.0.0.nupkg"):
+if not os.path.isfile("nugetpackage/dotnet_pack.1.0.0.nupkg"):
raise Exception("The NuGet package was not created.")
check_diagnostics()
diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj b/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj
index 95c7586e04e..c6d0c87e9db 100644
--- a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj
+++ b/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj
@@ -7,6 +7,7 @@
falseExe
+ false
diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md
index 71fbec9d4fe..5109822d6b3 100644
--- a/csharp/ql/lib/CHANGELOG.md
+++ b/csharp/ql/lib/CHANGELOG.md
@@ -1,3 +1,49 @@
+## 0.8.3
+
+### Minor Analysis Improvements
+
+* The predicate `UnboundGeneric::getName` now prints the number of type parameters as a `` `N`` suffix, instead of a `<,...,>` suffix. For example, the unbound generic type
+`System.Collections.Generic.IList` is printed as ``IList`1`` instead of `IList<>`.
+* The predicates `hasQualifiedName`, `getQualifiedName`, and `getQualifiedNameWithTypes` have been deprecated, and are instead replaced by `hasFullyQualifiedName`, `getFullyQualifiedName`, and `getFullyQualifiedNameWithTypes`, respectively. The new predicates use the same format for unbound generic types as mentioned above.
+* These changes also affect models-as-data rows that refer to a field or a property belonging to a generic type. For example, instead of writing
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "Dictionary", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+```
+one now writes
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "Dictionary", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Key]", "value", "manual"]
+```
+* The models-as-data format for types and methods with type parameters has been changed to include the names of the type parameters. For example, instead of writing
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "IList<>", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Linq", "Enumerable", False, "Select<,>", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
+```
+one now writes
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "IList", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Linq", "Enumerable", False, "Select", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
+```
+
## 0.8.2
No user-facing changes.
diff --git a/csharp/ql/lib/change-notes/2023-11-09-mad-generics.md b/csharp/ql/lib/change-notes/2023-11-09-mad-generics.md
deleted file mode 100644
index 9b81727ea21..00000000000
--- a/csharp/ql/lib/change-notes/2023-11-09-mad-generics.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-category: minorAnalysis
----
-
-* The models-as-data format for types and methods with type parameters has been changed to include the names of the type parameters. For example, instead of writing
-```yml
-extensions:
- - addsTo:
- pack: codeql/csharp-all
- extensible: summaryModel
- data:
- - ["System.Collections.Generic", "IList<>", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
- - ["System.Linq", "Enumerable", False, "Select<,>", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
-```
-one now writes
-```yml
-extensions:
- - addsTo:
- pack: codeql/csharp-all
- extensible: summaryModel
- data:
- - ["System.Collections.Generic", "IList", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
- - ["System.Linq", "Enumerable", False, "Select", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
-```
diff --git a/csharp/ql/lib/change-notes/2023-11-10-unbound-generics-fqn.md b/csharp/ql/lib/change-notes/released/0.8.3.md
similarity index 56%
rename from csharp/ql/lib/change-notes/2023-11-10-unbound-generics-fqn.md
rename to csharp/ql/lib/change-notes/released/0.8.3.md
index 99003b4e5d1..3e0478aae24 100644
--- a/csharp/ql/lib/change-notes/2023-11-10-unbound-generics-fqn.md
+++ b/csharp/ql/lib/change-notes/released/0.8.3.md
@@ -1,6 +1,6 @@
----
-category: minorAnalysis
----
+## 0.8.3
+
+### Minor Analysis Improvements
* The predicate `UnboundGeneric::getName` now prints the number of type parameters as a `` `N`` suffix, instead of a `<,...,>` suffix. For example, the unbound generic type
`System.Collections.Generic.IList` is printed as ``IList`1`` instead of `IList<>`.
@@ -23,3 +23,23 @@ extensions:
data:
- ["System.Collections.Generic", "Dictionary", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Key]", "value", "manual"]
```
+* The models-as-data format for types and methods with type parameters has been changed to include the names of the type parameters. For example, instead of writing
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "IList<>", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Linq", "Enumerable", False, "Select<,>", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
+```
+one now writes
+```yml
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: summaryModel
+ data:
+ - ["System.Collections.Generic", "IList", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Linq", "Enumerable", False, "Select", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
+```
diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml
index 404110129dc..b6e46394f37 100644
--- a/csharp/ql/lib/codeql-pack.release.yml
+++ b/csharp/ql/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.8.2
+lastReleaseVersion: 0.8.3
diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml
index 574de8bf003..efbec3140c1 100644
--- a/csharp/ql/lib/qlpack.yml
+++ b/csharp/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/csharp-all
-version: 0.8.3-dev
+version: 0.8.4-dev
groups: csharp
dbscheme: semmlecode.csharp.dbscheme
extractor: csharp
diff --git a/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll
index 2f8fde205fd..3aafaa00baa 100644
--- a/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll
+++ b/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll
@@ -1,7 +1,7 @@
private import cil
private import codeql.ssa.Ssa as SsaImplCommon
-private module SsaInput implements SsaImplCommon::InputSig {
+private module SsaInput implements SsaImplCommon::InputSig {
class BasicBlock = CIL::BasicBlock;
BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { result = bb.getImmediateDominator() }
@@ -29,7 +29,7 @@ private module SsaInput implements SsaImplCommon::InputSig {
}
}
-import SsaImplCommon::Make
+import SsaImplCommon::Make
cached
private module Cached {
diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll
index 2c61592778a..42d9c21102a 100644
--- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll
+++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll
@@ -36,7 +36,7 @@ module PreSsa {
scopeFirst(c, bb)
}
- module SsaInput implements SsaImplCommon::InputSig {
+ module SsaInput implements SsaImplCommon::InputSig {
class BasicBlock = PreBasicBlocks::PreBasicBlock;
BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { result.immediatelyDominates(bb) }
@@ -137,7 +137,7 @@ module PreSsa {
}
}
- private module SsaImpl = SsaImplCommon::Make;
+ private module SsaImpl = SsaImplCommon::Make;
class Definition extends SsaImpl::Definition {
final AssignableRead getARead() {
diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll
index cb737200a02..0933559347e 100644
--- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll
+++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll
@@ -24,7 +24,7 @@ module BaseSsa {
)
}
- private module SsaInput implements SsaImplCommon::InputSig {
+ private module SsaInput implements SsaImplCommon::InputSig {
class BasicBlock = ControlFlow::BasicBlock;
BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) {
@@ -60,7 +60,7 @@ module BaseSsa {
}
}
- private module SsaImpl = SsaImplCommon::Make;
+ private module SsaImpl = SsaImplCommon::Make;
class Definition extends SsaImpl::Definition {
final AssignableRead getARead() {
diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll
index 596ddde0f55..cf7bb8b83c2 100644
--- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll
+++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll
@@ -6,7 +6,7 @@ import csharp
private import codeql.ssa.Ssa as SsaImplCommon
private import AssignableDefinitions
-private module SsaInput implements SsaImplCommon::InputSig {
+private module SsaInput implements SsaImplCommon::InputSig {
class BasicBlock = ControlFlow::BasicBlock;
BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { result = bb.getImmediateDominator() }
@@ -49,7 +49,7 @@ private module SsaInput implements SsaImplCommon::InputSig {
}
}
-private import SsaImplCommon::Make as Impl
+private import SsaImplCommon::Make as Impl
class Definition = Impl::Definition;
diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll
index 03f8bd42715..abd1ad92733 100644
--- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll
+++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/ExternalLocationSink.qll
@@ -27,8 +27,9 @@ private class ExternalModelSink extends ExternalLocationSink {
*/
class LogMessageSink extends ExternalLocationSink {
LogMessageSink() {
- this.getExpr() = any(LoggerType i).getAMethod().getACall().getAnArgument()
- or
+ this.getExpr() = any(LoggerType i).getAMethod().getACall().getAnArgument() or
+ this.getExpr() =
+ any(MethodCall call | call.getQualifier().getType() instanceof LoggerType).getAnArgument() or
this.getExpr() =
any(ExtensionMethodCall call |
call.getTarget().(ExtensionMethod).getExtendedType() instanceof LoggerType
diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md
index 7246cba39cb..6cc567b98de 100644
--- a/csharp/ql/src/CHANGELOG.md
+++ b/csharp/ql/src/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 0.8.3
+
+### Minor Analysis Improvements
+
+* CIL extraction is now disabled by default. It is still possible to turn on CIL extraction by setting the `cil` extractor option to `true` or by setting the environment variable `$CODEQL_EXTRACTOR_CSHARP_OPTION_CIL` to `true`. This is the first step towards sun-setting the CIL extractor entirely.
+
## 0.8.2
No user-facing changes.
diff --git a/csharp/ql/src/Security Features/InsecureRandomness.qhelp b/csharp/ql/src/Security Features/InsecureRandomness.qhelp
index b0fe5a5513e..6f9634643ec 100644
--- a/csharp/ql/src/Security Features/InsecureRandomness.qhelp
+++ b/csharp/ql/src/Security Features/InsecureRandomness.qhelp
@@ -29,11 +29,6 @@ number generator. Random is not cryptographically secure, and shoul
security contexts. For contexts which are not security sensitive, Random may be
preferable as it has a more convenient interface, and is likely to be faster.
-
-For the specific use-case of generating passwords, consider
-System.Web.Security.Membership.GeneratePassword, which provides a cryptographically
-secure method of generating random passwords.
-
@@ -54,10 +49,7 @@ purpose. In this case, it is much harder to predict the generated integers.
In the final example, the password is generated using the Membership.GeneratePassword
-library method, which uses a cryptographically secure random number generator to generate a random
-series of characters. This method should be preferred when generating passwords, if possible, as it
-avoids potential pitfalls when converting the output of a random number generator (usually an int or
-a byte) to a series of permitted characters.
+library method, which generates a password with a bias, therefore should be avoided.
diff --git a/csharp/ql/src/change-notes/2023-10-24-disable-cil.md b/csharp/ql/src/change-notes/released/0.8.3.md
similarity index 74%
rename from csharp/ql/src/change-notes/2023-10-24-disable-cil.md
rename to csharp/ql/src/change-notes/released/0.8.3.md
index e66d70c8698..e0798a993c4 100644
--- a/csharp/ql/src/change-notes/2023-10-24-disable-cil.md
+++ b/csharp/ql/src/change-notes/released/0.8.3.md
@@ -1,4 +1,5 @@
----
-category: minorAnalysis
----
-* CIL extraction is now disabled by default. It is still possible to turn on CIL extraction by setting the `cil` extractor option to `true` or by setting the environment variable `$CODEQL_EXTRACTOR_CSHARP_OPTION_CIL` to `true`. This is the first step towards sun-setting the CIL extractor entirely.
\ No newline at end of file
+## 0.8.3
+
+### Minor Analysis Improvements
+
+* CIL extraction is now disabled by default. It is still possible to turn on CIL extraction by setting the `cil` extractor option to `true` or by setting the environment variable `$CODEQL_EXTRACTOR_CSHARP_OPTION_CIL` to `true`. This is the first step towards sun-setting the CIL extractor entirely.
diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml
index 404110129dc..b6e46394f37 100644
--- a/csharp/ql/src/codeql-pack.release.yml
+++ b/csharp/ql/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.8.2
+lastReleaseVersion: 0.8.3
diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml
index 667ca875601..28eb9007dc0 100644
--- a/csharp/ql/src/qlpack.yml
+++ b/csharp/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/csharp-queries
-version: 0.8.3-dev
+version: 0.8.4-dev
groups:
- csharp
- queries
diff --git a/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.expected b/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.expected
new file mode 100644
index 00000000000..a8e2f7d8aeb
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.expected
@@ -0,0 +1,2 @@
+| standalone.cs:3:12:3:29 | [assembly: Attribute1(...)] |
+| standalone.cs:9:2:9:11 | [Attribute1(...)] |
diff --git a/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.ql b/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.ql
new file mode 100644
index 00000000000..f1f82ed8f78
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/assemblyattribute/attr.ql
@@ -0,0 +1,5 @@
+import csharp
+
+from Attribute a
+where a.getType().getName() = "Attribute1Attribute"
+select a
diff --git a/csharp/ql/test/library-tests/standalone/assemblyattribute/options b/csharp/ql/test/library-tests/standalone/assemblyattribute/options
new file mode 100644
index 00000000000..7ba3811b2af
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/assemblyattribute/options
@@ -0,0 +1 @@
+semmle-extractor-options: --standalone
diff --git a/csharp/ql/test/library-tests/standalone/assemblyattribute/standalone.cs b/csharp/ql/test/library-tests/standalone/assemblyattribute/standalone.cs
new file mode 100644
index 00000000000..a03550d040e
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/assemblyattribute/standalone.cs
@@ -0,0 +1,12 @@
+using System;
+
+[assembly: global::Attribute1]
+
+class Attribute1Attribute : Attribute
+{
+}
+
+[Attribute1]
+class A
+{
+}
diff --git a/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected
new file mode 100644
index 00000000000..8c4346f7832
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.expected
@@ -0,0 +1,8 @@
+#select
+| standalone.cs:20:20:20:20 | access to parameter s | standalone.cs:20:20:20:20 | access to parameter s |
+| standalone.cs:25:28:25:32 | "abc" | standalone.cs:25:28:25:32 | "abc" |
+compilationErrors
+| standalone.cs:16:12:16:18 | CS0104: 'ILogger' is an ambiguous reference between 'A.ILogger' and 'B.ILogger' |
+methodCalls
+| standalone.cs:20:9:20:21 | call to method |
+| standalone.cs:25:9:25:33 | call to method |
diff --git a/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.ql b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.ql
new file mode 100644
index 00000000000..3ffef6704dd
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/externalLocationSink/externalLocationSink.ql
@@ -0,0 +1,10 @@
+import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink
+import semmle.code.csharp.commons.Diagnostics
+
+from ExternalLocationSink sink
+where sink.getLocation().getFile().fromSource()
+select sink, sink.getExpr()
+
+query predicate compilationErrors(CompilerError e) { any() }
+
+query predicate methodCalls(MethodCall m) { any() }
diff --git a/csharp/ql/test/library-tests/standalone/externalLocationSink/options b/csharp/ql/test/library-tests/standalone/externalLocationSink/options
new file mode 100644
index 00000000000..7ba3811b2af
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/externalLocationSink/options
@@ -0,0 +1 @@
+semmle-extractor-options: --standalone
diff --git a/csharp/ql/test/library-tests/standalone/externalLocationSink/standalone.cs b/csharp/ql/test/library-tests/standalone/externalLocationSink/standalone.cs
new file mode 100644
index 00000000000..13d54e2c80a
--- /dev/null
+++ b/csharp/ql/test/library-tests/standalone/externalLocationSink/standalone.cs
@@ -0,0 +1,27 @@
+using A;
+using B;
+
+namespace A
+{
+ public interface ILogger { }
+}
+
+namespace B
+{
+ public interface ILogger { }
+}
+
+public class C
+{
+ public ILogger logger;
+
+ private void M(string s)
+ {
+ logger.Log(s);
+ }
+
+ private static void Main()
+ {
+ new C().logger.Log("abc");
+ }
+}
\ No newline at end of file
diff --git a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst
index e69f82e4138..62d48c6fbd8 100644
--- a/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst
+++ b/docs/codeql/codeql-for-visual-studio-code/analyzing-your-projects.rst
@@ -42,14 +42,47 @@ Downloading a database from GitHub
.. include:: ../reusables/download-github-database.rst
+.. _filtering-databases-and-queries-by-language:
+
+Filtering databases and queries by language
+-------------------------------------------
+
+Optionally, to see databases containing a specific language and queries written for that language, you can apply a language filter using the language selector.
+
+#. To see available language filters, in the sidebar, click the **Language** title bar.
+#. Hover over the language filter you would like to apply, then click **Select**.
+
+ .. image:: ../images/codeql-for-visual-studio-code/choose-language-filter.png
+ :width: 350
+ :alt: Screenshot of the language selector. The "Select" button for a language filter is outlined in dark orange.
+
+Creating a custom query
+------------------------
+
+You can generate a query template for a specific language from the queries panel, then write your own code to quickly create a custom query.
+
+#. Optionally, to create a custom query in an existing directory, in the sidebar, click the **Queries** title bar to expand the queries panel, then select the desired directory.
+#. In the sidebar, hover over the **Queries** title bar, then click the **Create query** icon.
+
+ .. image:: ../images/codeql-for-visual-studio-code/create-query-icon.png
+ :width: 350
+ :alt: Screenshot of the queries panel. The "Create query" icon is outlined in dark orange.
+
+#. In the Command Palette, select the target language for your query. If you've chosen not to create your custom query in an existing directory, selecting a language will autogenerate a directory labeled ``codeql-custom-queries-``, where ```` is the name of the selected language. A query template labeled ``example.ql`` will then be added to the existing or autogenerated directory.
+#. In the template, write your custom query, then save the file. Once your query is finished, you can run it from the queries panel.
+
Running a query
------------------------
The `CodeQL repository `__ on GitHub contains lots of example queries.
-If you have that folder (or a different CodeQL pack) available in your workspace, you can access existing queries under ``/ql/src/``, for example ``java/ql/src/Likely Bugs``.
+You can access any existing queries in your workspace through the queries panel.
-#. Open a query (``.ql``) file. It is displayed in the editor, with IntelliSense features such as syntax highlighting and autocomplete suggestions.
-#. Right-click in the query window and select **CodeQL: Run Query on Selected Database**. (Alternatively, run the command from the Command Palette.)
+#. In the sidebar, to expand the queries panel, click the **Queries** title bar.
+#. To run a query against the selected database, hover over the desired query, then click the **Run local query** icon.
+
+ .. image:: ../images/codeql-for-visual-studio-code/run-local-query-icon.png
+ :width: 350
+ :alt: Screenshot of the mouse pointer hovering over a query in the queries panel. The "Run local query" icon is outlined in dark orange.
The CodeQL extension runs the query on the current database and reports progress in the bottom right corner of the application.
When the results are ready, they're displayed in the Results view.
@@ -61,6 +94,23 @@ For more information, see ":doc:`Troubleshooting CodeQL for Visual Studio Code <
Running multiple queries
--------------------------
+You can quickly run multiple queries against the database you've selected using the queries panel or a single command.
+
+Running all queries in a directory
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+You can easily run every query in a directory using the queries panel.
+
+#. In the sidebar, to expand the queries panel, click the **Queries** title bar.
+#. Hover over the desired directory of queries, then click the **Run local queries** icon.
+
+ .. image:: ../images/codeql-for-visual-studio-code/run-local-queries-icon.png
+ :width: 350
+ :alt: Screenshot of the mouse pointer hovering over a directory of queries in the queries panel. The "Run local queries" icon is outlined in dark orange.
+
+Running a selection of queries
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
You can run multiple queries with a single command.
#. Go to the File Explorer.
@@ -122,6 +172,7 @@ To see the queries that you have run in the current session, open the Query Hist
The Query History contains information including the date and time when the query was run, the name of the query, the database on which it was run, and how long it took to run the query.
To customize the information that is displayed, right-click an entry and select **Rename**.
+You can also filter the Query History view by language using the language selector. For more information, see ":ref:`Filtering databases and queries by language `."
Click an entry to display the corresponding results in the Query Results view, and double-click
to display the query itself in the editor (or right-click and select **View Query**).
diff --git a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst
index 95bdb926c32..9e1450bee70 100644
--- a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst
+++ b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst
@@ -119,8 +119,8 @@ Testing CodeQL model packs
You can test any CodeQL model packs you create in VS Code by toggling the "use model packs" setting on and off. This method works for both databases and for variant analysis repositories.
-- To run queries on a CodeQL database with any model packs that are stored within the ``.github/codeql/extensions`` directory of the workspace, update your ``settings.json`` file with: ``"codeQL.runningQueries.useModelPacks": all,``
-- To run queries on a CodeQL database without using model packs, update your ``settings.json`` file with: ``"codeQL.runningQueries.useModelPacks": none,``
+- To run queries on a CodeQL database with any model packs that are stored within the ``.github/codeql/extensions`` directory of the workspace, update your ``settings.json`` file with: ``"codeQL.runningQueries.useExtensionPacks": "all",``
+- To run queries on a CodeQL database without using model packs, update your ``settings.json`` file with: ``"codeQL.runningQueries.useExtensionPacks": "none",``
If your model is working well, you should see a difference in the results of the two different runs. If you don't see any differences in results, you may need to introduce a known bug to verify that the model behaves as expected.
diff --git a/docs/codeql/images/codeql-for-visual-studio-code/choose-language-filter.png b/docs/codeql/images/codeql-for-visual-studio-code/choose-language-filter.png
new file mode 100644
index 00000000000..8f26d5f5724
Binary files /dev/null and b/docs/codeql/images/codeql-for-visual-studio-code/choose-language-filter.png differ
diff --git a/docs/codeql/images/codeql-for-visual-studio-code/create-query-icon.png b/docs/codeql/images/codeql-for-visual-studio-code/create-query-icon.png
new file mode 100644
index 00000000000..eadb948522c
Binary files /dev/null and b/docs/codeql/images/codeql-for-visual-studio-code/create-query-icon.png differ
diff --git a/docs/codeql/images/codeql-for-visual-studio-code/run-local-queries-icon.png b/docs/codeql/images/codeql-for-visual-studio-code/run-local-queries-icon.png
new file mode 100644
index 00000000000..e797c35bb92
Binary files /dev/null and b/docs/codeql/images/codeql-for-visual-studio-code/run-local-queries-icon.png differ
diff --git a/docs/codeql/images/codeql-for-visual-studio-code/run-local-query-icon.png b/docs/codeql/images/codeql-for-visual-studio-code/run-local-query-icon.png
new file mode 100644
index 00000000000..dc89f88d0e4
Binary files /dev/null and b/docs/codeql/images/codeql-for-visual-studio-code/run-local-query-icon.png differ
diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst
index 135687e983c..c7dbe7aacd4 100644
--- a/docs/codeql/reusables/supported-versions-compilers.rst
+++ b/docs/codeql/reusables/supported-versions-compilers.rst
@@ -25,7 +25,7 @@
Python [8]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11",Not applicable,``.py``
Ruby [9]_,"up to 3.2",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``"
Swift [10]_,"Swift 5.4-5.8.1","Swift compiler","``.swift``"
- TypeScript [11]_,"2.6-5.2",Standard TypeScript compiler,"``.ts``, ``.tsx``, ``.mts``, ``.cts``"
+ TypeScript [11]_,"2.6-5.3",Standard TypeScript compiler,"``.ts``, ``.tsx``, ``.mts``, ``.cts``"
.. container:: footnote-group
diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md
index 59b60bad0f3..7668a5ba39d 100644
--- a/go/ql/consistency-queries/CHANGELOG.md
+++ b/go/ql/consistency-queries/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.0.2
+
+No user-facing changes.
+
## 0.0.1
No user-facing changes.
diff --git a/go/ql/consistency-queries/change-notes/released/0.0.2.md b/go/ql/consistency-queries/change-notes/released/0.0.2.md
new file mode 100644
index 00000000000..5ab250998ed
--- /dev/null
+++ b/go/ql/consistency-queries/change-notes/released/0.0.2.md
@@ -0,0 +1,3 @@
+## 0.0.2
+
+No user-facing changes.
diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml
index c6933410b71..55dc06fbd76 100644
--- a/go/ql/consistency-queries/codeql-pack.release.yml
+++ b/go/ql/consistency-queries/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.0.1
+lastReleaseVersion: 0.0.2
diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml
index 2b0a52a185e..20d0348972b 100644
--- a/go/ql/consistency-queries/qlpack.yml
+++ b/go/ql/consistency-queries/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql-go-consistency-queries
-version: 0.0.2-dev
+version: 0.0.3-dev
groups:
- go
- queries
diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md
index 62d802b584a..1ca530f5c03 100644
--- a/go/ql/lib/CHANGELOG.md
+++ b/go/ql/lib/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 0.7.3
+
+### Minor Analysis Improvements
+
+* Added the [gin cors](https://github.com/gin-contrib/cors) library to the CorsMisconfiguration.ql query
+
+### Bug Fixes
+
+* A bug has been fixed that meant that value flow through an array was not tracked correctly in some circumstances. Taint flow was tracked correctly.
+
## 0.7.2
### Minor Analysis Improvements
diff --git a/go/ql/lib/change-notes/2023-10-31-add-gin-cors-framework.md b/go/ql/lib/change-notes/2023-10-31-add-gin-cors-framework.md
deleted file mode 100644
index de6a186f762..00000000000
--- a/go/ql/lib/change-notes/2023-10-31-add-gin-cors-framework.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* Added the [gin cors](https://github.com/gin-contrib/cors) library to the CorsMisconfiguration.ql query
\ No newline at end of file
diff --git a/go/ql/lib/change-notes/2023-11-15-bug-fix-value-flow-in-slice-expression.md b/go/ql/lib/change-notes/2023-11-15-bug-fix-value-flow-in-slice-expression.md
new file mode 100644
index 00000000000..c5b717ad262
--- /dev/null
+++ b/go/ql/lib/change-notes/2023-11-15-bug-fix-value-flow-in-slice-expression.md
@@ -0,0 +1,4 @@
+---
+category: fix
+---
+* A bug has been fixed that meant that value flow through a slice expression was not tracked correctly. Taint flow was tracked correctly.
diff --git a/go/ql/lib/change-notes/released/0.7.3.md b/go/ql/lib/change-notes/released/0.7.3.md
new file mode 100644
index 00000000000..f8c0a1045b0
--- /dev/null
+++ b/go/ql/lib/change-notes/released/0.7.3.md
@@ -0,0 +1,9 @@
+## 0.7.3
+
+### Minor Analysis Improvements
+
+* Added the [gin cors](https://github.com/gin-contrib/cors) library to the CorsMisconfiguration.ql query
+
+### Bug Fixes
+
+* A bug has been fixed that meant that value flow through an array was not tracked correctly in some circumstances. Taint flow was tracked correctly.
diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml
index fee171e9685..a4ea9c8de17 100644
--- a/go/ql/lib/codeql-pack.release.yml
+++ b/go/ql/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.7.2
+lastReleaseVersion: 0.7.3
diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml
index 8069dc5d797..6ef6b38a894 100644
--- a/go/ql/lib/qlpack.yml
+++ b/go/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/go-all
-version: 0.7.3-dev
+version: 0.7.4-dev
groups: go
dbscheme: go.dbscheme
extractor: go
diff --git a/go/ql/lib/semmle/go/Expr.qll b/go/ql/lib/semmle/go/Expr.qll
index 90f838c2174..66d79f1d8f4 100644
--- a/go/ql/lib/semmle/go/Expr.qll
+++ b/go/ql/lib/semmle/go/Expr.qll
@@ -724,16 +724,19 @@ class GenericTypeInstantiationExpr extends Expr {
* ```go
* a[1:3]
* a[1:3:5]
+ * a[1:]
+ * a[:3]
+ * a[:]
* ```
*/
class SliceExpr extends @sliceexpr, Expr {
/** Gets the base of this slice expression. */
Expr getBase() { result = this.getChildExpr(0) }
- /** Gets the lower bound of this slice expression. */
+ /** Gets the lower bound of this slice expression, if any. */
Expr getLow() { result = this.getChildExpr(1) }
- /** Gets the upper bound of this slice expression. */
+ /** Gets the upper bound of this slice expression, if any. */
Expr getHigh() { result = this.getChildExpr(2) }
/** Gets the maximum of this slice expression, if any. */
diff --git a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll
index ae352ec71bd..ad985e2c5b5 100644
--- a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll
+++ b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll
@@ -21,9 +21,16 @@ predicate containerStoreStep(Node node1, Node node2, Content c) {
node2.getType() instanceof SliceType
) and
(
- exists(Write w | w.writesElement(node2, _, node1))
+ exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1))
or
node1 = node2.(ImplicitVarargsSlice).getCallNode().getAnImplicitVarargsArgument()
+ or
+ // To model data flow from array elements of the base of a `SliceNode` to
+ // the `SliceNode` itself, we consider there to be a read step with array
+ // content from the base to the corresponding `SliceElementNode` and then
+ // a store step with array content from the `SliceelementNode` to the
+ // `SliceNode` itself.
+ node2 = node1.(SliceElementNode).getSliceNode()
)
)
or
@@ -57,6 +64,13 @@ predicate containerReadStep(Node node1, Node node2, Content c) {
)
or
node2.(RangeElementNode).getBase() = node1
+ or
+ // To model data flow from array elements of the base of a `SliceNode` to
+ // the `SliceNode` itself, we consider there to be a read step with array
+ // content from the base to the corresponding `SliceElementNode` and then
+ // a store step with array content from the `SliceelementNode` to the
+ // `SliceNode` itself.
+ node2.(SliceElementNode).getSliceNode().getBase() = node1
)
or
c instanceof CollectionContent and
diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll
index 188832803dd..5a3c589197e 100644
--- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll
+++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll
@@ -11,6 +11,7 @@ private newtype TNode =
MkSsaNode(SsaDefinition ssa) or
MkGlobalFunctionNode(Function f) or
MkImplicitVarargsSlice(CallExpr c) { c.hasImplicitVarargs() } or
+ MkSliceElementNode(SliceExpr se) or
MkFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn)
/** Nodes intended for only use inside the data-flow libraries. */
@@ -998,6 +999,37 @@ module Public {
Node getMax() { result = DataFlow::instructionNode(insn.getMax()) }
}
+ /**
+ * A data-flow node which exists solely to model the value flow from array
+ * elements of the base of a `SliceNode` to array elements of the `SliceNode`
+ * itself.
+ */
+ class SliceElementNode extends Node, MkSliceElementNode {
+ IR::SliceInstruction si;
+
+ SliceElementNode() { this = MkSliceElementNode(si.getExpr()) }
+
+ override ControlFlow::Root getRoot() { result = this.getSliceNode().getRoot() }
+
+ override Type getType() {
+ result = si.getResultType().(ArrayType).getElementType() or
+ result = si.getResultType().(SliceType).getElementType()
+ }
+
+ override string getNodeKind() { result = "slice element node" }
+
+ override string toString() { result = "slice element node" }
+
+ override predicate hasLocationInfo(
+ string filepath, int startline, int startcolumn, int endline, int endcolumn
+ ) {
+ si.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
+ }
+
+ /** Gets the `SliceNode` which this node relates to. */
+ SliceNode getSliceNode() { result = DataFlow::instructionNode(si) }
+ }
+
/**
* A data-flow node corresponding to an expression with a binary operator.
*/
diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md
index 9770cc59b48..6d494f4218c 100644
--- a/go/ql/src/CHANGELOG.md
+++ b/go/ql/src/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.7.3
+
+No user-facing changes.
+
## 0.7.2
### Minor Analysis Improvements
diff --git a/go/ql/src/change-notes/released/0.7.3.md b/go/ql/src/change-notes/released/0.7.3.md
new file mode 100644
index 00000000000..f58593b24f2
--- /dev/null
+++ b/go/ql/src/change-notes/released/0.7.3.md
@@ -0,0 +1,3 @@
+## 0.7.3
+
+No user-facing changes.
diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml
index fee171e9685..a4ea9c8de17 100644
--- a/go/ql/src/codeql-pack.release.yml
+++ b/go/ql/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.7.2
+lastReleaseVersion: 0.7.3
diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml
index 44d31df731b..a34d8db2fcb 100644
--- a/go/ql/src/qlpack.yml
+++ b/go/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/go-queries
-version: 0.7.3-dev
+version: 0.7.4-dev
groups:
- go
- queries
diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/main.go b/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/main.go
index 6665fe7d2c1..8cc9a8f054b 100644
--- a/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/main.go
+++ b/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/main.go
@@ -4,7 +4,7 @@ func source() string {
return "untrusted data"
}
-func sink(string) {
+func sink(any) {
}
func sliceToArray(p []string) [1]string {
@@ -15,11 +15,15 @@ func main() {
// Test the new slice->array conversion permitted in Go 1.20
var a [4]string
a[0] = source()
- alias := sliceToArray(a[:])
- sink(alias[0]) // $ hasTaintFlow="index expression"
+ alias := [2]string(a[:])
+ sink(alias[0]) // $ hasValueFlow="index expression"
+ sink(alias[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(alias) // $ hasTaintFlow="alias"
// Compare with the standard dataflow support for arrays
var b [4]string
b[0] = source()
- sink(b[0]) // $ hasTaintFlow="index expression"
+ sink(b[0]) // $ hasValueFlow="index expression"
+ sink(b[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(b) // $ hasTaintFlow="b"
}
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceBad.expected b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceBad.expected
rename to go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.expected
diff --git a/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.ql
new file mode 100644
index 00000000000..1b27b27d6dc
--- /dev/null
+++ b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.ql
@@ -0,0 +1,3 @@
+import go
+import TestUtilities.InlineFlowTest
+import DefaultFlowTest
diff --git a/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/main.go b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/main.go
new file mode 100644
index 00000000000..4fff6d1ce50
--- /dev/null
+++ b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/main.go
@@ -0,0 +1,45 @@
+package main
+
+func source() string {
+ return "untrusted data"
+}
+
+func sink(any) {
+}
+
+func main() {
+}
+
+// Value flow with array content through slice expressions
+
+func arrayBase(base [4]string) {
+ base[1] = source()
+ slice := base[1:4]
+ sink(slice[0]) // $ hasValueFlow="index expression"
+ sink(slice[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(slice) // $ hasTaintFlow="slice"
+}
+
+func arrayPointerBase(base *[4]string) {
+ base[1] = source()
+ slice := base[1:4]
+ sink(slice[0]) // $ hasValueFlow="index expression"
+ sink(slice[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(slice) // $ hasTaintFlow="slice"
+}
+
+func sliceBase(base []string) {
+ base[1] = source()
+ slice := base[1:4]
+ sink(slice[0]) // $ hasValueFlow="index expression"
+ sink(slice[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(slice) // $ hasTaintFlow="slice"
+}
+
+func slicePointerBase(base *[]string) {
+ (*base)[1] = source()
+ slice := (*base)[1:4]
+ sink(slice[0]) // $ hasValueFlow="index expression"
+ sink(slice[1]) // $ SPURIOUS: hasValueFlow="index expression" // we don't distinguish different elements of arrays or slices
+ sink(slice) // $ hasTaintFlow="slice"
+}
diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected
index 5fbcfcdc4f2..3c14fdfadeb 100644
--- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected
+++ b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.expected
@@ -47,6 +47,7 @@ edges
| test.go:246:15:246:36 | call to GetString | test.go:249:21:249:29 | untrusted |
| test.go:259:23:259:44 | call to GetCookie | test.go:259:16:259:45 | type conversion |
| test.go:270:62:270:83 | call to GetCookie | test.go:270:55:270:84 | type conversion |
+| test.go:275:2:275:40 | ... := ...[0] | test.go:278:21:278:28 | index expression |
| test.go:275:2:275:40 | ... := ...[0] | test.go:283:44:283:60 | selection of Filename |
| test.go:275:2:275:40 | ... := ...[0] | test.go:284:38:284:49 | genericFiles |
| test.go:275:2:275:40 | ... := ...[0] | test.go:285:37:285:48 | genericFiles |
@@ -61,6 +62,8 @@ edges
| test.go:275:2:275:40 | ... := ...[0] | test.go:301:39:301:50 | genericFiles |
| test.go:275:2:275:40 | ... := ...[0] | test.go:302:40:302:51 | genericFiles |
| test.go:275:2:275:40 | ... := ...[0] | test.go:303:39:303:50 | genericFiles |
+| test.go:276:2:276:13 | definition of genericFiles [array] | test.go:297:51:297:62 | genericFiles [array] |
+| test.go:278:21:278:28 | index expression | test.go:276:2:276:13 | definition of genericFiles [array] |
| test.go:283:44:283:60 | selection of Filename | test.go:283:21:283:61 | call to GetDisplayString |
| test.go:284:21:284:53 | call to SliceChunk | test.go:284:21:284:92 | selection of Filename |
| test.go:284:38:284:49 | genericFiles | test.go:284:21:284:53 | call to SliceChunk |
@@ -77,6 +80,7 @@ edges
| test.go:296:21:296:61 | call to SliceMerge | test.go:296:21:296:97 | selection of Filename |
| test.go:296:49:296:60 | genericFiles | test.go:296:21:296:61 | call to SliceMerge |
| test.go:297:21:297:66 | call to SlicePad | test.go:297:21:297:102 | selection of Filename |
+| test.go:297:51:297:62 | genericFiles [array] | test.go:297:51:297:65 | index expression |
| test.go:297:51:297:65 | index expression | test.go:297:21:297:66 | call to SlicePad |
| test.go:298:21:298:66 | call to SlicePad | test.go:298:21:298:102 | selection of Filename |
| test.go:298:36:298:47 | genericFiles | test.go:298:21:298:66 | call to SlicePad |
@@ -177,6 +181,8 @@ nodes
| test.go:270:55:270:84 | type conversion | semmle.label | type conversion |
| test.go:270:62:270:83 | call to GetCookie | semmle.label | call to GetCookie |
| test.go:275:2:275:40 | ... := ...[0] | semmle.label | ... := ...[0] |
+| test.go:276:2:276:13 | definition of genericFiles [array] | semmle.label | definition of genericFiles [array] |
+| test.go:278:21:278:28 | index expression | semmle.label | index expression |
| test.go:283:21:283:61 | call to GetDisplayString | semmle.label | call to GetDisplayString |
| test.go:283:44:283:60 | selection of Filename | semmle.label | selection of Filename |
| test.go:284:21:284:53 | call to SliceChunk | semmle.label | call to SliceChunk |
@@ -202,6 +208,7 @@ nodes
| test.go:296:49:296:60 | genericFiles | semmle.label | genericFiles |
| test.go:297:21:297:66 | call to SlicePad | semmle.label | call to SlicePad |
| test.go:297:21:297:102 | selection of Filename | semmle.label | selection of Filename |
+| test.go:297:51:297:62 | genericFiles [array] | semmle.label | genericFiles [array] |
| test.go:297:51:297:65 | index expression | semmle.label | index expression |
| test.go:298:21:298:66 | call to SlicePad | semmle.label | call to SlicePad |
| test.go:298:21:298:102 | selection of Filename | semmle.label | selection of Filename |
diff --git a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected
index 19c94698899..01f6d0a17f6 100644
--- a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected
+++ b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.expected
@@ -10,11 +10,17 @@ edges
| GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:15:35:15:41 | tainted |
| GitSubcommands.go:10:13:10:27 | call to Query | GitSubcommands.go:16:36:16:42 | tainted |
| SanitizingDoubleDash.go:9:13:9:19 | selection of URL | SanitizingDoubleDash.go:9:13:9:27 | call to Query |
+| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:13:25:13:31 | tainted |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:14:23:14:33 | slice expression |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:39:31:39:37 | tainted |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:53:21:53:28 | arrayLit |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:68:31:68:37 | tainted |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | SanitizingDoubleDash.go:80:23:80:29 | tainted |
+| SanitizingDoubleDash.go:13:15:13:32 | array literal [array] | SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] |
+| SanitizingDoubleDash.go:13:25:13:31 | tainted | SanitizingDoubleDash.go:13:15:13:32 | array literal [array] |
+| SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | SanitizingDoubleDash.go:14:23:14:33 | slice element node |
+| SanitizingDoubleDash.go:14:23:14:33 | slice element node | SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] |
+| SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | SanitizingDoubleDash.go:14:23:14:33 | slice expression |
| SanitizingDoubleDash.go:39:14:39:44 | call to append | SanitizingDoubleDash.go:40:23:40:30 | arrayLit |
| SanitizingDoubleDash.go:39:31:39:37 | tainted | SanitizingDoubleDash.go:39:14:39:44 | call to append |
| SanitizingDoubleDash.go:53:14:53:35 | call to append | SanitizingDoubleDash.go:54:23:54:30 | arrayLit |
@@ -24,7 +30,9 @@ edges
| SanitizingDoubleDash.go:69:14:69:35 | call to append | SanitizingDoubleDash.go:70:23:70:30 | arrayLit |
| SanitizingDoubleDash.go:69:21:69:28 | arrayLit | SanitizingDoubleDash.go:69:14:69:35 | call to append |
| SanitizingDoubleDash.go:92:13:92:19 | selection of URL | SanitizingDoubleDash.go:92:13:92:27 | call to Query |
+| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:95:25:95:31 | tainted |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:96:24:96:34 | slice expression |
+| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:100:31:100:37 | tainted |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:101:24:101:34 | slice expression |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:105:30:105:36 | tainted |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:106:24:106:31 | arrayLit |
@@ -36,6 +44,16 @@ edges
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:142:31:142:37 | tainted |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:148:30:148:36 | tainted |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | SanitizingDoubleDash.go:152:24:152:30 | tainted |
+| SanitizingDoubleDash.go:95:15:95:32 | array literal [array] | SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] |
+| SanitizingDoubleDash.go:95:25:95:31 | tainted | SanitizingDoubleDash.go:95:15:95:32 | array literal [array] |
+| SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] | SanitizingDoubleDash.go:96:24:96:34 | slice element node |
+| SanitizingDoubleDash.go:96:24:96:34 | slice element node | SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] |
+| SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] | SanitizingDoubleDash.go:96:24:96:34 | slice expression |
+| SanitizingDoubleDash.go:100:15:100:38 | array literal [array] | SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] |
+| SanitizingDoubleDash.go:100:31:100:37 | tainted | SanitizingDoubleDash.go:100:15:100:38 | array literal [array] |
+| SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] | SanitizingDoubleDash.go:101:24:101:34 | slice element node |
+| SanitizingDoubleDash.go:101:24:101:34 | slice element node | SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] |
+| SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | SanitizingDoubleDash.go:101:24:101:34 | slice expression |
| SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | SanitizingDoubleDash.go:106:24:106:31 | arrayLit |
| SanitizingDoubleDash.go:105:30:105:36 | tainted | SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] |
| SanitizingDoubleDash.go:111:14:111:44 | call to append | SanitizingDoubleDash.go:112:24:112:31 | arrayLit |
@@ -68,7 +86,12 @@ nodes
| GitSubcommands.go:16:36:16:42 | tainted | semmle.label | tainted |
| SanitizingDoubleDash.go:9:13:9:19 | selection of URL | semmle.label | selection of URL |
| SanitizingDoubleDash.go:9:13:9:27 | call to Query | semmle.label | call to Query |
+| SanitizingDoubleDash.go:13:15:13:32 | array literal [array] | semmle.label | array literal [array] |
+| SanitizingDoubleDash.go:13:25:13:31 | tainted | semmle.label | tainted |
+| SanitizingDoubleDash.go:14:23:14:30 | arrayLit [array] | semmle.label | arrayLit [array] |
+| SanitizingDoubleDash.go:14:23:14:33 | slice element node | semmle.label | slice element node |
| SanitizingDoubleDash.go:14:23:14:33 | slice expression | semmle.label | slice expression |
+| SanitizingDoubleDash.go:14:23:14:33 | slice expression [array] | semmle.label | slice expression [array] |
| SanitizingDoubleDash.go:39:14:39:44 | call to append | semmle.label | call to append |
| SanitizingDoubleDash.go:39:31:39:37 | tainted | semmle.label | tainted |
| SanitizingDoubleDash.go:40:23:40:30 | arrayLit | semmle.label | arrayLit |
@@ -83,8 +106,18 @@ nodes
| SanitizingDoubleDash.go:80:23:80:29 | tainted | semmle.label | tainted |
| SanitizingDoubleDash.go:92:13:92:19 | selection of URL | semmle.label | selection of URL |
| SanitizingDoubleDash.go:92:13:92:27 | call to Query | semmle.label | call to Query |
+| SanitizingDoubleDash.go:95:15:95:32 | array literal [array] | semmle.label | array literal [array] |
+| SanitizingDoubleDash.go:95:25:95:31 | tainted | semmle.label | tainted |
+| SanitizingDoubleDash.go:96:24:96:31 | arrayLit [array] | semmle.label | arrayLit [array] |
+| SanitizingDoubleDash.go:96:24:96:34 | slice element node | semmle.label | slice element node |
| SanitizingDoubleDash.go:96:24:96:34 | slice expression | semmle.label | slice expression |
+| SanitizingDoubleDash.go:96:24:96:34 | slice expression [array] | semmle.label | slice expression [array] |
+| SanitizingDoubleDash.go:100:15:100:38 | array literal [array] | semmle.label | array literal [array] |
+| SanitizingDoubleDash.go:100:31:100:37 | tainted | semmle.label | tainted |
+| SanitizingDoubleDash.go:101:24:101:31 | arrayLit [array] | semmle.label | arrayLit [array] |
+| SanitizingDoubleDash.go:101:24:101:34 | slice element node | semmle.label | slice element node |
| SanitizingDoubleDash.go:101:24:101:34 | slice expression | semmle.label | slice expression |
+| SanitizingDoubleDash.go:101:24:101:34 | slice expression [array] | semmle.label | slice expression [array] |
| SanitizingDoubleDash.go:105:15:105:37 | slice literal [array] | semmle.label | slice literal [array] |
| SanitizingDoubleDash.go:105:30:105:36 | tainted | semmle.label | tainted |
| SanitizingDoubleDash.go:106:24:106:31 | arrayLit | semmle.label | arrayLit |
diff --git a/java/kotlin-extractor/build.py b/java/kotlin-extractor/build.py
index 752a436218f..61b6a403398 100755
--- a/java/kotlin-extractor/build.py
+++ b/java/kotlin-extractor/build.py
@@ -87,16 +87,20 @@ def write_arg_file(arg_file, args):
raise Exception('Single quote in argument: ' + arg)
f.write("'" + arg.replace('\\', '/') + "'\n")
-def compile_to_dir(build_dir, srcs, language_version, classpath, java_classpath, output):
+def compile_to_dir(build_dir, srcs, version, classpath, java_classpath, output):
# Use kotlinc to compile .kt files:
kotlin_arg_file = build_dir + '/kotlin.args'
- kotlin_args = ['-Werror',
- '-opt-in=kotlin.RequiresOptIn',
- '-opt-in=org.jetbrains.kotlin.ir.symbols.IrSymbolInternals',
- '-d', output,
+ opt_in_args = ['-opt-in=kotlin.RequiresOptIn']
+ if version.lessThan(kotlin_plugin_versions.Version(2, 0, 0, "")):
+ opt_in_args.append('-opt-in=org.jetbrains.kotlin.ir.symbols.IrSymbolInternals')
+ else:
+ opt_in_args.append('-opt-in=org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI')
+ kotlin_args = ['-Werror'] \
+ + opt_in_args \
+ + ['-d', output,
'-module-name', 'codeql-kotlin-extractor',
'-Xsuppress-version-warnings',
- '-language-version', language_version,
+ '-language-version', version.toLanguageVersionString(),
'-no-reflect', '-no-stdlib',
'-jvm-target', '1.8',
'-classpath', classpath] + srcs
@@ -116,14 +120,14 @@ def compile_to_dir(build_dir, srcs, language_version, classpath, java_classpath,
run_process([javac, '@' + java_arg_file])
-def compile_to_jar(build_dir, tmp_src_dir, srcs, language_version, classpath, java_classpath, output):
+def compile_to_jar(build_dir, tmp_src_dir, srcs, version, classpath, java_classpath, output):
class_dir = build_dir + '/classes'
if os.path.exists(class_dir):
shutil.rmtree(class_dir)
os.makedirs(class_dir)
- compile_to_dir(build_dir, srcs, language_version, classpath, java_classpath, class_dir)
+ compile_to_dir(build_dir, srcs, version, classpath, java_classpath, class_dir)
run_process(['jar', 'cf', output,
'-C', class_dir, '.',
@@ -161,7 +165,7 @@ def transform_to_embeddable(srcs):
f.write(content)
-def compile(jars, java_jars, dependency_folder, transform_to_embeddable, output, build_dir, current_version):
+def compile(jars, java_jars, dependency_folder, transform_to_embeddable, output, build_dir, version_str):
classpath = bases_to_classpath(dependency_folder, jars)
java_classpath = bases_to_classpath(dependency_folder, java_jars)
@@ -179,23 +183,16 @@ def compile(jars, java_jars, dependency_folder, transform_to_embeddable, output,
with open(resource_dir + '/extractor.name', 'w') as f:
f.write(output)
- parsed_current_version = kotlin_plugin_versions.version_string_to_tuple(
- current_version)
+ version = kotlin_plugin_versions.version_string_to_version(version_str)
- for version in kotlin_plugin_versions.many_versions:
- parsed_version = kotlin_plugin_versions.version_string_to_tuple(
- version)
- if parsed_version[0] < parsed_current_version[0] or \
- (parsed_version[0] == parsed_current_version[0] and parsed_version[1] < parsed_current_version[1]) or \
- (parsed_version[0] == parsed_current_version[0] and parsed_version[1] == parsed_current_version[1] and parsed_version[2] <= parsed_current_version[2]):
+ for a_version in kotlin_plugin_versions.many_versions_versions_asc:
+ if a_version.lessThanOrEqual(version):
d = tmp_src_dir + '/main/kotlin/utils/versions/v_' + \
- version.replace('.', '_')
+ a_version.toString().replace('.', '_')
if os.path.exists(d):
# copy and overwrite files from the version folder to the include folder
shutil.copytree(d, include_version_folder, dirs_exist_ok=True)
- language_version = str(parsed_current_version[0]) + '.' + str(parsed_current_version[1])
-
# remove all version folders:
shutil.rmtree(tmp_src_dir + '/main/kotlin/utils/versions')
@@ -203,7 +200,7 @@ def compile(jars, java_jars, dependency_folder, transform_to_embeddable, output,
transform_to_embeddable(srcs)
- compile_to_jar(build_dir, tmp_src_dir, srcs, language_version, classpath, java_classpath, output)
+ compile_to_jar(build_dir, tmp_src_dir, srcs, version, classpath, java_classpath, output)
shutil.rmtree(tmp_src_dir)
diff --git a/java/kotlin-extractor/kotlin_plugin_versions.py b/java/kotlin-extractor/kotlin_plugin_versions.py
index 1cf8a9cb0d8..ea671562e34 100755
--- a/java/kotlin-extractor/kotlin_plugin_versions.py
+++ b/java/kotlin-extractor/kotlin_plugin_versions.py
@@ -14,19 +14,43 @@ def is_windows():
return True
return False
-def version_tuple_to_string(version):
- return f'{version[0]}.{version[1]}.{version[2]}{version[3]}'
+class Version:
+ def __init__(self, major, minor, patch, tag):
+ self.major = major
+ self.minor = minor
+ self.patch = patch
+ self.tag = tag
-def version_string_to_tuple(version):
+ def toTupleWithTag(self):
+ return [self.major, self.minor, self.patch, self.tag]
+
+ def toTupleNoTag(self):
+ return [self.major, self.minor, self.patch]
+
+ def lessThan(self, other):
+ return self.toTupleNoTag() < other.toTupleNoTag()
+
+ def lessThanOrEqual(self, other):
+ return self.toTupleNoTag() <= other.toTupleNoTag()
+
+ def toString(self):
+ return f'{self.major}.{self.minor}.{self.patch}{self.tag}'
+
+ def toLanguageVersionString(self):
+ return f'{self.major}.{self.minor}'
+
+def version_string_to_version(version):
m = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)(.*)', version)
- return tuple([int(m.group(i)) for i in range(1, 4)] + [m.group(4)])
+ return Version(int(m.group(1)), int(m.group(2)), int(m.group(3)), m.group(4))
# Version number used by CI.
ci_version = '1.9.0'
-many_versions = [ '1.5.0', '1.5.10', '1.5.20', '1.5.30', '1.6.0', '1.6.20', '1.7.0', '1.7.20', '1.8.0', '1.9.0-Beta', '1.9.20-Beta' ]
+many_versions = [ '1.5.0', '1.5.10', '1.5.20', '1.5.30', '1.6.0', '1.6.20', '1.7.0', '1.7.20', '1.8.0', '1.9.0-Beta', '1.9.20-Beta', '2.0.0-Beta1' ]
-many_versions_tuples = [version_string_to_tuple(v) for v in many_versions]
+many_versions_versions = [version_string_to_version(v) for v in many_versions]
+many_versions_versions_asc = sorted(many_versions_versions, key = lambda v: v.toTupleWithTag())
+many_versions_versions_desc = reversed(many_versions_versions_asc)
class KotlincNotFoundException(Exception):
pass
@@ -37,16 +61,14 @@ def get_single_version(fakeVersionOutput = None):
if kotlinc is None:
raise KotlincNotFoundException()
versionOutput = subprocess.run([kotlinc, '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stderr if fakeVersionOutput is None else fakeVersionOutput
- m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+-?[a-zA-Z]*) .*', versionOutput)
+ m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z][a-zA-Z0-9]*)?) .*', versionOutput)
if m is None:
raise Exception('Cannot detect version of kotlinc (got ' + str(versionOutput) + ')')
- current_version = version_string_to_tuple(m.group(1))
+ current_version = version_string_to_version(m.group(1))
- many_versions_tuples.sort(reverse = True)
-
- for version in many_versions_tuples:
- if version[0:3] <= current_version[0:3]:
- return version_tuple_to_string(version)
+ for version in many_versions_versions_desc:
+ if version.lessThanOrEqual(current_version):
+ return version.toString()
raise Exception(f'No suitable kotlinc version found for {current_version} (got {versionOutput}; know about {str(many_versions)})')
diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt
index 0bfccb5637e..3458ec20244 100644
--- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt
+++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt
@@ -80,6 +80,7 @@ open class KotlinFileExtractor(
globalExtensionState: KotlinExtractorGlobalState,
): KotlinUsesExtractor(logger, tw, dependencyCollector, externalClassExtractor, primitiveTypeMapping, pluginContext, globalExtensionState) {
+ val usesK2 = usesK2(pluginContext)
val metaAnnotationSupport = MetaAnnotationSupport(logger, pluginContext, this)
private inline fun with(kind: String, element: IrElement, f: () -> T): T {
@@ -166,22 +167,26 @@ open class KotlinFileExtractor(
else -> false
}
+ private fun FunctionDescriptor.tryIsHiddenToOvercomeSignatureClash(d: IrFunction): Boolean {
+ try {
+ return this.isHiddenToOvercomeSignatureClash
+ }
+ catch (e: NotImplementedError) {
+ // `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
+ // TODO: We need a replacement for this for Kotlin 2
+ if (!usesK2) {
+ logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
+ }
+ return false
+ }
+ }
+
@OptIn(ObsoleteDescriptorBasedAPI::class)
private fun isFake(d: IrDeclarationWithVisibility): Boolean {
val hasFakeVisibility = d.visibility.let { it is DelegatedDescriptorVisibility && it.delegate == Visibilities.InvisibleFake } || d.isFakeOverride
if (hasFakeVisibility && !isJavaBinaryObjectMethodRedeclaration(d))
return true
- try {
- if ((d as? IrFunction)?.descriptor?.isHiddenToOvercomeSignatureClash == true) {
- return true
- }
- }
- catch (e: NotImplementedError) {
- // `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
- logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
- return false
- }
- return false
+ return (d as? IrFunction)?.descriptor?.tryIsHiddenToOvercomeSignatureClash(d) == true
}
private fun shouldExtractDecl(declaration: IrDeclaration, extractPrivateMembers: Boolean) =
@@ -2457,8 +2462,12 @@ open class KotlinFileExtractor(
val fn = getFunctionsByFqName(pluginContext, functionPkg, functionName)
.firstOrNull { fnSymbol ->
- fnSymbol.owner.parentClassOrNull?.fqNameWhenAvailable?.asString() == type &&
- fnSymbol.owner.valueParameters.map { it.type.classFqName?.asString() }.toTypedArray() contentEquals parameterTypes
+ val owner = fnSymbol.owner
+ (owner.parentClassOrNull?.fqNameWhenAvailable?.asString() == type
+ ||
+ (owner.parent is IrExternalPackageFragment && getFileClassFqName(owner)?.asString() == type))
+ &&
+ owner.valueParameters.map { it.type.classFqName?.asString() }.toTypedArray() contentEquals parameterTypes
}?.owner
if (fn != null) {
diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_255-SNAPSHOT/IrSymbolInternals.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2.0.0-Beta1/IrSymbolInternals.kt
similarity index 100%
rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_255-SNAPSHOT/IrSymbolInternals.kt
rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_2.0.0-Beta1/IrSymbolInternals.kt
diff --git a/java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_255-SNAPSHOT/JavaBinarySourceElement.kt b/java/kotlin-extractor/src/main/kotlin/utils/versions/v_2.0.0-Beta1/JavaBinarySourceElement.kt
similarity index 100%
rename from java/kotlin-extractor/src/main/kotlin/utils/versions/v_1_9_255-SNAPSHOT/JavaBinarySourceElement.kt
rename to java/kotlin-extractor/src/main/kotlin/utils/versions/v_2.0.0-Beta1/JavaBinarySourceElement.kt
diff --git a/java/ql/automodel/publish.sh b/java/ql/automodel/publish.sh
index b13570c950f..e1362d967f8 100755
--- a/java/ql/automodel/publish.sh
+++ b/java/ql/automodel/publish.sh
@@ -1,6 +1,9 @@
#!/bin/sh
set -e
+# Before running this, make sure there is an SSO-enabled token with package:write
+# permissions to codeql supplied via the GITHUB_TOKEN environment variable
+
AUTOMODEL_ROOT="$(readlink -f "$(dirname $0)")"
WORKSPACE_ROOT="$AUTOMODEL_ROOT/../../.."
GRPS="automodel,-test"
diff --git a/java/ql/automodel/src/AutomodelAlertSinkUtil.qll b/java/ql/automodel/src/AutomodelAlertSinkUtil.qll
index 47a53956656..f32d46c71d6 100644
--- a/java/ql/automodel/src/AutomodelAlertSinkUtil.qll
+++ b/java/ql/automodel/src/AutomodelAlertSinkUtil.qll
@@ -90,7 +90,7 @@ class PotentialSinkModelExpr extends Expr {
string package, string type, boolean subtypes, string name, string signature, string input
) {
exists(Call call, Callable callable, int argIdx |
- call.getCallee() = callable and
+ call.getCallee().getSourceDeclaration() = callable and
(
this = call.getArgument(argIdx)
or
diff --git a/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll b/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll
index f8f2c8aaf58..a1a8094b7a6 100644
--- a/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll
+++ b/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll
@@ -30,7 +30,9 @@ newtype TApplicationModeEndpoint =
arg.asExpr() = argExpr and call = argExpr.getCall() and not argExpr.isVararg()
)
} or
- TInstanceArgument(Call call, DataFlow::Node arg) { arg = DataFlow::getInstanceArgument(call) } or
+ TInstanceArgument(Call call, DataFlow::Node arg) {
+ arg = DataFlow::getInstanceArgument(call) and not call instanceof ConstructorCall
+ } or
TImplicitVarargsArray(Call call, DataFlow::Node arg, int idx) {
exists(Argument argExpr |
arg.asExpr() = argExpr and
@@ -98,7 +100,7 @@ class ExplicitArgument extends ApplicationModeEndpoint, TExplicitArgument {
ExplicitArgument() { this = TExplicitArgument(call, arg) }
- override Callable getCallable() { result = call.getCallee() }
+ override Callable getCallable() { result = call.getCallee().getSourceDeclaration() }
override Call getCall() { result = call }
@@ -121,7 +123,7 @@ class InstanceArgument extends ApplicationModeEndpoint, TInstanceArgument {
InstanceArgument() { this = TInstanceArgument(call, arg) }
- override Callable getCallable() { result = call.getCallee() }
+ override Callable getCallable() { result = call.getCallee().getSourceDeclaration() }
override Call getCall() { result = call }
@@ -152,7 +154,7 @@ class ImplicitVarargsArray extends ApplicationModeEndpoint, TImplicitVarargsArra
ImplicitVarargsArray() { this = TImplicitVarargsArray(call, vararg, idx) }
- override Callable getCallable() { result = call.getCallee() }
+ override Callable getCallable() { result = call.getCallee().getSourceDeclaration() }
override Call getCall() { result = call }
@@ -176,7 +178,7 @@ class MethodReturnValue extends ApplicationModeEndpoint, TMethodReturnValue {
MethodReturnValue() { this = TMethodReturnValue(call) }
- override Callable getCallable() { result = call.getCallee() }
+ override Callable getCallable() { result = call.getCallee().getSourceDeclaration() }
override Call getCall() { result = call }
@@ -206,7 +208,7 @@ class OverriddenParameter extends ApplicationModeEndpoint, TOverriddenParameter
// candidate model will be about the overridden method, not the overriding
// method. This is a more general model, that also applies to other
// subclasses of the overridden class.
- result = overriddenMethod
+ result = overriddenMethod.getSourceDeclaration()
}
override Call getCall() { none() }
@@ -333,6 +335,9 @@ private module ApplicationModeGetCallable implements AutomodelSharedGetCallable:
/**
* Returns the API callable being modeled.
+ *
+ * We usually want to use `.getSourceDeclaration()` instead of just 'the' callable,
+ * because the source declaration callable has erased generic type parameters.
*/
Callable getCallable(Endpoint e) { result = e.getCall().getCallee() }
}
diff --git a/java/ql/automodel/src/AutomodelEndpointTypes.qll b/java/ql/automodel/src/AutomodelEndpointTypes.qll
index e7eaed15541..8b08722abe2 100644
--- a/java/ql/automodel/src/AutomodelEndpointTypes.qll
+++ b/java/ql/automodel/src/AutomodelEndpointTypes.qll
@@ -18,6 +18,8 @@ abstract class EndpointType extends string {
* Gets the name of the sink/source kind for this endpoint type as used in models-as-data.
*
* See https://github.com/github/codeql/blob/44213f0144fdd54bb679ca48d68b28dcf820f7a8/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll#LL353C11-L357C31
+ * for sink types, and https://github.com/github/codeql/blob/44213f0144fdd54bb679ca48d68b28dcf820f7a8/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll#L365
+ * for source types.
*/
final string getKind() { result = this }
}
diff --git a/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll b/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll
index 222c9344339..038d0f27ff5 100644
--- a/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll
+++ b/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll
@@ -25,7 +25,7 @@ newtype JavaRelatedLocationType =
newtype TFrameworkModeEndpoint =
TExplicitParameter(Parameter p) or
- TQualifier(Callable c) or
+ TQualifier(Callable c) { not c instanceof Constructor } or
TReturnValue(Callable c) or
TOverridableParameter(Method m, Parameter p) {
p.getCallable() = m and
diff --git a/java/ql/automodel/src/AutomodelSharedCharacteristics.qll b/java/ql/automodel/src/AutomodelSharedCharacteristics.qll
index 992d9c08332..3704845fe17 100644
--- a/java/ql/automodel/src/AutomodelSharedCharacteristics.qll
+++ b/java/ql/automodel/src/AutomodelSharedCharacteristics.qll
@@ -63,12 +63,12 @@ signature module CandidateSig {
predicate isSink(Endpoint e, string kind, string provenance);
/**
- * Holds if `e` is a sink with the label `kind`, and provenance `provenance`.
+ * Holds if `e` is a source with the label `kind`, and provenance `provenance`.
*/
predicate isSource(Endpoint e, string kind, string provenance);
/**
- * Holds if `e` is not a sink of any kind.
+ * Holds if `e` is not a source or sink of any kind.
*/
predicate isNeutral(Endpoint e);
diff --git a/java/ql/automodel/src/CHANGELOG.md b/java/ql/automodel/src/CHANGELOG.md
index 88b3b77ee45..e1c0a6ed461 100644
--- a/java/ql/automodel/src/CHANGELOG.md
+++ b/java/ql/automodel/src/CHANGELOG.md
@@ -1,7 +1,10 @@
-## 0.0.7
+## 0.0.8
No user-facing changes.
+## 0.0.7
+
+Support for extracting source candidates.
## 0.0.6
No user-facing changes.
diff --git a/java/ql/automodel/src/change-notes/released/0.0.7.md b/java/ql/automodel/src/change-notes/released/0.0.7.md
index 84da6f18c42..098fada6105 100644
--- a/java/ql/automodel/src/change-notes/released/0.0.7.md
+++ b/java/ql/automodel/src/change-notes/released/0.0.7.md
@@ -1,3 +1,3 @@
## 0.0.7
-No user-facing changes.
+Support for extracting source candidates.
\ No newline at end of file
diff --git a/java/ql/automodel/src/change-notes/released/0.0.8.md b/java/ql/automodel/src/change-notes/released/0.0.8.md
new file mode 100644
index 00000000000..6af2d954c09
--- /dev/null
+++ b/java/ql/automodel/src/change-notes/released/0.0.8.md
@@ -0,0 +1,3 @@
+## 0.0.8
+
+No user-facing changes.
diff --git a/java/ql/automodel/src/codeql-pack.release.yml b/java/ql/automodel/src/codeql-pack.release.yml
index a2a5484910b..58fdc6b45de 100644
--- a/java/ql/automodel/src/codeql-pack.release.yml
+++ b/java/ql/automodel/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.0.7
+lastReleaseVersion: 0.0.8
diff --git a/java/ql/automodel/src/qlpack.yml b/java/ql/automodel/src/qlpack.yml
index 23b4a9e7e32..9b84f8ce097 100644
--- a/java/ql/automodel/src/qlpack.yml
+++ b/java/ql/automodel/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/java-automodel-queries
-version: 0.0.8-dev
+version: 0.0.9-dev
groups:
- java
- automodel
diff --git a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractCandidates.expected b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractCandidates.expected
index b3de04f0551..a7be708f9da 100644
--- a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractCandidates.expected
+++ b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractCandidates.expected
@@ -1,13 +1,13 @@
| PluginImpl.java:5:27:5:37 | name | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | PluginImpl.java:5:27:5:37 | name | CallContext | hudson/Plugin.java:5:5:5:31 | /** Configure method doc */ | MethodDoc | hudson/Plugin.java:3:1:3:17 | /** Plugin doc */ | ClassDoc | file://hudson:1:1:1:1 | hudson | package | file://Plugin:1:1:1:1 | Plugin | type | file://true:1:1:1:1 | true | subtypes | file://configure:1:1:1:1 | configure | name | file://(String,String):1:1:1:1 | (String,String) | signature | file://:1:1:1:1 | | input | file://Parameter[0]:1:1:1:1 | Parameter[0] | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
| PluginImpl.java:5:40:5:51 | value | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | PluginImpl.java:5:40:5:51 | value | CallContext | hudson/Plugin.java:5:5:5:31 | /** Configure method doc */ | MethodDoc | hudson/Plugin.java:3:1:3:17 | /** Plugin doc */ | ClassDoc | file://hudson:1:1:1:1 | hudson | package | file://Plugin:1:1:1:1 | Plugin | type | file://true:1:1:1:1 | true | subtypes | file://configure:1:1:1:1 | configure | name | file://(String,String):1:1:1:1 | (String,String) | signature | file://:1:1:1:1 | | input | file://Parameter[1]:1:1:1:1 | Parameter[1] | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:18:3:18:11 | reference | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:18:3:18:24 | set(...) | CallContext | Test.java:18:3:18:11 | reference | MethodDoc | Test.java:18:3:18:11 | reference | ClassDoc | file://java.util.concurrent.atomic:1:1:1:1 | java.util.concurrent.atomic | package | file://AtomicReference:1:1:1:1 | AtomicReference | type | file://false:1:1:1:1 | false | subtypes | file://set:1:1:1:1 | set | name | file://(String):1:1:1:1 | (String) | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:23:3:23:10 | supplier | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:23:3:23:16 | get(...) | CallContext | Test.java:23:3:23:10 | supplier | MethodDoc | Test.java:23:3:23:10 | supplier | ClassDoc | file://java.util.function:1:1:1:1 | java.util.function | package | file://Supplier:1:1:1:1 | Supplier | type | file://true:1:1:1:1 | true | subtypes | file://get:1:1:1:1 | get | name | file://():1:1:1:1 | () | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:23:3:23:16 | get(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:23:3:23:16 | get(...) | CallContext | Test.java:23:3:23:16 | get(...) | MethodDoc | Test.java:23:3:23:16 | get(...) | ClassDoc | file://java.util.function:1:1:1:1 | java.util.function | package | file://Supplier:1:1:1:1 | Supplier | type | file://true:1:1:1:1 | true | subtypes | file://get:1:1:1:1 | get | name | file://():1:1:1:1 | () | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:27:3:31:3 | copy(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:27:3:31:3 | copy(...) | CallContext | Test.java:27:3:31:3 | copy(...) | MethodDoc | Test.java:27:3:31:3 | copy(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:35:10:37:3 | newInputStream(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:35:10:37:3 | newInputStream(...) | CallContext | Test.java:35:10:37:3 | newInputStream(...) | MethodDoc | Test.java:35:10:37:3 | newInputStream(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:36:4:36:11 | openPath | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:35:10:37:3 | newInputStream(...) | CallContext | Test.java:36:4:36:11 | openPath | MethodDoc | Test.java:36:4:36:11 | openPath | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://ai-manual:1:1:1:1 | ai-manual | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:42:4:42:22 | get(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:42:4:42:22 | get(...) | CallContext | Test.java:42:4:42:22 | get(...) | MethodDoc | Test.java:42:4:42:22 | get(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Paths:1:1:1:1 | Paths | type | file://false:1:1:1:1 | false | subtypes | file://get:1:1:1:1 | get | name | file://(String,String[]):1:1:1:1 | (String,String[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:53:3:58:3 | walk(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:53:3:58:3 | walk(...) | CallContext | Test.java:53:3:58:3 | walk(...) | MethodDoc | Test.java:53:3:58:3 | walk(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:55:4:55:4 | o | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:53:3:58:3 | walk(...) | CallContext | Test.java:53:3:58:3 | walk(...) | MethodDoc | Test.java:53:3:58:3 | walk(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://Argument[1]:1:1:1:1 | Argument[1] | input | file://:1:1:1:1 | | output | file://true:1:1:1:1 | true | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:62:3:62:3 | c | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:62:3:62:20 | getInputStream(...) | CallContext | Test.java:62:3:62:3 | c | MethodDoc | Test.java:62:3:62:3 | c | ClassDoc | file://java.net:1:1:1:1 | java.net | package | file://URLConnection:1:1:1:1 | URLConnection | type | file://true:1:1:1:1 | true | subtypes | file://getInputStream:1:1:1:1 | getInputStream | name | file://():1:1:1:1 | () | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:67:30:67:47 | writer | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:67:30:67:47 | writer | CallContext | Test.java:67:30:67:47 | writer | MethodDoc | Test.java:67:30:67:47 | writer | ClassDoc | file://java.lang:1:1:1:1 | java.lang | package | file://Throwable:1:1:1:1 | Throwable | type | file://true:1:1:1:1 | true | subtypes | file://printStackTrace:1:1:1:1 | printStackTrace | name | file://(PrintWriter):1:1:1:1 | (PrintWriter) | signature | file://:1:1:1:1 | | input | file://Parameter[0]:1:1:1:1 | Parameter[0] | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:19:3:19:11 | reference | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:19:3:19:24 | set(...) | CallContext | Test.java:19:3:19:11 | reference | MethodDoc | Test.java:19:3:19:11 | reference | ClassDoc | file://java.util.concurrent.atomic:1:1:1:1 | java.util.concurrent.atomic | package | file://AtomicReference:1:1:1:1 | AtomicReference | type | file://false:1:1:1:1 | false | subtypes | file://set:1:1:1:1 | set | name | file://(Object):1:1:1:1 | (Object) | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:24:3:24:10 | supplier | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:24:3:24:16 | get(...) | CallContext | Test.java:24:3:24:10 | supplier | MethodDoc | Test.java:24:3:24:10 | supplier | ClassDoc | file://java.util.function:1:1:1:1 | java.util.function | package | file://Supplier:1:1:1:1 | Supplier | type | file://true:1:1:1:1 | true | subtypes | file://get:1:1:1:1 | get | name | file://():1:1:1:1 | () | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:24:3:24:16 | get(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:24:3:24:16 | get(...) | CallContext | Test.java:24:3:24:16 | get(...) | MethodDoc | Test.java:24:3:24:16 | get(...) | ClassDoc | file://java.util.function:1:1:1:1 | java.util.function | package | file://Supplier:1:1:1:1 | Supplier | type | file://true:1:1:1:1 | true | subtypes | file://get:1:1:1:1 | get | name | file://():1:1:1:1 | () | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:28:3:32:3 | copy(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:28:3:32:3 | copy(...) | CallContext | Test.java:28:3:32:3 | copy(...) | MethodDoc | Test.java:28:3:32:3 | copy(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:36:10:38:3 | newInputStream(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:36:10:38:3 | newInputStream(...) | CallContext | Test.java:36:10:38:3 | newInputStream(...) | MethodDoc | Test.java:36:10:38:3 | newInputStream(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:37:4:37:11 | openPath | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:36:10:38:3 | newInputStream(...) | CallContext | Test.java:37:4:37:11 | openPath | MethodDoc | Test.java:37:4:37:11 | openPath | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://ai-manual:1:1:1:1 | ai-manual | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:43:4:43:22 | get(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:43:4:43:22 | get(...) | CallContext | Test.java:43:4:43:22 | get(...) | MethodDoc | Test.java:43:4:43:22 | get(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Paths:1:1:1:1 | Paths | type | file://false:1:1:1:1 | false | subtypes | file://get:1:1:1:1 | get | name | file://(String,String[]):1:1:1:1 | (String,String[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:54:3:59:3 | walk(...) | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:54:3:59:3 | walk(...) | CallContext | Test.java:54:3:59:3 | walk(...) | MethodDoc | Test.java:54:3:59:3 | walk(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:56:4:56:4 | o | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:54:3:59:3 | walk(...) | CallContext | Test.java:54:3:59:3 | walk(...) | MethodDoc | Test.java:54:3:59:3 | walk(...) | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://Argument[1]:1:1:1:1 | Argument[1] | input | file://:1:1:1:1 | | output | file://true:1:1:1:1 | true | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:63:3:63:3 | c | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:63:3:63:20 | getInputStream(...) | CallContext | Test.java:63:3:63:3 | c | MethodDoc | Test.java:63:3:63:3 | c | ClassDoc | file://java.net:1:1:1:1 | java.net | package | file://URLConnection:1:1:1:1 | URLConnection | type | file://true:1:1:1:1 | true | subtypes | file://getInputStream:1:1:1:1 | getInputStream | name | file://():1:1:1:1 | () | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:68:30:68:47 | writer | Related locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:68:30:68:47 | writer | CallContext | Test.java:68:30:68:47 | writer | MethodDoc | Test.java:68:30:68:47 | writer | ClassDoc | file://java.lang:1:1:1:1 | java.lang | package | file://Throwable:1:1:1:1 | Throwable | type | file://true:1:1:1:1 | true | subtypes | file://printStackTrace:1:1:1:1 | printStackTrace | name | file://(PrintWriter):1:1:1:1 | (PrintWriter) | signature | file://:1:1:1:1 | | input | file://Parameter[0]:1:1:1:1 | Parameter[0] | output | file://false:1:1:1:1 | false | isVarargsArray | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
diff --git a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractNegativeExamples.expected b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractNegativeExamples.expected
index 092551af317..91f33b6fb05 100644
--- a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractNegativeExamples.expected
+++ b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractNegativeExamples.expected
@@ -1,4 +1,3 @@
-| Test.java:47:10:49:3 | compareTo(...) | known sanitizer\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:47:10:49:3 | compareTo(...) | CallContext | Test.java:47:10:49:3 | compareTo(...) | MethodDoc | Test.java:47:10:49:3 | compareTo(...) | ClassDoc | file://java.io:1:1:1:1 | java.io | package | file://File:1:1:1:1 | File | type | file://true:1:1:1:1 | true | subtypes | file://compareTo:1:1:1:1 | compareTo | name | file://(File):1:1:1:1 | (File) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
-| Test.java:48:4:48:5 | f2 | known non-sink\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:47:10:49:3 | compareTo(...) | CallContext | Test.java:48:4:48:5 | f2 | MethodDoc | Test.java:48:4:48:5 | f2 | ClassDoc | file://java.io:1:1:1:1 | java.io | package | file://File:1:1:1:1 | File | type | file://true:1:1:1:1 | true | subtypes | file://compareTo:1:1:1:1 | compareTo | name | file://(File):1:1:1:1 | (File) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:54:4:54:4 | p | taint step\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:53:3:58:3 | walk(...) | CallContext | Test.java:54:4:54:4 | p | MethodDoc | Test.java:54:4:54:4 | p | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:66:7:66:18 | this | exception\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:66:7:66:18 | super(...) | CallContext | Test.java:66:7:66:18 | super(...) | MethodDoc | Test.java:66:7:66:18 | super(...) | ClassDoc | file://java.lang:1:1:1:1 | java.lang | package | file://Exception:1:1:1:1 | Exception | type | file://true:1:1:1:1 | true | subtypes | file://Exception:1:1:1:1 | Exception | name | file://():1:1:1:1 | () | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:48:10:50:3 | compareTo(...) | known sanitizer\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:48:10:50:3 | compareTo(...) | CallContext | Test.java:48:10:50:3 | compareTo(...) | MethodDoc | Test.java:48:10:50:3 | compareTo(...) | ClassDoc | file://java.io:1:1:1:1 | java.io | package | file://File:1:1:1:1 | File | type | file://true:1:1:1:1 | true | subtypes | file://compareTo:1:1:1:1 | compareTo | name | file://(File):1:1:1:1 | (File) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:49:4:49:5 | f2 | known non-sink\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:48:10:50:3 | compareTo(...) | CallContext | Test.java:49:4:49:5 | f2 | MethodDoc | Test.java:49:4:49:5 | f2 | ClassDoc | file://java.io:1:1:1:1 | java.io | package | file://File:1:1:1:1 | File | type | file://true:1:1:1:1 | true | subtypes | file://compareTo:1:1:1:1 | compareTo | name | file://(File):1:1:1:1 | (File) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:55:4:55:4 | p | taint step\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:54:3:59:3 | walk(...) | CallContext | Test.java:55:4:55:4 | p | MethodDoc | Test.java:55:4:55:4 | p | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://walk:1:1:1:1 | walk | name | file://(Path,FileVisitOption[]):1:1:1:1 | (Path,FileVisitOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
diff --git a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractPositiveExamples.expected b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractPositiveExamples.expected
index 3419e5c0c8d..60db0852024 100644
--- a/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractPositiveExamples.expected
+++ b/java/ql/automodel/test/AutomodelApplicationModeExtraction/AutomodelApplicationModeExtractPositiveExamples.expected
@@ -1,4 +1,4 @@
-| Test.java:28:4:28:9 | source | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:27:3:31:3 | copy(...) | CallContext | Test.java:28:4:28:9 | source | MethodDoc | Test.java:28:4:28:9 | source | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:29:4:29:9 | target | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:27:3:31:3 | copy(...) | CallContext | Test.java:29:4:29:9 | target | MethodDoc | Test.java:29:4:29:9 | target | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://Argument[1]:1:1:1:1 | Argument[1] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:36:4:36:11 | openPath | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:35:10:37:3 | newInputStream(...) | CallContext | Test.java:36:4:36:11 | openPath | MethodDoc | Test.java:36:4:36:11 | openPath | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
-| Test.java:62:3:62:20 | getInputStream(...) | remote\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:62:3:62:20 | getInputStream(...) | CallContext | Test.java:62:3:62:20 | getInputStream(...) | MethodDoc | Test.java:62:3:62:20 | getInputStream(...) | ClassDoc | file://java.net:1:1:1:1 | java.net | package | file://URLConnection:1:1:1:1 | URLConnection | type | file://true:1:1:1:1 | true | subtypes | file://getInputStream:1:1:1:1 | getInputStream | name | file://():1:1:1:1 | () | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| Test.java:29:4:29:9 | source | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:28:3:32:3 | copy(...) | CallContext | Test.java:29:4:29:9 | source | MethodDoc | Test.java:29:4:29:9 | source | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:30:4:30:9 | target | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:28:3:32:3 | copy(...) | CallContext | Test.java:30:4:30:9 | target | MethodDoc | Test.java:30:4:30:9 | target | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://copy:1:1:1:1 | copy | name | file://(Path,Path,CopyOption[]):1:1:1:1 | (Path,Path,CopyOption[]) | signature | file://Argument[1]:1:1:1:1 | Argument[1] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:37:4:37:11 | openPath | path-injection\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:36:10:38:3 | newInputStream(...) | CallContext | Test.java:37:4:37:11 | openPath | MethodDoc | Test.java:37:4:37:11 | openPath | ClassDoc | file://java.nio.file:1:1:1:1 | java.nio.file | package | file://Files:1:1:1:1 | Files | type | file://false:1:1:1:1 | false | subtypes | file://newInputStream:1:1:1:1 | newInputStream | name | file://(Path,OpenOption[]):1:1:1:1 | (Path,OpenOption[]) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://false:1:1:1:1 | false | isVarargsArray | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| Test.java:63:3:63:20 | getInputStream(...) | remote\nrelated locations: $@, $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@. | Test.java:63:3:63:20 | getInputStream(...) | CallContext | Test.java:63:3:63:20 | getInputStream(...) | MethodDoc | Test.java:63:3:63:20 | getInputStream(...) | ClassDoc | file://java.net:1:1:1:1 | java.net | package | file://URLConnection:1:1:1:1 | URLConnection | type | file://true:1:1:1:1 | true | subtypes | file://getInputStream:1:1:1:1 | getInputStream | name | file://():1:1:1:1 | () | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://false:1:1:1:1 | false | isVarargsArray | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
diff --git a/java/ql/automodel/test/AutomodelApplicationModeExtraction/Test.java b/java/ql/automodel/test/AutomodelApplicationModeExtraction/Test.java
index 0bfb83ad520..3851a689969 100644
--- a/java/ql/automodel/test/AutomodelApplicationModeExtraction/Test.java
+++ b/java/ql/automodel/test/AutomodelApplicationModeExtraction/Test.java
@@ -11,6 +11,7 @@ import java.util.function.Supplier;
import java.io.File;
import java.nio.file.FileVisitOption;
import java.net.URLConnection;
+import java.util.concurrent.FutureTask;
class Test {
public static void main(String[] args) throws Exception {
@@ -67,4 +68,15 @@ class OverrideTest extends Exception {
public void printStackTrace(PrintWriter writer) { // writer is a source candidate because it overrides an existing method
return;
}
+
+}
+
+class TaskUtils {
+ public FutureTask getTask() {
+ FutureTask ft = new FutureTask(() -> {
+ // ^-- no sink candidate for the `this` qualifier of a constructor
+ return 42;
+ });
+ return ft;
+ }
}
diff --git a/java/ql/automodel/test/AutomodelFrameworkModeExtraction/AutomodelFrameworkModeExtractCandidates.expected b/java/ql/automodel/test/AutomodelFrameworkModeExtraction/AutomodelFrameworkModeExtractCandidates.expected
index 2bb9b2edb25..fc3debce039 100644
--- a/java/ql/automodel/test/AutomodelFrameworkModeExtraction/AutomodelFrameworkModeExtractCandidates.expected
+++ b/java/ql/automodel/test/AutomodelFrameworkModeExtraction/AutomodelFrameworkModeExtractCandidates.expected
@@ -10,6 +10,8 @@
| com/github/codeql/test/PublicClass.java:13:18:13:31 | nonPublicStuff | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicClass.java:13:18:13:31 | nonPublicStuff | MethodDoc | com/github/codeql/test/PublicClass.java:13:18:13:31 | nonPublicStuff | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicClass:1:1:1:1 | PublicClass | type | file://true:1:1:1:1 | true | subtypes | file://nonPublicStuff:1:1:1:1 | nonPublicStuff | name | file://(String):1:1:1:1 | (String) | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://this:1:1:1:1 | this | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
| com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | MethodDoc | com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicClass:1:1:1:1 | PublicClass | type | file://true:1:1:1:1 | true | subtypes | file://nonPublicStuff:1:1:1:1 | nonPublicStuff | name | file://(String):1:1:1:1 | (String) | signature | file://:1:1:1:1 | | input | file://Parameter[0]:1:1:1:1 | Parameter[0] | output | file://arg:1:1:1:1 | arg | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
| com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | MethodDoc | com/github/codeql/test/PublicClass.java:13:33:13:42 | arg | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicClass:1:1:1:1 | PublicClass | type | file://true:1:1:1:1 | true | subtypes | file://nonPublicStuff:1:1:1:1 | nonPublicStuff | name | file://(String):1:1:1:1 | (String) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://arg:1:1:1:1 | arg | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
+| com/github/codeql/test/PublicClass.java:22:10:22:20 | PublicClass | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicClass.java:22:10:22:20 | PublicClass | MethodDoc | com/github/codeql/test/PublicClass.java:22:10:22:20 | PublicClass | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicClass:1:1:1:1 | PublicClass | type | file://true:1:1:1:1 | true | subtypes | file://PublicClass:1:1:1:1 | PublicClass | name | file://(Object):1:1:1:1 | (Object) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://:1:1:1:1 | | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
+| com/github/codeql/test/PublicClass.java:22:22:22:33 | input | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicClass.java:22:22:22:33 | input | MethodDoc | com/github/codeql/test/PublicClass.java:22:22:22:33 | input | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicClass:1:1:1:1 | PublicClass | type | file://true:1:1:1:1 | true | subtypes | file://PublicClass:1:1:1:1 | PublicClass | name | file://(Object):1:1:1:1 | (Object) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input | file://:1:1:1:1 | | output | file://input:1:1:1:1 | input | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
| com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | MethodDoc | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicInterface:1:1:1:1 | PublicInterface | type | file://true:1:1:1:1 | true | subtypes | file://stuff:1:1:1:1 | stuff | name | file://(String):1:1:1:1 | (String) | signature | file://:1:1:1:1 | | input | file://Parameter[this]:1:1:1:1 | Parameter[this] | output | file://this:1:1:1:1 | this | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
| com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | MethodDoc | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicInterface:1:1:1:1 | PublicInterface | type | file://true:1:1:1:1 | true | subtypes | file://stuff:1:1:1:1 | stuff | name | file://(String):1:1:1:1 | (String) | signature | file://:1:1:1:1 | | input | file://ReturnValue:1:1:1:1 | ReturnValue | output | file://:1:1:1:1 | | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sourceModel:1:1:1:1 | sourceModel | extensibleType |
| com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | Related locations: $@, $@.\nmetadata: $@, $@, $@, $@, $@, $@, $@, $@, $@, $@. | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | MethodDoc | com/github/codeql/test/PublicInterface.java:4:17:4:21 | stuff | ClassDoc | file://com.github.codeql.test:1:1:1:1 | com.github.codeql.test | package | file://PublicInterface:1:1:1:1 | PublicInterface | type | file://true:1:1:1:1 | true | subtypes | file://stuff:1:1:1:1 | stuff | name | file://(String):1:1:1:1 | (String) | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input | file://:1:1:1:1 | | output | file://this:1:1:1:1 | this | parameterName | file://:1:1:1:1 | | alreadyAiModeled | file://sinkModel:1:1:1:1 | sinkModel | extensibleType |
diff --git a/java/ql/automodel/test/AutomodelFrameworkModeExtraction/com/github/codeql/test/PublicClass.java b/java/ql/automodel/test/AutomodelFrameworkModeExtraction/com/github/codeql/test/PublicClass.java
index 49613d6d361..cb009cc8afc 100644
--- a/java/ql/automodel/test/AutomodelFrameworkModeExtraction/com/github/codeql/test/PublicClass.java
+++ b/java/ql/automodel/test/AutomodelFrameworkModeExtraction/com/github/codeql/test/PublicClass.java
@@ -18,4 +18,8 @@ public class PublicClass {
void packagePrivateStuff(String arg) {
System.out.println(arg);
}
+
+ public PublicClass(Object input) {
+ // the `this` qualifier is not a candidate
+ }
}
diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md
index 0bfe85bbcf6..ddff6b835a0 100644
--- a/java/ql/lib/CHANGELOG.md
+++ b/java/ql/lib/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 0.8.3
+
+### Deprecated APIs
+
+* In `SensitiveApi.qll`, `javaApiCallablePasswordParam`, `javaApiCallableUsernameParam`, `javaApiCallableCryptoKeyParam`, and `otherApiCallableCredentialParam` predicates have been deprecated. They have been replaced with a new class `CredentialsSinkNode` and its child classes `PasswordSink`, `UsernameSink`, and `CryptoKeySink`. The predicates have been changed to using the new classes, so there may be minor changes in results relying on these predicates.
+
+### Minor Analysis Improvements
+
+* The types `java.util.SequencedCollection`, `SequencedSet` and `SequencedMap`, as well as the related `Collections.unmodifiableSequenced*` methods are now modelled. This means alerts may be raised relating to data flow through these types and methods.
+
## 0.8.2
### Minor Analysis Improvements
diff --git a/java/ql/lib/change-notes/2023-11-06-jdk21-models.md b/java/ql/lib/change-notes/2023-11-06-jdk21-models.md
deleted file mode 100644
index ac3d6b1ff96..00000000000
--- a/java/ql/lib/change-notes/2023-11-06-jdk21-models.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-category: minorAnalysis
----
-* The types `java.util.SequencedCollection`, `SequencedSet` and `SequencedMap`, as well as the related `Collections.unmodifiableSequenced*` methods are now modelled. This means alerts may be raised relating to data flow through these types and methods.
diff --git a/java/ql/lib/change-notes/2023-10-04-deprecated-sensitiveapi-predicates.md b/java/ql/lib/change-notes/released/0.8.3.md
similarity index 59%
rename from java/ql/lib/change-notes/2023-10-04-deprecated-sensitiveapi-predicates.md
rename to java/ql/lib/change-notes/released/0.8.3.md
index c847b42237d..4231d35958e 100644
--- a/java/ql/lib/change-notes/2023-10-04-deprecated-sensitiveapi-predicates.md
+++ b/java/ql/lib/change-notes/released/0.8.3.md
@@ -1,4 +1,9 @@
----
-category: deprecated
----
+## 0.8.3
+
+### Deprecated APIs
+
* In `SensitiveApi.qll`, `javaApiCallablePasswordParam`, `javaApiCallableUsernameParam`, `javaApiCallableCryptoKeyParam`, and `otherApiCallableCredentialParam` predicates have been deprecated. They have been replaced with a new class `CredentialsSinkNode` and its child classes `PasswordSink`, `UsernameSink`, and `CryptoKeySink`. The predicates have been changed to using the new classes, so there may be minor changes in results relying on these predicates.
+
+### Minor Analysis Improvements
+
+* The types `java.util.SequencedCollection`, `SequencedSet` and `SequencedMap`, as well as the related `Collections.unmodifiableSequenced*` methods are now modelled. This means alerts may be raised relating to data flow through these types and methods.
diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml
index 404110129dc..b6e46394f37 100644
--- a/java/ql/lib/codeql-pack.release.yml
+++ b/java/ql/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.8.2
+lastReleaseVersion: 0.8.3
diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml
index d081d963060..311ca78d386 100644
--- a/java/ql/lib/qlpack.yml
+++ b/java/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/java-all
-version: 0.8.3-dev
+version: 0.8.4-dev
groups: java
dbscheme: config/semmlecode.dbscheme
extractor: java
diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll
index 01ba8cfd26a..79e507dd598 100644
--- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll
+++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll
@@ -61,11 +61,9 @@ private predicate closureFlowStep(Expr e1, Expr e2) {
)
}
-private module CaptureInput implements VariableCapture::InputSig {
+private module CaptureInput implements VariableCapture::InputSig {
private import java as J
- class Location = J::Location;
-
class BasicBlock instanceof J::BasicBlock {
string toString() { result = super.toString() }
@@ -146,7 +144,7 @@ class CapturedVariable = CaptureInput::CapturedVariable;
class CapturedParameter = CaptureInput::CapturedParameter;
-module CaptureFlow = VariableCapture::Flow;
+module CaptureFlow = VariableCapture::Flow;
private CaptureFlow::ClosureNode asClosureNode(Node n) {
result = n.(CaptureNode).getSynthesizedCaptureNode()
diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md
index 264532fc787..c5df8405eaf 100644
--- a/java/ql/src/CHANGELOG.md
+++ b/java/ql/src/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 0.8.3
+
+### Minor Analysis Improvements
+
+* The query `java/unsafe-deserialization` has been improved to detect insecure calls to `ObjectMessage.getObject` in JMS.
+
## 0.8.2
### Minor Analysis Improvements
diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPath.java b/java/ql/src/Security/CWE/CWE-022/TaintedPath.java
index 339640ccc32..1fad061d0ba 100644
--- a/java/ql/src/Security/CWE/CWE-022/TaintedPath.java
+++ b/java/ql/src/Security/CWE/CWE-022/TaintedPath.java
@@ -2,23 +2,11 @@ public void sendUserFile(Socket sock, String user) {
BufferedReader filenameReader = new BufferedReader(
new InputStreamReader(sock.getInputStream(), "UTF-8"));
String filename = filenameReader.readLine();
- // BAD: read from a file using a path controlled by the user
- BufferedReader fileReader = new BufferedReader(
- new FileReader("/home/" + user + "/" + filename));
+ // BAD: read from a file without checking its path
+ BufferedReader fileReader = new BufferedReader(new FileReader(filename));
String fileLine = fileReader.readLine();
while(fileLine != null) {
sock.getOutputStream().write(fileLine.getBytes());
fileLine = fileReader.readLine();
}
}
-
-public void sendUserFileFixed(Socket sock, String user) {
- // ...
-
- // GOOD: remove all dots and directory delimiters from the filename before using
- String filename = filenameReader.readLine().replaceAll("\\.", "").replaceAll("/", "");
- BufferedReader fileReader = new BufferedReader(
- new FileReader("/home/" + user + "/" + filename));
-
- // ...
-}
diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp b/java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp
index b32d3c65039..a68bdad3441 100644
--- a/java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp
+++ b/java/ql/src/Security/CWE/CWE-022/TaintedPath.qhelp
@@ -8,32 +8,44 @@ can result in sensitive information being revealed or deleted, or an attacker be
behavior by modifying unexpected files.
Paths that are naively constructed from data controlled by a user may contain unexpected special characters,
-such as "..". Such a path may potentially point to any directory on the file system.
+such as "..". Such a path may potentially point anywhere on the file system.
-
Validate user input before using it to construct a file path. Ideally, follow these rules:
+
Validate user input before using it to construct a file path.
-
-
Do not allow more than a single "." character.
-
Do not allow directory separators such as "/" or "\" (depending on the file system).
-
Do not rely on simply replacing problematic sequences such as "../". For example, after applying this filter to
-".../...//" the resulting string would still be "../".
-
Ideally use a whitelist of known good patterns.
-
+
The choice of validation depends on whether you want to allow the user to specify complex paths with
+multiple components that may span multiple folders, or only simple filenames without a path component.
+
+
In the former case, a common strategy is to make sure that the constructed file path is contained within
+a safe root folder, for example by checking that the path starts with the root folder. Additionally,
+you need to ensure that the path does not contain any ".." components, since otherwise
+even a path that starts with the root folder could be used to access files outside the root folder.
+
+
In the latter case, if you want to ensure that the user input is interpreted as a simple filename without
+a path component, you can remove all path separators ("/" or "\") and all ".." sequences from the input
+before using it to construct a file path. Note that it is not sufficient to only remove "../" sequences:
+for example, applying this filter to ".../...//" would still result in the string "../".
+
+
Finally, the simplest (but most restrictive) option is to use an allow list of safe patterns and make sure that
+the user input matches one of these patterns.
-
In this example, a file name is read from a java.net.Socket and then used to access a file in the
-user's home directory and send it back over the socket. However, a malicious user could enter a file name which contains special
-characters. For example, the string "../../etc/passwd" will result in the code reading the file located at
-"/home/[user]/../../etc/passwd", which is the system's password file. This file would then be sent back to the user,
-giving them access to all the system's passwords.
+
In this example, a file name is read from a java.net.Socket and then used to access a file
+and send it back over the socket. However, a malicious user could enter a file name anywhere on the file system,
+such as "/etc/passwd".
+
Simply checking that the path is under a trusted location (such as a known public folder) is not enough,
+however, since the path could contain relative components such as "..". To fix this, check that it does
+not contain ".." and starts with the public folder.
+
+
+
diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPathGood.java b/java/ql/src/Security/CWE/CWE-022/TaintedPathGood.java
new file mode 100644
index 00000000000..37e8be7486c
--- /dev/null
+++ b/java/ql/src/Security/CWE/CWE-022/TaintedPathGood.java
@@ -0,0 +1,14 @@
+public void sendUserFileGood(Socket sock, String user) {
+ BufferedReader filenameReader = new BufferedReader(
+ new InputStreamReader(sock.getInputStream(), "UTF-8"));
+ String filename = filenameReader.readLine();
+ // GOOD: ensure that the file is in a designated folder in the user's home directory
+ if (!filename.contains("..") && filename.startsWith("/home/" + user + "/public/")) {
+ BufferedReader fileReader = new BufferedReader(new FileReader(filename));
+ String fileLine = fileReader.readLine();
+ while(fileLine != null) {
+ sock.getOutputStream().write(fileLine.getBytes());
+ fileLine = fileReader.readLine();
+ }
+ }
+}
diff --git a/java/ql/src/change-notes/2023-10-26-jms-unsafe-deserialization.md b/java/ql/src/change-notes/released/0.8.3.md
similarity index 73%
rename from java/ql/src/change-notes/2023-10-26-jms-unsafe-deserialization.md
rename to java/ql/src/change-notes/released/0.8.3.md
index 9ea3fbd866b..b24c81b3708 100644
--- a/java/ql/src/change-notes/2023-10-26-jms-unsafe-deserialization.md
+++ b/java/ql/src/change-notes/released/0.8.3.md
@@ -1,4 +1,5 @@
----
-category: minorAnalysis
----
+## 0.8.3
+
+### Minor Analysis Improvements
+
* The query `java/unsafe-deserialization` has been improved to detect insecure calls to `ObjectMessage.getObject` in JMS.
diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml
index 404110129dc..b6e46394f37 100644
--- a/java/ql/src/codeql-pack.release.yml
+++ b/java/ql/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 0.8.2
+lastReleaseVersion: 0.8.3
diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml
index 9a8ff49eefd..342a7b86be8 100644
--- a/java/ql/src/qlpack.yml
+++ b/java/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/java-queries
-version: 0.8.3-dev
+version: 0.8.4-dev
groups:
- java
- queries
diff --git a/java/ql/test-kotlin1/TestUtilities/InlineExpectationsTest.qll b/java/ql/test-kotlin1/TestUtilities/InlineExpectationsTest.qll
new file mode 100644
index 00000000000..44306864a97
--- /dev/null
+++ b/java/ql/test-kotlin1/TestUtilities/InlineExpectationsTest.qll
@@ -0,0 +1,8 @@
+/**
+ * Inline expectation tests for Java.
+ * See `shared/util/codeql/util/test/InlineExpectationsTest.qll`
+ */
+
+private import codeql.util.test.InlineExpectationsTest
+private import internal.InlineExpectationsTestImpl
+import Make
diff --git a/java/ql/test-kotlin1/TestUtilities/InlineFlowTest.qll b/java/ql/test-kotlin1/TestUtilities/InlineFlowTest.qll
new file mode 100644
index 00000000000..d815f302638
--- /dev/null
+++ b/java/ql/test-kotlin1/TestUtilities/InlineFlowTest.qll
@@ -0,0 +1,33 @@
+/**
+ * Inline flow tests for Java.
+ * See `shared/util/codeql/dataflow/test/InlineFlowTest.qll`
+ */
+
+import java
+import semmle.code.java.dataflow.DataFlow
+private import codeql.dataflow.test.InlineFlowTest
+private import semmle.code.java.dataflow.internal.DataFlowImplSpecific
+private import semmle.code.java.dataflow.internal.TaintTrackingImplSpecific
+private import internal.InlineExpectationsTestImpl
+
+private module FlowTestImpl implements InputSig {
+ predicate defaultSource(DataFlow::Node source) {
+ source.asExpr().(MethodCall).getMethod().getName() = ["source", "taint"]
+ }
+
+ predicate defaultSink(DataFlow::Node sink) {
+ exists(MethodCall ma | ma.getMethod().hasName("sink") | sink.asExpr() = ma.getAnArgument())
+ }
+
+ private string getSourceArgString(DataFlow::Node src) {
+ defaultSource(src) and
+ src.asExpr().(MethodCall).getAnArgument().(StringLiteral).getValue() = result
+ }
+
+ string getArgString(DataFlow::Node src, DataFlow::Node sink) {
+ (if exists(getSourceArgString(src)) then result = getSourceArgString(src) else result = "") and
+ exists(sink)
+ }
+}
+
+import InlineFlowTestMake
diff --git a/java/ql/test-kotlin1/TestUtilities/internal/InlineExpectationsTestImpl.qll b/java/ql/test-kotlin1/TestUtilities/internal/InlineExpectationsTestImpl.qll
new file mode 100644
index 00000000000..cd62fdb757e
--- /dev/null
+++ b/java/ql/test-kotlin1/TestUtilities/internal/InlineExpectationsTestImpl.qll
@@ -0,0 +1,35 @@
+private import java as J
+private import codeql.util.test.InlineExpectationsTest
+
+module Impl implements InlineExpectationsTestSig {
+ /**
+ * A class representing line comments in Java, which is simply Javadoc restricted
+ * to EOL comments, with an extra accessor used by the InlineExpectations core code
+ */
+ abstract class ExpectationComment extends J::Top {
+ /** Gets the contents of the given comment, _without_ the preceding comment marker (`//`). */
+ abstract string getContents();
+ }
+
+ private class JavadocExpectationComment extends J::Javadoc, ExpectationComment {
+ JavadocExpectationComment() { isEolComment(this) }
+
+ override string getContents() { result = this.getChild(0).toString() }
+ }
+
+ private class KtExpectationComment extends J::KtComment, ExpectationComment {
+ KtExpectationComment() { this.isEolComment() }
+
+ override string getContents() { result = this.getText().suffix(2).trim() }
+ }
+
+ private class XmlExpectationComment extends ExpectationComment instanceof J::XmlComment {
+ override string getContents() { result = super.getText().trim() }
+
+ override Location getLocation() { result = J::XmlComment.super.getLocation() }
+
+ override string toString() { result = J::XmlComment.super.toString() }
+ }
+
+ class Location = J::Location;
+}
diff --git a/java/ql/test/kotlin/library-tests/.gitignore b/java/ql/test-kotlin1/library-tests/.gitignore
similarity index 100%
rename from java/ql/test/kotlin/library-tests/.gitignore
rename to java/ql/test-kotlin1/library-tests/.gitignore
diff --git a/java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.expected b/java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.expected
rename to java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.expected
diff --git a/java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.kt b/java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.kt
rename to java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.kt
diff --git a/java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.ql b/java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/GeneratedFiles/Generated.ql
rename to java/ql/test-kotlin1/library-tests/GeneratedFiles/Generated.ql
diff --git a/java/ql/test/kotlin/library-tests/GeneratedFiles/NonGenerated.kt b/java/ql/test-kotlin1/library-tests/GeneratedFiles/NonGenerated.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/GeneratedFiles/NonGenerated.kt
rename to java/ql/test-kotlin1/library-tests/GeneratedFiles/NonGenerated.kt
diff --git a/java/ql/test/kotlin/library-tests/android_function_return_types/returnTypes.expected b/java/ql/test-kotlin1/library-tests/android_function_return_types/returnTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/android_function_return_types/returnTypes.expected
rename to java/ql/test-kotlin1/library-tests/android_function_return_types/returnTypes.expected
diff --git a/java/ql/test/kotlin/library-tests/android_function_return_types/returnTypes.ql b/java/ql/test-kotlin1/library-tests/android_function_return_types/returnTypes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/android_function_return_types/returnTypes.ql
rename to java/ql/test-kotlin1/library-tests/android_function_return_types/returnTypes.ql
diff --git a/java/ql/test/kotlin/library-tests/android_function_return_types/test.kt b/java/ql/test-kotlin1/library-tests/android_function_return_types/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/android_function_return_types/test.kt
rename to java/ql/test-kotlin1/library-tests/android_function_return_types/test.kt
diff --git a/java/ql/test/kotlin/library-tests/annotation-accessor-result-type/PrintAst.expected b/java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation-accessor-result-type/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/annotation-accessor-result-type/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation-accessor-result-type/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.expected b/java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.expected
rename to java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.expected
diff --git a/java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.kt b/java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.kt
rename to java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.kt
diff --git a/java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.ql b/java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation-accessor-result-type/test.ql
rename to java/ql/test-kotlin1/library-tests/annotation-accessor-result-type/test.ql
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/Annot0j.java b/java/ql/test-kotlin1/library-tests/annotation_classes/Annot0j.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/Annot0j.java
rename to java/ql/test-kotlin1/library-tests/annotation_classes/Annot0j.java
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/Annot1j.java b/java/ql/test-kotlin1/library-tests/annotation_classes/Annot1j.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/Annot1j.java
rename to java/ql/test-kotlin1/library-tests/annotation_classes/Annot1j.java
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/PrintAst.expected b/java/ql/test-kotlin1/library-tests/annotation_classes/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/annotation_classes/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/annotation_classes/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/annotation_classes/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/classes.expected b/java/ql/test-kotlin1/library-tests/annotation_classes/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/classes.expected
rename to java/ql/test-kotlin1/library-tests/annotation_classes/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/classes.ql b/java/ql/test-kotlin1/library-tests/annotation_classes/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/classes.ql
rename to java/ql/test-kotlin1/library-tests/annotation_classes/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/def.kt b/java/ql/test-kotlin1/library-tests/annotation_classes/def.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/def.kt
rename to java/ql/test-kotlin1/library-tests/annotation_classes/def.kt
diff --git a/java/ql/test/kotlin/library-tests/annotation_classes/use.java b/java/ql/test-kotlin1/library-tests/annotation_classes/use.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotation_classes/use.java
rename to java/ql/test-kotlin1/library-tests/annotation_classes/use.java
diff --git a/java/ql/test/kotlin/library-tests/annotations/jvmName/Test.java b/java/ql/test-kotlin1/library-tests/annotations/jvmName/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotations/jvmName/Test.java
rename to java/ql/test-kotlin1/library-tests/annotations/jvmName/Test.java
diff --git a/java/ql/test/kotlin/library-tests/annotations/jvmName/test.expected b/java/ql/test-kotlin1/library-tests/annotations/jvmName/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotations/jvmName/test.expected
rename to java/ql/test-kotlin1/library-tests/annotations/jvmName/test.expected
diff --git a/java/ql/test/kotlin/library-tests/annotations/jvmName/test.kt b/java/ql/test-kotlin1/library-tests/annotations/jvmName/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotations/jvmName/test.kt
rename to java/ql/test-kotlin1/library-tests/annotations/jvmName/test.kt
diff --git a/java/ql/test/kotlin/library-tests/annotations/jvmName/test.ql b/java/ql/test-kotlin1/library-tests/annotations/jvmName/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/annotations/jvmName/test.ql
rename to java/ql/test-kotlin1/library-tests/annotations/jvmName/test.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays-with-variances/User.java b/java/ql/test-kotlin1/library-tests/arrays-with-variances/User.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays-with-variances/User.java
rename to java/ql/test-kotlin1/library-tests/arrays-with-variances/User.java
diff --git a/java/ql/test/kotlin/library-tests/arrays-with-variances/takesArrayList.kt b/java/ql/test-kotlin1/library-tests/arrays-with-variances/takesArrayList.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays-with-variances/takesArrayList.kt
rename to java/ql/test-kotlin1/library-tests/arrays-with-variances/takesArrayList.kt
diff --git a/java/ql/test/kotlin/library-tests/arrays-with-variances/test.expected b/java/ql/test-kotlin1/library-tests/arrays-with-variances/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays-with-variances/test.expected
rename to java/ql/test-kotlin1/library-tests/arrays-with-variances/test.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays-with-variances/test.ql b/java/ql/test-kotlin1/library-tests/arrays-with-variances/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays-with-variances/test.ql
rename to java/ql/test-kotlin1/library-tests/arrays-with-variances/test.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayAccesses.expected b/java/ql/test-kotlin1/library-tests/arrays/arrayAccesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayAccesses.expected
rename to java/ql/test-kotlin1/library-tests/arrays/arrayAccesses.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayAccesses.ql b/java/ql/test-kotlin1/library-tests/arrays/arrayAccesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayAccesses.ql
rename to java/ql/test-kotlin1/library-tests/arrays/arrayAccesses.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayCreations.expected b/java/ql/test-kotlin1/library-tests/arrays/arrayCreations.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayCreations.expected
rename to java/ql/test-kotlin1/library-tests/arrays/arrayCreations.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayCreations.kt b/java/ql/test-kotlin1/library-tests/arrays/arrayCreations.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayCreations.kt
rename to java/ql/test-kotlin1/library-tests/arrays/arrayCreations.kt
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayCreations.ql b/java/ql/test-kotlin1/library-tests/arrays/arrayCreations.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayCreations.ql
rename to java/ql/test-kotlin1/library-tests/arrays/arrayCreations.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayGetsSets.kt b/java/ql/test-kotlin1/library-tests/arrays/arrayGetsSets.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayGetsSets.kt
rename to java/ql/test-kotlin1/library-tests/arrays/arrayGetsSets.kt
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayIterators.expected b/java/ql/test-kotlin1/library-tests/arrays/arrayIterators.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayIterators.expected
rename to java/ql/test-kotlin1/library-tests/arrays/arrayIterators.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayIterators.kt b/java/ql/test-kotlin1/library-tests/arrays/arrayIterators.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayIterators.kt
rename to java/ql/test-kotlin1/library-tests/arrays/arrayIterators.kt
diff --git a/java/ql/test/kotlin/library-tests/arrays/arrayIterators.ql b/java/ql/test-kotlin1/library-tests/arrays/arrayIterators.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/arrayIterators.ql
rename to java/ql/test-kotlin1/library-tests/arrays/arrayIterators.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays/assignExprs.expected b/java/ql/test-kotlin1/library-tests/arrays/assignExprs.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/assignExprs.expected
rename to java/ql/test-kotlin1/library-tests/arrays/assignExprs.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays/assignExprs.ql b/java/ql/test-kotlin1/library-tests/arrays/assignExprs.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/assignExprs.ql
rename to java/ql/test-kotlin1/library-tests/arrays/assignExprs.ql
diff --git a/java/ql/test/kotlin/library-tests/arrays/primitiveArrays.kt b/java/ql/test-kotlin1/library-tests/arrays/primitiveArrays.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/primitiveArrays.kt
rename to java/ql/test-kotlin1/library-tests/arrays/primitiveArrays.kt
diff --git a/java/ql/test/kotlin/library-tests/arrays/test.expected b/java/ql/test-kotlin1/library-tests/arrays/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/test.expected
rename to java/ql/test-kotlin1/library-tests/arrays/test.expected
diff --git a/java/ql/test/kotlin/library-tests/arrays/test.ql b/java/ql/test-kotlin1/library-tests/arrays/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/arrays/test.ql
rename to java/ql/test-kotlin1/library-tests/arrays/test.ql
diff --git a/java/ql/test/kotlin/library-tests/call-int-to-char/test.expected b/java/ql/test-kotlin1/library-tests/call-int-to-char/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/call-int-to-char/test.expected
rename to java/ql/test-kotlin1/library-tests/call-int-to-char/test.expected
diff --git a/java/ql/test/kotlin/library-tests/call-int-to-char/test.kt b/java/ql/test-kotlin1/library-tests/call-int-to-char/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/call-int-to-char/test.kt
rename to java/ql/test-kotlin1/library-tests/call-int-to-char/test.kt
diff --git a/java/ql/test/kotlin/library-tests/call-int-to-char/test.ql b/java/ql/test-kotlin1/library-tests/call-int-to-char/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/call-int-to-char/test.ql
rename to java/ql/test-kotlin1/library-tests/call-int-to-char/test.ql
diff --git a/java/ql/test/kotlin/library-tests/clashing-extension-fields/test.expected b/java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/clashing-extension-fields/test.expected
rename to java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.expected
diff --git a/java/ql/test/kotlin/library-tests/clashing-extension-fields/test.kt b/java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/clashing-extension-fields/test.kt
rename to java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.kt
diff --git a/java/ql/test/kotlin/library-tests/clashing-extension-fields/test.ql b/java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/clashing-extension-fields/test.ql
rename to java/ql/test-kotlin1/library-tests/clashing-extension-fields/test.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/PrintAst.expected b/java/ql/test-kotlin1/library-tests/classes/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/classes/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/classes/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/classes/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/classes/anonymousClasses.expected b/java/ql/test-kotlin1/library-tests/classes/anonymousClasses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/anonymousClasses.expected
rename to java/ql/test-kotlin1/library-tests/classes/anonymousClasses.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/anonymousClasses.ql b/java/ql/test-kotlin1/library-tests/classes/anonymousClasses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/anonymousClasses.ql
rename to java/ql/test-kotlin1/library-tests/classes/anonymousClasses.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/classes.expected b/java/ql/test-kotlin1/library-tests/classes/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/classes.expected
rename to java/ql/test-kotlin1/library-tests/classes/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/classes.kt b/java/ql/test-kotlin1/library-tests/classes/classes.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/classes.kt
rename to java/ql/test-kotlin1/library-tests/classes/classes.kt
diff --git a/java/ql/test/kotlin/library-tests/classes/classes.ql b/java/ql/test-kotlin1/library-tests/classes/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/classes.ql
rename to java/ql/test-kotlin1/library-tests/classes/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/ctorCalls.expected b/java/ql/test-kotlin1/library-tests/classes/ctorCalls.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/ctorCalls.expected
rename to java/ql/test-kotlin1/library-tests/classes/ctorCalls.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/ctorCalls.ql b/java/ql/test-kotlin1/library-tests/classes/ctorCalls.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/ctorCalls.ql
rename to java/ql/test-kotlin1/library-tests/classes/ctorCalls.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/genericExprTypes.expected b/java/ql/test-kotlin1/library-tests/classes/genericExprTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/genericExprTypes.expected
rename to java/ql/test-kotlin1/library-tests/classes/genericExprTypes.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/genericExprTypes.ql b/java/ql/test-kotlin1/library-tests/classes/genericExprTypes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/genericExprTypes.ql
rename to java/ql/test-kotlin1/library-tests/classes/genericExprTypes.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/generic_anonymous.kt b/java/ql/test-kotlin1/library-tests/classes/generic_anonymous.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/generic_anonymous.kt
rename to java/ql/test-kotlin1/library-tests/classes/generic_anonymous.kt
diff --git a/java/ql/test/kotlin/library-tests/classes/interfaces.expected b/java/ql/test-kotlin1/library-tests/classes/interfaces.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/interfaces.expected
rename to java/ql/test-kotlin1/library-tests/classes/interfaces.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/interfaces.ql b/java/ql/test-kotlin1/library-tests/classes/interfaces.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/interfaces.ql
rename to java/ql/test-kotlin1/library-tests/classes/interfaces.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/localClass.expected b/java/ql/test-kotlin1/library-tests/classes/localClass.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/localClass.expected
rename to java/ql/test-kotlin1/library-tests/classes/localClass.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/localClass.ql b/java/ql/test-kotlin1/library-tests/classes/localClass.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/localClass.ql
rename to java/ql/test-kotlin1/library-tests/classes/localClass.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/localClassField.kt b/java/ql/test-kotlin1/library-tests/classes/localClassField.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/localClassField.kt
rename to java/ql/test-kotlin1/library-tests/classes/localClassField.kt
diff --git a/java/ql/test/kotlin/library-tests/classes/local_anonymous.expected b/java/ql/test-kotlin1/library-tests/classes/local_anonymous.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/local_anonymous.expected
rename to java/ql/test-kotlin1/library-tests/classes/local_anonymous.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/local_anonymous.kt b/java/ql/test-kotlin1/library-tests/classes/local_anonymous.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/local_anonymous.kt
rename to java/ql/test-kotlin1/library-tests/classes/local_anonymous.kt
diff --git a/java/ql/test/kotlin/library-tests/classes/local_anonymous.ql b/java/ql/test-kotlin1/library-tests/classes/local_anonymous.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/local_anonymous.ql
rename to java/ql/test-kotlin1/library-tests/classes/local_anonymous.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/paramTypes.expected b/java/ql/test-kotlin1/library-tests/classes/paramTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/paramTypes.expected
rename to java/ql/test-kotlin1/library-tests/classes/paramTypes.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/paramTypes.ql b/java/ql/test-kotlin1/library-tests/classes/paramTypes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/paramTypes.ql
rename to java/ql/test-kotlin1/library-tests/classes/paramTypes.ql
diff --git a/java/ql/test/kotlin/library-tests/classes/superChain.kt b/java/ql/test-kotlin1/library-tests/classes/superChain.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/superChain.kt
rename to java/ql/test-kotlin1/library-tests/classes/superChain.kt
diff --git a/java/ql/test/kotlin/library-tests/classes/superTypes.expected b/java/ql/test-kotlin1/library-tests/classes/superTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/superTypes.expected
rename to java/ql/test-kotlin1/library-tests/classes/superTypes.expected
diff --git a/java/ql/test/kotlin/library-tests/classes/superTypes.ql b/java/ql/test-kotlin1/library-tests/classes/superTypes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/classes/superTypes.ql
rename to java/ql/test-kotlin1/library-tests/classes/superTypes.ql
diff --git a/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected b/java/ql/test-kotlin1/library-tests/collection-literals/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/collection-literals/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/collection-literals/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/collection-literals/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/collection-literals/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/collection-literals/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/collection-literals/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/collection-literals/test.kt b/java/ql/test-kotlin1/library-tests/collection-literals/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/collection-literals/test.kt
rename to java/ql/test-kotlin1/library-tests/collection-literals/test.kt
diff --git a/java/ql/test/kotlin/library-tests/comments/comments.expected b/java/ql/test-kotlin1/library-tests/comments/comments.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/comments/comments.expected
rename to java/ql/test-kotlin1/library-tests/comments/comments.expected
diff --git a/java/ql/test/kotlin/library-tests/comments/comments.kt b/java/ql/test-kotlin1/library-tests/comments/comments.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/comments/comments.kt
rename to java/ql/test-kotlin1/library-tests/comments/comments.kt
diff --git a/java/ql/test/kotlin/library-tests/comments/comments.ql b/java/ql/test-kotlin1/library-tests/comments/comments.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/comments/comments.ql
rename to java/ql/test-kotlin1/library-tests/comments/comments.ql
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/accesses.expected b/java/ql/test-kotlin1/library-tests/companion_objects/accesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/accesses.expected
rename to java/ql/test-kotlin1/library-tests/companion_objects/accesses.expected
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/accesses.ql b/java/ql/test-kotlin1/library-tests/companion_objects/accesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/accesses.ql
rename to java/ql/test-kotlin1/library-tests/companion_objects/accesses.ql
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/companion_objects.expected b/java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/companion_objects.expected
rename to java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.expected
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/companion_objects.kt b/java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/companion_objects.kt
rename to java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.kt
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/companion_objects.ql b/java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/companion_objects.ql
rename to java/ql/test-kotlin1/library-tests/companion_objects/companion_objects.ql
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/method_accesses.expected b/java/ql/test-kotlin1/library-tests/companion_objects/method_accesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/method_accesses.expected
rename to java/ql/test-kotlin1/library-tests/companion_objects/method_accesses.expected
diff --git a/java/ql/test/kotlin/library-tests/companion_objects/method_accesses.ql b/java/ql/test-kotlin1/library-tests/companion_objects/method_accesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/companion_objects/method_accesses.ql
rename to java/ql/test-kotlin1/library-tests/companion_objects/method_accesses.ql
diff --git a/java/ql/test/kotlin/library-tests/compilation-units/cus.expected b/java/ql/test-kotlin1/library-tests/compilation-units/cus.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/compilation-units/cus.expected
rename to java/ql/test-kotlin1/library-tests/compilation-units/cus.expected
diff --git a/java/ql/test/kotlin/library-tests/compilation-units/cus.ql b/java/ql/test-kotlin1/library-tests/compilation-units/cus.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/compilation-units/cus.ql
rename to java/ql/test-kotlin1/library-tests/compilation-units/cus.ql
diff --git a/java/ql/test/kotlin/library-tests/compilation-units/test.kt b/java/ql/test-kotlin1/library-tests/compilation-units/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/compilation-units/test.kt
rename to java/ql/test-kotlin1/library-tests/compilation-units/test.kt
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/Test.kt b/java/ql/test-kotlin1/library-tests/controlflow/basic/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/Test.kt
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/Test.kt
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStrictDominance.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbStrictDominance.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbStrictDominance.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbStrictDominance.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbSuccessor.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbSuccessor.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/bbSuccessor.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/bbSuccessor.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/strictDominance.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/strictDominance.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/strictDominance.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/strictDominance.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/strictPostDominance.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictPostDominance.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/strictPostDominance.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/strictPostDominance.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/basic/strictPostDominance.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictPostDominance.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/basic/strictPostDominance.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/basic/strictPostDominance.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/Test.kt b/java/ql/test-kotlin1/library-tests/controlflow/dominance/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/Test.kt
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/Test.kt
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/Test2.kt b/java/ql/test-kotlin1/library-tests/controlflow/dominance/Test2.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/Test2.kt
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/Test2.kt
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceWrong.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceBad.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceWrong.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceBad.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceBad.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceBad.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceBad.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceBad.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatedByStart.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatedByStart.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceWrong.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominanceWrong.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorExists.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatedByStart.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorExists.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatedByStart.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatedByStart.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatedByStart.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatedByStart.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatedByStart.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominator.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominator.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominator.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominator.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorUnique.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorExists.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorUnique.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorExists.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorExists.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorExists.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorExists.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorExists.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/plot/nodeGraph.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/plot/nodeGraph.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorUnique.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/dominance/dominatorUnique.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/paths/A.kt b/java/ql/test-kotlin1/library-tests/controlflow/paths/A.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/paths/A.kt
rename to java/ql/test-kotlin1/library-tests/controlflow/paths/A.kt
diff --git a/java/ql/test/kotlin/library-tests/controlflow/paths/paths.expected b/java/ql/test-kotlin1/library-tests/controlflow/paths/paths.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/paths/paths.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/paths/paths.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/paths/paths.ql b/java/ql/test-kotlin1/library-tests/controlflow/paths/paths.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/paths/paths.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/paths/paths.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/plot/.gitignore b/java/ql/test-kotlin1/library-tests/controlflow/plot/.gitignore
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/plot/.gitignore
rename to java/ql/test-kotlin1/library-tests/controlflow/plot/.gitignore
diff --git a/java/ql/test/kotlin/library-tests/declaration-stack/test.expected b/java/ql/test-kotlin1/library-tests/controlflow/plot/nodeGraph.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/declaration-stack/test.expected
rename to java/ql/test-kotlin1/library-tests/controlflow/plot/nodeGraph.expected
diff --git a/java/ql/test/kotlin/library-tests/controlflow/plot/nodeGraph.ql b/java/ql/test-kotlin1/library-tests/controlflow/plot/nodeGraph.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/plot/nodeGraph.ql
rename to java/ql/test-kotlin1/library-tests/controlflow/plot/nodeGraph.ql
diff --git a/java/ql/test/kotlin/library-tests/controlflow/plot/plot.sh b/java/ql/test-kotlin1/library-tests/controlflow/plot/plot.sh
similarity index 100%
rename from java/ql/test/kotlin/library-tests/controlflow/plot/plot.sh
rename to java/ql/test-kotlin1/library-tests/controlflow/plot/plot.sh
diff --git a/java/ql/test/kotlin/library-tests/coroutines/coroutine_user.kt b/java/ql/test-kotlin1/library-tests/coroutines/coroutine_user.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/coroutines/coroutine_user.kt
rename to java/ql/test-kotlin1/library-tests/coroutines/coroutine_user.kt
diff --git a/java/ql/test/kotlin/library-tests/coroutines/test.expected b/java/ql/test-kotlin1/library-tests/coroutines/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/coroutines/test.expected
rename to java/ql/test-kotlin1/library-tests/coroutines/test.expected
diff --git a/java/ql/test/kotlin/library-tests/coroutines/test.ql b/java/ql/test-kotlin1/library-tests/coroutines/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/coroutines/test.ql
rename to java/ql/test-kotlin1/library-tests/coroutines/test.ql
diff --git a/java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected b/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/data-classes/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/data-classes/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/data-classes/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/data-classes/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/data-classes/callees.expected b/java/ql/test-kotlin1/library-tests/data-classes/callees.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/callees.expected
rename to java/ql/test-kotlin1/library-tests/data-classes/callees.expected
diff --git a/java/ql/test/kotlin/library-tests/data-classes/callees.ql b/java/ql/test-kotlin1/library-tests/data-classes/callees.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/callees.ql
rename to java/ql/test-kotlin1/library-tests/data-classes/callees.ql
diff --git a/java/ql/test/kotlin/library-tests/data-classes/data_classes.expected b/java/ql/test-kotlin1/library-tests/data-classes/data_classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/data_classes.expected
rename to java/ql/test-kotlin1/library-tests/data-classes/data_classes.expected
diff --git a/java/ql/test/kotlin/library-tests/data-classes/data_classes.ql b/java/ql/test-kotlin1/library-tests/data-classes/data_classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/data_classes.ql
rename to java/ql/test-kotlin1/library-tests/data-classes/data_classes.ql
diff --git a/java/ql/test/kotlin/library-tests/data-classes/dc.kt b/java/ql/test-kotlin1/library-tests/data-classes/dc.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/data-classes/dc.kt
rename to java/ql/test-kotlin1/library-tests/data-classes/dc.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.kt b/java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/extensionMethod/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/extensionMethod/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/foreach/C1.java b/java/ql/test-kotlin1/library-tests/dataflow/foreach/C1.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/foreach/C1.java
rename to java/ql/test-kotlin1/library-tests/dataflow/foreach/C1.java
diff --git a/java/ql/test/kotlin/library-tests/dataflow/foreach/C2.kt b/java/ql/test-kotlin1/library-tests/dataflow/foreach/C2.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/foreach/C2.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/foreach/C2.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/foreach/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/foreach/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/foreach/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/foreach/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/foreach/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/foreach/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/foreach/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/coroutine_async_await.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/coroutine_async_await.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/coroutine_async_await.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/coroutine_async_await.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/functionReference.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/functionReference.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/functionReference.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/functionReference.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/kotlinx_coroutines_stubs.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/kotlinx_coroutines_stubs.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/kotlinx_coroutines_stubs.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/kotlinx_coroutines_stubs.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/lambda.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/lambda.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/lambda.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/lambda.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/localFunction.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/localFunction.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/localFunction.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/localFunction.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/samConversion.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/samConversion.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/samConversion.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/samConversion.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/func/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/func/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/func/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/func/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/func/util.kt b/java/ql/test-kotlin1/library-tests/dataflow/func/util.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/func/util.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/func/util.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/notnullexpr/NotNullExpr.kt b/java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/NotNullExpr.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/notnullexpr/NotNullExpr.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/NotNullExpr.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.ext.yml b/java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.ext.yml
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.ext.yml
rename to java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.ext.yml
diff --git a/java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/notnullexpr/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/notnullexpr/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/stmtexpr/StmtExpr.kt b/java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/StmtExpr.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/stmtexpr/StmtExpr.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/StmtExpr.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/stmtexpr/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/stmtexpr/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/stmtexpr/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/stmtexpr/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/stmtexpr/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/apply.expected b/java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/apply.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/apply.kt b/java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/apply.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/apply.ql b/java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/apply.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/apply.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/list.kt b/java/ql/test-kotlin1/library-tests/dataflow/summaries/list.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/list.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/list.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/test.kt b/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/test.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/test.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/use.kt b/java/ql/test-kotlin1/library-tests/dataflow/summaries/use.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/use.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/use.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/summaries/with.kt b/java/ql/test-kotlin1/library-tests/dataflow/summaries/with.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/summaries/with.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/summaries/with.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/taint/StringTemplate.kt b/java/ql/test-kotlin1/library-tests/dataflow/taint/StringTemplate.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/taint/StringTemplate.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/taint/StringTemplate.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/taint/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/taint/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/taint/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/taint/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/taint/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/taint/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/taint/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/taint/test.ql
diff --git a/java/ql/test/kotlin/library-tests/dataflow/whenexpr/WhenExpr.kt b/java/ql/test-kotlin1/library-tests/dataflow/whenexpr/WhenExpr.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/whenexpr/WhenExpr.kt
rename to java/ql/test-kotlin1/library-tests/dataflow/whenexpr/WhenExpr.kt
diff --git a/java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.expected b/java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.expected
rename to java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.expected
diff --git a/java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.ext.yml b/java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.ext.yml
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.ext.yml
rename to java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.ext.yml
diff --git a/java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/dataflow/whenexpr/test.ql
rename to java/ql/test-kotlin1/library-tests/dataflow/whenexpr/test.ql
diff --git a/java/ql/test/kotlin/library-tests/declaration-stack/Test.kt b/java/ql/test-kotlin1/library-tests/declaration-stack/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/declaration-stack/Test.kt
rename to java/ql/test-kotlin1/library-tests/declaration-stack/Test.kt
diff --git a/java/ql/test/kotlin/library-tests/for-array-iterators/test.expected b/java/ql/test-kotlin1/library-tests/declaration-stack/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/for-array-iterators/test.expected
rename to java/ql/test-kotlin1/library-tests/declaration-stack/test.expected
diff --git a/java/ql/test/kotlin/library-tests/declaration-stack/test.ql b/java/ql/test-kotlin1/library-tests/declaration-stack/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/declaration-stack/test.ql
rename to java/ql/test-kotlin1/library-tests/declaration-stack/test.ql
diff --git a/java/ql/test/kotlin/library-tests/empty/Empty.kt b/java/ql/test-kotlin1/library-tests/empty/Empty.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/empty/Empty.kt
rename to java/ql/test-kotlin1/library-tests/empty/Empty.kt
diff --git a/java/ql/test/kotlin/library-tests/empty/elements.expected b/java/ql/test-kotlin1/library-tests/empty/elements.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/empty/elements.expected
rename to java/ql/test-kotlin1/library-tests/empty/elements.expected
diff --git a/java/ql/test/kotlin/library-tests/empty/elements.ql b/java/ql/test-kotlin1/library-tests/empty/elements.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/empty/elements.ql
rename to java/ql/test-kotlin1/library-tests/empty/elements.ql
diff --git a/java/ql/test/kotlin/library-tests/enum/enumUser.kt b/java/ql/test-kotlin1/library-tests/enum/enumUser.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/enum/enumUser.kt
rename to java/ql/test-kotlin1/library-tests/enum/enumUser.kt
diff --git a/java/ql/test/kotlin/library-tests/enum/test.expected b/java/ql/test-kotlin1/library-tests/enum/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/enum/test.expected
rename to java/ql/test-kotlin1/library-tests/enum/test.expected
diff --git a/java/ql/test/kotlin/library-tests/enum/test.ql b/java/ql/test-kotlin1/library-tests/enum/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/enum/test.ql
rename to java/ql/test-kotlin1/library-tests/enum/test.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/PrintAst.expected b/java/ql/test-kotlin1/library-tests/exprs/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/exprs/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/exprs/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/exprs/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/exprs/binop.expected b/java/ql/test-kotlin1/library-tests/exprs/binop.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/binop.expected
rename to java/ql/test-kotlin1/library-tests/exprs/binop.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/binop.ql b/java/ql/test-kotlin1/library-tests/exprs/binop.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/binop.ql
rename to java/ql/test-kotlin1/library-tests/exprs/binop.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/delegatedProperties.expected b/java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/delegatedProperties.expected
rename to java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/delegatedProperties.kt b/java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/delegatedProperties.kt
rename to java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/delegatedProperties.ql b/java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/delegatedProperties.ql
rename to java/ql/test-kotlin1/library-tests/exprs/delegatedProperties.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/exprs.expected b/java/ql/test-kotlin1/library-tests/exprs/exprs.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/exprs.expected
rename to java/ql/test-kotlin1/library-tests/exprs/exprs.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/exprs.kt b/java/ql/test-kotlin1/library-tests/exprs/exprs.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/exprs.kt
rename to java/ql/test-kotlin1/library-tests/exprs/exprs.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/exprs.ql b/java/ql/test-kotlin1/library-tests/exprs/exprs.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/exprs.ql
rename to java/ql/test-kotlin1/library-tests/exprs/exprs.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/funcExprs.expected b/java/ql/test-kotlin1/library-tests/exprs/funcExprs.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/funcExprs.expected
rename to java/ql/test-kotlin1/library-tests/exprs/funcExprs.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/funcExprs.kt b/java/ql/test-kotlin1/library-tests/exprs/funcExprs.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/funcExprs.kt
rename to java/ql/test-kotlin1/library-tests/exprs/funcExprs.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/funcExprs.ql b/java/ql/test-kotlin1/library-tests/exprs/funcExprs.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/funcExprs.ql
rename to java/ql/test-kotlin1/library-tests/exprs/funcExprs.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/kFunctionInvoke.kt b/java/ql/test-kotlin1/library-tests/exprs/kFunctionInvoke.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/kFunctionInvoke.kt
rename to java/ql/test-kotlin1/library-tests/exprs/kFunctionInvoke.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/localFunctionCalls.kt b/java/ql/test-kotlin1/library-tests/exprs/localFunctionCalls.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/localFunctionCalls.kt
rename to java/ql/test-kotlin1/library-tests/exprs/localFunctionCalls.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/samConversion.kt b/java/ql/test-kotlin1/library-tests/exprs/samConversion.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/samConversion.kt
rename to java/ql/test-kotlin1/library-tests/exprs/samConversion.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs/unaryOp.expected b/java/ql/test-kotlin1/library-tests/exprs/unaryOp.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/unaryOp.expected
rename to java/ql/test-kotlin1/library-tests/exprs/unaryOp.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs/unaryOp.ql b/java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/unaryOp.ql
rename to java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql
diff --git a/java/ql/test/kotlin/library-tests/exprs/whenExpr.kt b/java/ql/test-kotlin1/library-tests/exprs/whenExpr.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs/whenExpr.kt
rename to java/ql/test-kotlin1/library-tests/exprs/whenExpr.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs_typeaccess/A.kt b/java/ql/test-kotlin1/library-tests/exprs_typeaccess/A.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs_typeaccess/A.kt
rename to java/ql/test-kotlin1/library-tests/exprs_typeaccess/A.kt
diff --git a/java/ql/test/kotlin/library-tests/exprs_typeaccess/B.java b/java/ql/test-kotlin1/library-tests/exprs_typeaccess/B.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs_typeaccess/B.java
rename to java/ql/test-kotlin1/library-tests/exprs_typeaccess/B.java
diff --git a/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected b/java/ql/test-kotlin1/library-tests/exprs_typeaccess/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/exprs_typeaccess/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/exprs_typeaccess/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/exprs_typeaccess/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/exprs_typeaccess/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/extensions/A.java b/java/ql/test-kotlin1/library-tests/extensions/A.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/A.java
rename to java/ql/test-kotlin1/library-tests/extensions/A.java
diff --git a/java/ql/test/kotlin/library-tests/extensions/extensions.kt b/java/ql/test-kotlin1/library-tests/extensions/extensions.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/extensions.kt
rename to java/ql/test-kotlin1/library-tests/extensions/extensions.kt
diff --git a/java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected b/java/ql/test-kotlin1/library-tests/extensions/methodaccesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/methodaccesses.expected
rename to java/ql/test-kotlin1/library-tests/extensions/methodaccesses.expected
diff --git a/java/ql/test/kotlin/library-tests/extensions/methodaccesses.ql b/java/ql/test-kotlin1/library-tests/extensions/methodaccesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/methodaccesses.ql
rename to java/ql/test-kotlin1/library-tests/extensions/methodaccesses.ql
diff --git a/java/ql/test/kotlin/library-tests/extensions/methods.expected b/java/ql/test-kotlin1/library-tests/extensions/methods.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/methods.expected
rename to java/ql/test-kotlin1/library-tests/extensions/methods.expected
diff --git a/java/ql/test/kotlin/library-tests/extensions/methods.ql b/java/ql/test-kotlin1/library-tests/extensions/methods.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/methods.ql
rename to java/ql/test-kotlin1/library-tests/extensions/methods.ql
diff --git a/java/ql/test/kotlin/library-tests/extensions/parameters.expected b/java/ql/test-kotlin1/library-tests/extensions/parameters.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/parameters.expected
rename to java/ql/test-kotlin1/library-tests/extensions/parameters.expected
diff --git a/java/ql/test/kotlin/library-tests/extensions/parameters.ql b/java/ql/test-kotlin1/library-tests/extensions/parameters.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions/parameters.ql
rename to java/ql/test-kotlin1/library-tests/extensions/parameters.ql
diff --git a/java/ql/test/kotlin/library-tests/extensions_recursion/element.expected b/java/ql/test-kotlin1/library-tests/extensions_recursion/element.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions_recursion/element.expected
rename to java/ql/test-kotlin1/library-tests/extensions_recursion/element.expected
diff --git a/java/ql/test/kotlin/library-tests/extensions_recursion/element.ql b/java/ql/test-kotlin1/library-tests/extensions_recursion/element.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions_recursion/element.ql
rename to java/ql/test-kotlin1/library-tests/extensions_recursion/element.ql
diff --git a/java/ql/test/kotlin/library-tests/extensions_recursion/test.kt b/java/ql/test-kotlin1/library-tests/extensions_recursion/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/extensions_recursion/test.kt
rename to java/ql/test-kotlin1/library-tests/extensions_recursion/test.kt
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_java/A.java b/java/ql/test-kotlin1/library-tests/fake_overrides/all_java/A.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_java/A.java
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_java/A.java
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_java/call.expected b/java/ql/test-kotlin1/library-tests/fake_overrides/all_java/call.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_java/call.expected
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_java/call.expected
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_java/call.ql b/java/ql/test-kotlin1/library-tests/fake_overrides/all_java/call.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_java/call.ql
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_java/call.ql
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/A.kt b/java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/A.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/A.kt
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/A.kt
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/call.expected b/java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/call.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/call.expected
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/call.expected
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/call.ql b/java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/call.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/all_kotlin/call.ql
rename to java/ql/test-kotlin1/library-tests/fake_overrides/all_kotlin/call.ql
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/A.kt b/java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/A.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/A.kt
rename to java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/A.kt
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/OB.java b/java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/OB.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/OB.java
rename to java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/OB.java
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/call.expected b/java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/call.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/call.expected
rename to java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/call.expected
diff --git a/java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/call.ql b/java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/call.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/fake_overrides/kotlin_calling_java/call.ql
rename to java/ql/test-kotlin1/library-tests/fake_overrides/kotlin_calling_java/call.ql
diff --git a/java/ql/test/kotlin/library-tests/field-initializer-flow/test.expected b/java/ql/test-kotlin1/library-tests/field-initializer-flow/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/field-initializer-flow/test.expected
rename to java/ql/test-kotlin1/library-tests/field-initializer-flow/test.expected
diff --git a/java/ql/test/kotlin/library-tests/field-initializer-flow/test.kt b/java/ql/test-kotlin1/library-tests/field-initializer-flow/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/field-initializer-flow/test.kt
rename to java/ql/test-kotlin1/library-tests/field-initializer-flow/test.kt
diff --git a/java/ql/test/kotlin/library-tests/field-initializer-flow/test.ql b/java/ql/test-kotlin1/library-tests/field-initializer-flow/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/field-initializer-flow/test.ql
rename to java/ql/test-kotlin1/library-tests/field-initializer-flow/test.ql
diff --git a/java/ql/test/kotlin/library-tests/files/otherfile.kt b/java/ql/test-kotlin1/library-tests/files/otherfile.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/files/otherfile.kt
rename to java/ql/test-kotlin1/library-tests/files/otherfile.kt
diff --git a/java/ql/test/kotlin/library-tests/files/test.expected b/java/ql/test-kotlin1/library-tests/files/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/files/test.expected
rename to java/ql/test-kotlin1/library-tests/files/test.expected
diff --git a/java/ql/test/kotlin/library-tests/files/test.kt b/java/ql/test-kotlin1/library-tests/files/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/files/test.kt
rename to java/ql/test-kotlin1/library-tests/files/test.kt
diff --git a/java/ql/test/kotlin/library-tests/files/test.ql b/java/ql/test-kotlin1/library-tests/files/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/files/test.ql
rename to java/ql/test-kotlin1/library-tests/files/test.ql
diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/test.expected b/java/ql/test-kotlin1/library-tests/for-array-iterators/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/operator-overloads/test.expected
rename to java/ql/test-kotlin1/library-tests/for-array-iterators/test.expected
diff --git a/java/ql/test/kotlin/library-tests/for-array-iterators/test.kt b/java/ql/test-kotlin1/library-tests/for-array-iterators/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/for-array-iterators/test.kt
rename to java/ql/test-kotlin1/library-tests/for-array-iterators/test.kt
diff --git a/java/ql/test/kotlin/library-tests/for-array-iterators/test.ql b/java/ql/test-kotlin1/library-tests/for-array-iterators/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/for-array-iterators/test.ql
rename to java/ql/test-kotlin1/library-tests/for-array-iterators/test.ql
diff --git a/java/ql/test/kotlin/library-tests/function-n/test.expected b/java/ql/test-kotlin1/library-tests/function-n/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/function-n/test.expected
rename to java/ql/test-kotlin1/library-tests/function-n/test.expected
diff --git a/java/ql/test/kotlin/library-tests/function-n/test.kt b/java/ql/test-kotlin1/library-tests/function-n/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/function-n/test.kt
rename to java/ql/test-kotlin1/library-tests/function-n/test.kt
diff --git a/java/ql/test/kotlin/library-tests/function-n/test.ql b/java/ql/test-kotlin1/library-tests/function-n/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/function-n/test.ql
rename to java/ql/test-kotlin1/library-tests/function-n/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/KotlinUser.kt b/java/ql/test-kotlin1/library-tests/generic-inner-classes/KotlinUser.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-inner-classes/KotlinUser.kt
rename to java/ql/test-kotlin1/library-tests/generic-inner-classes/KotlinUser.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/OuterGeneric.kt b/java/ql/test-kotlin1/library-tests/generic-inner-classes/OuterGeneric.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-inner-classes/OuterGeneric.kt
rename to java/ql/test-kotlin1/library-tests/generic-inner-classes/OuterGeneric.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/OuterNotGeneric.kt b/java/ql/test-kotlin1/library-tests/generic-inner-classes/OuterNotGeneric.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-inner-classes/OuterNotGeneric.kt
rename to java/ql/test-kotlin1/library-tests/generic-inner-classes/OuterNotGeneric.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected b/java/ql/test-kotlin1/library-tests/generic-inner-classes/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-inner-classes/test.expected
rename to java/ql/test-kotlin1/library-tests/generic-inner-classes/test.expected
diff --git a/java/ql/test/kotlin/library-tests/generic-inner-classes/test.ql b/java/ql/test-kotlin1/library-tests/generic-inner-classes/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-inner-classes/test.ql
rename to java/ql/test-kotlin1/library-tests/generic-inner-classes/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generic-instance-methods/Test.java b/java/ql/test-kotlin1/library-tests/generic-instance-methods/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-instance-methods/Test.java
rename to java/ql/test-kotlin1/library-tests/generic-instance-methods/Test.java
diff --git a/java/ql/test/kotlin/library-tests/generic-instance-methods/test.expected b/java/ql/test-kotlin1/library-tests/generic-instance-methods/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-instance-methods/test.expected
rename to java/ql/test-kotlin1/library-tests/generic-instance-methods/test.expected
diff --git a/java/ql/test/kotlin/library-tests/generic-instance-methods/test.kt b/java/ql/test-kotlin1/library-tests/generic-instance-methods/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-instance-methods/test.kt
rename to java/ql/test-kotlin1/library-tests/generic-instance-methods/test.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-instance-methods/test.ql b/java/ql/test-kotlin1/library-tests/generic-instance-methods/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-instance-methods/test.ql
rename to java/ql/test-kotlin1/library-tests/generic-instance-methods/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generic-methods/ClassWithParams.kt b/java/ql/test-kotlin1/library-tests/generic-methods/ClassWithParams.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-methods/ClassWithParams.kt
rename to java/ql/test-kotlin1/library-tests/generic-methods/ClassWithParams.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-methods/ClassWithoutParams.kt b/java/ql/test-kotlin1/library-tests/generic-methods/ClassWithoutParams.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-methods/ClassWithoutParams.kt
rename to java/ql/test-kotlin1/library-tests/generic-methods/ClassWithoutParams.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-methods/kttest.kt b/java/ql/test-kotlin1/library-tests/generic-methods/kttest.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-methods/kttest.kt
rename to java/ql/test-kotlin1/library-tests/generic-methods/kttest.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-methods/test.expected b/java/ql/test-kotlin1/library-tests/generic-methods/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-methods/test.expected
rename to java/ql/test-kotlin1/library-tests/generic-methods/test.expected
diff --git a/java/ql/test/kotlin/library-tests/generic-methods/test.ql b/java/ql/test-kotlin1/library-tests/generic-methods/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-methods/test.ql
rename to java/ql/test-kotlin1/library-tests/generic-methods/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generic-selective-extraction/Test.java b/java/ql/test-kotlin1/library-tests/generic-selective-extraction/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-selective-extraction/Test.java
rename to java/ql/test-kotlin1/library-tests/generic-selective-extraction/Test.java
diff --git a/java/ql/test/kotlin/library-tests/generic-selective-extraction/Test.kt b/java/ql/test-kotlin1/library-tests/generic-selective-extraction/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-selective-extraction/Test.kt
rename to java/ql/test-kotlin1/library-tests/generic-selective-extraction/Test.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-selective-extraction/test.expected b/java/ql/test-kotlin1/library-tests/generic-selective-extraction/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-selective-extraction/test.expected
rename to java/ql/test-kotlin1/library-tests/generic-selective-extraction/test.expected
diff --git a/java/ql/test/kotlin/library-tests/generic-selective-extraction/test.ql b/java/ql/test-kotlin1/library-tests/generic-selective-extraction/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-selective-extraction/test.ql
rename to java/ql/test-kotlin1/library-tests/generic-selective-extraction/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generic-type-bounds/test.expected b/java/ql/test-kotlin1/library-tests/generic-type-bounds/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-type-bounds/test.expected
rename to java/ql/test-kotlin1/library-tests/generic-type-bounds/test.expected
diff --git a/java/ql/test/kotlin/library-tests/generic-type-bounds/test.kt b/java/ql/test-kotlin1/library-tests/generic-type-bounds/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-type-bounds/test.kt
rename to java/ql/test-kotlin1/library-tests/generic-type-bounds/test.kt
diff --git a/java/ql/test/kotlin/library-tests/generic-type-bounds/test.ql b/java/ql/test-kotlin1/library-tests/generic-type-bounds/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generic-type-bounds/test.ql
rename to java/ql/test-kotlin1/library-tests/generic-type-bounds/test.ql
diff --git a/java/ql/test/kotlin/library-tests/generics-location/A.java b/java/ql/test-kotlin1/library-tests/generics-location/A.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics-location/A.java
rename to java/ql/test-kotlin1/library-tests/generics-location/A.java
diff --git a/java/ql/test/kotlin/library-tests/generics-location/generics.kt b/java/ql/test-kotlin1/library-tests/generics-location/generics.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics-location/generics.kt
rename to java/ql/test-kotlin1/library-tests/generics-location/generics.kt
diff --git a/java/ql/test/kotlin/library-tests/generics-location/locations.expected b/java/ql/test-kotlin1/library-tests/generics-location/locations.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics-location/locations.expected
rename to java/ql/test-kotlin1/library-tests/generics-location/locations.expected
diff --git a/java/ql/test/kotlin/library-tests/generics-location/locations.ql b/java/ql/test-kotlin1/library-tests/generics-location/locations.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics-location/locations.ql
rename to java/ql/test-kotlin1/library-tests/generics-location/locations.ql
diff --git a/java/ql/test/kotlin/library-tests/generics/PrintAst.expected b/java/ql/test-kotlin1/library-tests/generics/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/generics/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/generics/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/generics/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/generics/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/generics/generics.expected b/java/ql/test-kotlin1/library-tests/generics/generics.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics/generics.expected
rename to java/ql/test-kotlin1/library-tests/generics/generics.expected
diff --git a/java/ql/test/kotlin/library-tests/generics/generics.kt b/java/ql/test-kotlin1/library-tests/generics/generics.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics/generics.kt
rename to java/ql/test-kotlin1/library-tests/generics/generics.kt
diff --git a/java/ql/test/kotlin/library-tests/generics/generics.ql b/java/ql/test-kotlin1/library-tests/generics/generics.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/generics/generics.ql
rename to java/ql/test-kotlin1/library-tests/generics/generics.ql
diff --git a/java/ql/test/kotlin/library-tests/inherited-callee/Test.java b/java/ql/test-kotlin1/library-tests/inherited-callee/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-callee/Test.java
rename to java/ql/test-kotlin1/library-tests/inherited-callee/Test.java
diff --git a/java/ql/test/kotlin/library-tests/inherited-callee/Test.kt b/java/ql/test-kotlin1/library-tests/inherited-callee/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-callee/Test.kt
rename to java/ql/test-kotlin1/library-tests/inherited-callee/Test.kt
diff --git a/java/ql/test/kotlin/library-tests/inherited-callee/test.expected b/java/ql/test-kotlin1/library-tests/inherited-callee/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-callee/test.expected
rename to java/ql/test-kotlin1/library-tests/inherited-callee/test.expected
diff --git a/java/ql/test/kotlin/library-tests/inherited-callee/test.ql b/java/ql/test-kotlin1/library-tests/inherited-callee/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-callee/test.ql
rename to java/ql/test-kotlin1/library-tests/inherited-callee/test.ql
diff --git a/java/ql/test/kotlin/library-tests/inherited-collection-implementation/Test.java b/java/ql/test-kotlin1/library-tests/inherited-collection-implementation/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-collection-implementation/Test.java
rename to java/ql/test-kotlin1/library-tests/inherited-collection-implementation/Test.java
diff --git a/java/ql/test/kotlin/library-tests/inherited-collection-implementation/test.expected b/java/ql/test-kotlin1/library-tests/inherited-collection-implementation/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-collection-implementation/test.expected
rename to java/ql/test-kotlin1/library-tests/inherited-collection-implementation/test.expected
diff --git a/java/ql/test/kotlin/library-tests/inherited-collection-implementation/test.ql b/java/ql/test-kotlin1/library-tests/inherited-collection-implementation/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-collection-implementation/test.ql
rename to java/ql/test-kotlin1/library-tests/inherited-collection-implementation/test.ql
diff --git a/java/ql/test/kotlin/library-tests/inherited-collection-implementation/user.kt b/java/ql/test-kotlin1/library-tests/inherited-collection-implementation/user.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-collection-implementation/user.kt
rename to java/ql/test-kotlin1/library-tests/inherited-collection-implementation/user.kt
diff --git a/java/ql/test/kotlin/library-tests/inherited-default-value/test.expected b/java/ql/test-kotlin1/library-tests/inherited-default-value/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-default-value/test.expected
rename to java/ql/test-kotlin1/library-tests/inherited-default-value/test.expected
diff --git a/java/ql/test/kotlin/library-tests/inherited-default-value/test.kt b/java/ql/test-kotlin1/library-tests/inherited-default-value/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-default-value/test.kt
rename to java/ql/test-kotlin1/library-tests/inherited-default-value/test.kt
diff --git a/java/ql/test/kotlin/library-tests/inherited-default-value/test.ql b/java/ql/test-kotlin1/library-tests/inherited-default-value/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-default-value/test.ql
rename to java/ql/test-kotlin1/library-tests/inherited-default-value/test.ql
diff --git a/java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.expected b/java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.expected
rename to java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.expected
diff --git a/java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.kt b/java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.kt
rename to java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.kt
diff --git a/java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.ql b/java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inherited-single-abstract-method/test.ql
rename to java/ql/test-kotlin1/library-tests/inherited-single-abstract-method/test.ql
diff --git a/java/ql/test/kotlin/library-tests/inheritence-substitution/test.expected b/java/ql/test-kotlin1/library-tests/inheritence-substitution/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inheritence-substitution/test.expected
rename to java/ql/test-kotlin1/library-tests/inheritence-substitution/test.expected
diff --git a/java/ql/test/kotlin/library-tests/inheritence-substitution/test.kt b/java/ql/test-kotlin1/library-tests/inheritence-substitution/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inheritence-substitution/test.kt
rename to java/ql/test-kotlin1/library-tests/inheritence-substitution/test.kt
diff --git a/java/ql/test/kotlin/library-tests/inheritence-substitution/test.ql b/java/ql/test-kotlin1/library-tests/inheritence-substitution/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/inheritence-substitution/test.ql
rename to java/ql/test-kotlin1/library-tests/inheritence-substitution/test.ql
diff --git a/java/ql/test/kotlin/library-tests/instances/TestClassA.kt b/java/ql/test-kotlin1/library-tests/instances/TestClassA.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/instances/TestClassA.kt
rename to java/ql/test-kotlin1/library-tests/instances/TestClassA.kt
diff --git a/java/ql/test/kotlin/library-tests/instances/TestClassAUser.kt b/java/ql/test-kotlin1/library-tests/instances/TestClassAUser.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/instances/TestClassAUser.kt
rename to java/ql/test-kotlin1/library-tests/instances/TestClassAUser.kt
diff --git a/java/ql/test/kotlin/library-tests/instances/classes.expected b/java/ql/test-kotlin1/library-tests/instances/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/instances/classes.expected
rename to java/ql/test-kotlin1/library-tests/instances/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/instances/classes.ql b/java/ql/test-kotlin1/library-tests/instances/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/instances/classes.ql
rename to java/ql/test-kotlin1/library-tests/instances/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/interface-delegate/intfDelegate.kt b/java/ql/test-kotlin1/library-tests/interface-delegate/intfDelegate.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/interface-delegate/intfDelegate.kt
rename to java/ql/test-kotlin1/library-tests/interface-delegate/intfDelegate.kt
diff --git a/java/ql/test/kotlin/library-tests/interface-delegate/test.expected b/java/ql/test-kotlin1/library-tests/interface-delegate/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/interface-delegate/test.expected
rename to java/ql/test-kotlin1/library-tests/interface-delegate/test.expected
diff --git a/java/ql/test/kotlin/library-tests/interface-delegate/test.ql b/java/ql/test-kotlin1/library-tests/interface-delegate/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/interface-delegate/test.ql
rename to java/ql/test-kotlin1/library-tests/interface-delegate/test.ql
diff --git a/java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/User.java b/java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/User.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/User.java
rename to java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/User.java
diff --git a/java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.expected b/java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.expected
rename to java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.expected
diff --git a/java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.kt b/java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.kt
rename to java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.kt
diff --git a/java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.ql b/java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-constructor-called-from-java/test.ql
rename to java/ql/test-kotlin1/library-tests/internal-constructor-called-from-java/test.ql
diff --git a/java/ql/test/kotlin/library-tests/internal-public-alias/User.java b/java/ql/test-kotlin1/library-tests/internal-public-alias/User.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-public-alias/User.java
rename to java/ql/test-kotlin1/library-tests/internal-public-alias/User.java
diff --git a/java/ql/test/kotlin/library-tests/internal-public-alias/test.expected b/java/ql/test-kotlin1/library-tests/internal-public-alias/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-public-alias/test.expected
rename to java/ql/test-kotlin1/library-tests/internal-public-alias/test.expected
diff --git a/java/ql/test/kotlin/library-tests/internal-public-alias/test.kt b/java/ql/test-kotlin1/library-tests/internal-public-alias/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-public-alias/test.kt
rename to java/ql/test-kotlin1/library-tests/internal-public-alias/test.kt
diff --git a/java/ql/test/kotlin/library-tests/internal-public-alias/test.ql b/java/ql/test-kotlin1/library-tests/internal-public-alias/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/internal-public-alias/test.ql
rename to java/ql/test-kotlin1/library-tests/internal-public-alias/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/Test.java b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/Test.java
rename to java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/Test.java
diff --git a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.expected b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.expected
rename to java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.kt b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.kt
rename to java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.kt
diff --git a/java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-kotlin-collection-type-generic-methods/test.ql
rename to java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java-lang-number-conversions/Test.java b/java/ql/test-kotlin1/library-tests/java-lang-number-conversions/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-lang-number-conversions/Test.java
rename to java/ql/test-kotlin1/library-tests/java-lang-number-conversions/Test.java
diff --git a/java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.expected b/java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.expected
rename to java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.kt b/java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.kt
rename to java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.kt
diff --git a/java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.ql b/java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-lang-number-conversions/test.ql
rename to java/ql/test-kotlin1/library-tests/java-lang-number-conversions/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java-list-kotlin-user/MyList.java b/java/ql/test-kotlin1/library-tests/java-list-kotlin-user/MyList.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-list-kotlin-user/MyList.java
rename to java/ql/test-kotlin1/library-tests/java-list-kotlin-user/MyList.java
diff --git a/java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.expected b/java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.expected
rename to java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.kt b/java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.kt
rename to java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.kt
diff --git a/java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.ql b/java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-list-kotlin-user/test.ql
rename to java/ql/test-kotlin1/library-tests/java-list-kotlin-user/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected b/java/ql/test-kotlin1/library-tests/java-map-methods/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/java-map-methods/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/java-map-methods/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-map-methods/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/java-map-methods/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/test.expected b/java/ql/test-kotlin1/library-tests/java-map-methods/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-map-methods/test.expected
rename to java/ql/test-kotlin1/library-tests/java-map-methods/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/test.kt b/java/ql/test-kotlin1/library-tests/java-map-methods/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-map-methods/test.kt
rename to java/ql/test-kotlin1/library-tests/java-map-methods/test.kt
diff --git a/java/ql/test/kotlin/library-tests/java-map-methods/test.ql b/java/ql/test-kotlin1/library-tests/java-map-methods/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java-map-methods/test.ql
rename to java/ql/test-kotlin1/library-tests/java-map-methods/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin/Continuation.java b/java/ql/test-kotlin1/library-tests/java_and_kotlin/Continuation.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin/Continuation.java
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin/Continuation.java
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin/Java.java b/java/ql/test-kotlin1/library-tests/java_and_kotlin/Java.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin/Java.java
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin/Java.java
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin/Kotlin.kt b/java/ql/test-kotlin1/library-tests/java_and_kotlin/Kotlin.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin/Kotlin.kt
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin/Kotlin.kt
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin/test.expected b/java/ql/test-kotlin1/library-tests/java_and_kotlin/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin/test.expected
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin/test.ql b/java/ql/test-kotlin1/library-tests/java_and_kotlin/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin/test.ql
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/test.expected b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/test.expected
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/test.ql b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/test.ql
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/x.java b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/x.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/java/x.java
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/java/x.java
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/test.expected b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/test.expected
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/test.expected
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/test.ql b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/test.ql
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/test.ql
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/x.kt b/java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/x.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_generics/kotlin/x.kt
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_generics/kotlin/x.kt
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_internal/Java.java b/java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/Java.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_internal/Java.java
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/Java.java
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_internal/Kotlin.kt b/java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/Kotlin.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_internal/Kotlin.kt
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/Kotlin.kt
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_internal/visibility.expected b/java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/visibility.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_internal/visibility.expected
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/visibility.expected
diff --git a/java/ql/test/kotlin/library-tests/java_and_kotlin_internal/visibility.ql b/java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/visibility.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_and_kotlin_internal/visibility.ql
rename to java/ql/test-kotlin1/library-tests/java_and_kotlin_internal/visibility.ql
diff --git a/java/ql/test/kotlin/library-tests/java_properties/PrintAst.expected b/java/ql/test-kotlin1/library-tests/java_properties/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_properties/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/java_properties/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/java_properties/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/java_properties/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_properties/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/java_properties/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/java_properties/Prop.java b/java/ql/test-kotlin1/library-tests/java_properties/Prop.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_properties/Prop.java
rename to java/ql/test-kotlin1/library-tests/java_properties/Prop.java
diff --git a/java/ql/test/kotlin/library-tests/java_properties/Use.kt b/java/ql/test-kotlin1/library-tests/java_properties/Use.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/java_properties/Use.kt
rename to java/ql/test-kotlin1/library-tests/java_properties/Use.kt
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected b/java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads-annotation/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.expected b/java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.expected
rename to java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.kt b/java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.kt
rename to java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.kt
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.ql b/java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads-annotation/test.ql
rename to java/ql/test-kotlin1/library-tests/jvmoverloads-annotation/test.ql
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_flow/User.java b/java/ql/test-kotlin1/library-tests/jvmoverloads_flow/User.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_flow/User.java
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_flow/User.java
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.expected b/java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.expected
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.kt b/java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.kt
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.kt
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.ql b/java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_flow/test.ql
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_flow/test.ql
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_generics/User.java b/java/ql/test-kotlin1/library-tests/jvmoverloads_generics/User.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_generics/User.java
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_generics/User.java
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.expected b/java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.expected
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.kt b/java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.kt
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.kt
diff --git a/java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.ql b/java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmoverloads_generics/test.ql
rename to java/ql/test-kotlin1/library-tests/jvmoverloads_generics/test.ql
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/JavaUser.java b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/JavaUser.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/JavaUser.java
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/JavaUser.java
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.expected b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.expected
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.expected
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.kt b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.kt
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.kt
diff --git a/java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.ql b/java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/jvmstatic-annotation/test.ql
rename to java/ql/test-kotlin1/library-tests/jvmstatic-annotation/test.ql
diff --git a/java/ql/test/kotlin/library-tests/kotlin-java-map-entries/C.java b/java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/C.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/kotlin-java-map-entries/C.java
rename to java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/C.java
diff --git a/java/ql/test/kotlin/library-tests/kotlin-java-map-entries/b.kt b/java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/b.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/kotlin-java-map-entries/b.kt
rename to java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/b.kt
diff --git a/java/ql/test/kotlin/library-tests/kotlin-java-map-entries/test.expected b/java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/kotlin-java-map-entries/test.expected
rename to java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/test.expected
diff --git a/java/ql/test/kotlin/library-tests/kotlin-java-map-entries/test.ql b/java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/kotlin-java-map-entries/test.ql
rename to java/ql/test-kotlin1/library-tests/kotlin-java-map-entries/test.ql
diff --git a/java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected b/java/ql/test-kotlin1/library-tests/lateinit/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lateinit/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/lateinit/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/lateinit/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/lateinit/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lateinit/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/lateinit/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/lateinit/test.expected b/java/ql/test-kotlin1/library-tests/lateinit/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lateinit/test.expected
rename to java/ql/test-kotlin1/library-tests/lateinit/test.expected
diff --git a/java/ql/test/kotlin/library-tests/lateinit/test.kt b/java/ql/test-kotlin1/library-tests/lateinit/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lateinit/test.kt
rename to java/ql/test-kotlin1/library-tests/lateinit/test.kt
diff --git a/java/ql/test/kotlin/library-tests/lateinit/test.ql b/java/ql/test-kotlin1/library-tests/lateinit/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lateinit/test.ql
rename to java/ql/test-kotlin1/library-tests/lateinit/test.ql
diff --git a/java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.expected b/java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.expected
rename to java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.expected
diff --git a/java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.kt b/java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.kt
rename to java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.kt
diff --git a/java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.ql b/java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/lazy-val-multiple-constructors/test.ql
rename to java/ql/test-kotlin1/library-tests/lazy-val-multiple-constructors/test.ql
diff --git a/java/ql/test/kotlin/library-tests/literals/literals.expected b/java/ql/test-kotlin1/library-tests/literals/literals.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/literals/literals.expected
rename to java/ql/test-kotlin1/library-tests/literals/literals.expected
diff --git a/java/ql/test/kotlin/library-tests/literals/literals.kt b/java/ql/test-kotlin1/library-tests/literals/literals.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/literals/literals.kt
rename to java/ql/test-kotlin1/library-tests/literals/literals.kt
diff --git a/java/ql/test/kotlin/library-tests/literals/literals.ql b/java/ql/test-kotlin1/library-tests/literals/literals.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/literals/literals.ql
rename to java/ql/test-kotlin1/library-tests/literals/literals.ql
diff --git a/java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.expected b/java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.expected
rename to java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.expected
diff --git a/java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.kt b/java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.kt
rename to java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.kt
diff --git a/java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.ql b/java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/maps-iterator-overloads/test.ql
rename to java/ql/test-kotlin1/library-tests/maps-iterator-overloads/test.ql
diff --git a/java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/A.java b/java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/A.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/A.java
rename to java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/A.java
diff --git a/java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/B.java b/java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/B.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/B.java
rename to java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/B.java
diff --git a/java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/W.kt b/java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/W.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/W.kt
rename to java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/W.kt
diff --git a/java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/test.expected b/java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/test.expected
rename to java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/test.expected
diff --git a/java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/test.ql b/java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods-mixed-java-and-kotlin/test.ql
rename to java/ql/test-kotlin1/library-tests/methods-mixed-java-and-kotlin/test.ql
diff --git a/java/ql/test/kotlin/library-tests/methods/clinit.expected b/java/ql/test-kotlin1/library-tests/methods/clinit.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/clinit.expected
rename to java/ql/test-kotlin1/library-tests/methods/clinit.expected
diff --git a/java/ql/test/kotlin/library-tests/methods/clinit.kt b/java/ql/test-kotlin1/library-tests/methods/clinit.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/clinit.kt
rename to java/ql/test-kotlin1/library-tests/methods/clinit.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/clinit.ql b/java/ql/test-kotlin1/library-tests/methods/clinit.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/clinit.ql
rename to java/ql/test-kotlin1/library-tests/methods/clinit.ql
diff --git a/java/ql/test/kotlin/library-tests/methods/dataClass.kt b/java/ql/test-kotlin1/library-tests/methods/dataClass.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/dataClass.kt
rename to java/ql/test-kotlin1/library-tests/methods/dataClass.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/delegates.kt b/java/ql/test-kotlin1/library-tests/methods/delegates.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/delegates.kt
rename to java/ql/test-kotlin1/library-tests/methods/delegates.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/diagnostics.expected b/java/ql/test-kotlin1/library-tests/methods/diagnostics.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/diagnostics.expected
rename to java/ql/test-kotlin1/library-tests/methods/diagnostics.expected
diff --git a/java/ql/test/kotlin/library-tests/methods/diagnostics.ql b/java/ql/test-kotlin1/library-tests/methods/diagnostics.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/diagnostics.ql
rename to java/ql/test-kotlin1/library-tests/methods/diagnostics.ql
diff --git a/java/ql/test/kotlin/library-tests/methods/enumClass.kt b/java/ql/test-kotlin1/library-tests/methods/enumClass.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/enumClass.kt
rename to java/ql/test-kotlin1/library-tests/methods/enumClass.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/exprs.expected b/java/ql/test-kotlin1/library-tests/methods/exprs.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/exprs.expected
rename to java/ql/test-kotlin1/library-tests/methods/exprs.expected
diff --git a/java/ql/test/kotlin/library-tests/methods/exprs.ql b/java/ql/test-kotlin1/library-tests/methods/exprs.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/exprs.ql
rename to java/ql/test-kotlin1/library-tests/methods/exprs.ql
diff --git a/java/ql/test/kotlin/library-tests/methods/methods.expected b/java/ql/test-kotlin1/library-tests/methods/methods.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods.expected
rename to java/ql/test-kotlin1/library-tests/methods/methods.expected
diff --git a/java/ql/test/kotlin/library-tests/methods/methods.kt b/java/ql/test-kotlin1/library-tests/methods/methods.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/methods.ql b/java/ql/test-kotlin1/library-tests/methods/methods.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods.ql
rename to java/ql/test-kotlin1/library-tests/methods/methods.ql
diff --git a/java/ql/test/kotlin/library-tests/methods/methods2.kt b/java/ql/test-kotlin1/library-tests/methods/methods2.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods2.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods2.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/methods3.kt b/java/ql/test-kotlin1/library-tests/methods/methods3.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods3.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods3.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/methods4.kt b/java/ql/test-kotlin1/library-tests/methods/methods4.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods4.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods4.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/methods5.kt b/java/ql/test-kotlin1/library-tests/methods/methods5.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods5.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods5.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/methods6.kt b/java/ql/test-kotlin1/library-tests/methods/methods6.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/methods6.kt
rename to java/ql/test-kotlin1/library-tests/methods/methods6.kt
diff --git a/java/ql/test/kotlin/library-tests/methods/parameters.expected b/java/ql/test-kotlin1/library-tests/methods/parameters.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/parameters.expected
rename to java/ql/test-kotlin1/library-tests/methods/parameters.expected
diff --git a/java/ql/test/kotlin/library-tests/methods/parameters.ql b/java/ql/test-kotlin1/library-tests/methods/parameters.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/methods/parameters.ql
rename to java/ql/test-kotlin1/library-tests/methods/parameters.ql
diff --git a/java/ql/test/kotlin/library-tests/ministdlib/MiniStdLib.kt b/java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/ministdlib/MiniStdLib.kt
rename to java/ql/test-kotlin1/library-tests/ministdlib/MiniStdLib.kt
diff --git a/java/ql/test/kotlin/library-tests/ministdlib/MyClass.kt b/java/ql/test-kotlin1/library-tests/ministdlib/MyClass.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/ministdlib/MyClass.kt
rename to java/ql/test-kotlin1/library-tests/ministdlib/MyClass.kt
diff --git a/java/ql/test/kotlin/library-tests/ministdlib/classes.expected b/java/ql/test-kotlin1/library-tests/ministdlib/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/ministdlib/classes.expected
rename to java/ql/test-kotlin1/library-tests/ministdlib/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/ministdlib/classes.ql b/java/ql/test-kotlin1/library-tests/ministdlib/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/ministdlib/classes.ql
rename to java/ql/test-kotlin1/library-tests/ministdlib/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/ministdlib/options b/java/ql/test-kotlin1/library-tests/ministdlib/options
similarity index 100%
rename from java/ql/test/kotlin/library-tests/ministdlib/options
rename to java/ql/test-kotlin1/library-tests/ministdlib/options
diff --git a/java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/Q.java b/java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/Q.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/Q.java
rename to java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/Q.java
diff --git a/java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/W.kt b/java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/W.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/W.kt
rename to java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/W.kt
diff --git a/java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/test.expected b/java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/test.expected
rename to java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/test.expected
diff --git a/java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/test.ql b/java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/mixed-java-and-kotlin/test.ql
rename to java/ql/test-kotlin1/library-tests/mixed-java-and-kotlin/test.ql
diff --git a/java/ql/test/kotlin/library-tests/modifiers/modifiers.expected b/java/ql/test-kotlin1/library-tests/modifiers/modifiers.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/modifiers/modifiers.expected
rename to java/ql/test-kotlin1/library-tests/modifiers/modifiers.expected
diff --git a/java/ql/test/kotlin/library-tests/modifiers/modifiers.kt b/java/ql/test-kotlin1/library-tests/modifiers/modifiers.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/modifiers/modifiers.kt
rename to java/ql/test-kotlin1/library-tests/modifiers/modifiers.kt
diff --git a/java/ql/test/kotlin/library-tests/modifiers/modifiers.ql b/java/ql/test-kotlin1/library-tests/modifiers/modifiers.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/modifiers/modifiers.ql
rename to java/ql/test-kotlin1/library-tests/modifiers/modifiers.ql
diff --git a/java/ql/test/kotlin/library-tests/multiple_extensions/calls.expected b/java/ql/test-kotlin1/library-tests/multiple_extensions/calls.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_extensions/calls.expected
rename to java/ql/test-kotlin1/library-tests/multiple_extensions/calls.expected
diff --git a/java/ql/test/kotlin/library-tests/multiple_extensions/calls.ql b/java/ql/test-kotlin1/library-tests/multiple_extensions/calls.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_extensions/calls.ql
rename to java/ql/test-kotlin1/library-tests/multiple_extensions/calls.ql
diff --git a/java/ql/test/kotlin/library-tests/multiple_extensions/test.kt b/java/ql/test-kotlin1/library-tests/multiple_extensions/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_extensions/test.kt
rename to java/ql/test-kotlin1/library-tests/multiple_extensions/test.kt
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/classes.expected b/java/ql/test-kotlin1/library-tests/multiple_files/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/classes.expected
rename to java/ql/test-kotlin1/library-tests/multiple_files/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/classes.ql b/java/ql/test-kotlin1/library-tests/multiple_files/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/classes.ql
rename to java/ql/test-kotlin1/library-tests/multiple_files/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/file1.kt b/java/ql/test-kotlin1/library-tests/multiple_files/file1.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/file1.kt
rename to java/ql/test-kotlin1/library-tests/multiple_files/file1.kt
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/file2.kt b/java/ql/test-kotlin1/library-tests/multiple_files/file2.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/file2.kt
rename to java/ql/test-kotlin1/library-tests/multiple_files/file2.kt
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/file3.kt b/java/ql/test-kotlin1/library-tests/multiple_files/file3.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/file3.kt
rename to java/ql/test-kotlin1/library-tests/multiple_files/file3.kt
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/file4.kt b/java/ql/test-kotlin1/library-tests/multiple_files/file4.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/file4.kt
rename to java/ql/test-kotlin1/library-tests/multiple_files/file4.kt
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/method_accesses.expected b/java/ql/test-kotlin1/library-tests/multiple_files/method_accesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/method_accesses.expected
rename to java/ql/test-kotlin1/library-tests/multiple_files/method_accesses.expected
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/method_accesses.ql b/java/ql/test-kotlin1/library-tests/multiple_files/method_accesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/method_accesses.ql
rename to java/ql/test-kotlin1/library-tests/multiple_files/method_accesses.ql
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/methods.expected b/java/ql/test-kotlin1/library-tests/multiple_files/methods.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/methods.expected
rename to java/ql/test-kotlin1/library-tests/multiple_files/methods.expected
diff --git a/java/ql/test/kotlin/library-tests/multiple_files/methods.ql b/java/ql/test-kotlin1/library-tests/multiple_files/methods.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/multiple_files/methods.ql
rename to java/ql/test-kotlin1/library-tests/multiple_files/methods.ql
diff --git a/java/ql/test/kotlin/library-tests/no-when-branch-found/test.expected b/java/ql/test-kotlin1/library-tests/no-when-branch-found/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/no-when-branch-found/test.expected
rename to java/ql/test-kotlin1/library-tests/no-when-branch-found/test.expected
diff --git a/java/ql/test/kotlin/library-tests/no-when-branch-found/test.kt b/java/ql/test-kotlin1/library-tests/no-when-branch-found/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/no-when-branch-found/test.kt
rename to java/ql/test-kotlin1/library-tests/no-when-branch-found/test.kt
diff --git a/java/ql/test/kotlin/library-tests/no-when-branch-found/test.ql b/java/ql/test-kotlin1/library-tests/no-when-branch-found/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/no-when-branch-found/test.ql
rename to java/ql/test-kotlin1/library-tests/no-when-branch-found/test.ql
diff --git a/java/ql/test/kotlin/library-tests/numlines/callable.expected b/java/ql/test-kotlin1/library-tests/numlines/callable.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/callable.expected
rename to java/ql/test-kotlin1/library-tests/numlines/callable.expected
diff --git a/java/ql/test/kotlin/library-tests/numlines/callable.ql b/java/ql/test-kotlin1/library-tests/numlines/callable.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/callable.ql
rename to java/ql/test-kotlin1/library-tests/numlines/callable.ql
diff --git a/java/ql/test/kotlin/library-tests/numlines/classes.expected b/java/ql/test-kotlin1/library-tests/numlines/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/classes.expected
rename to java/ql/test-kotlin1/library-tests/numlines/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/numlines/classes.ql b/java/ql/test-kotlin1/library-tests/numlines/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/classes.ql
rename to java/ql/test-kotlin1/library-tests/numlines/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/numlines/files.expected b/java/ql/test-kotlin1/library-tests/numlines/files.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/files.expected
rename to java/ql/test-kotlin1/library-tests/numlines/files.expected
diff --git a/java/ql/test/kotlin/library-tests/numlines/files.ql b/java/ql/test-kotlin1/library-tests/numlines/files.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/files.ql
rename to java/ql/test-kotlin1/library-tests/numlines/files.ql
diff --git a/java/ql/test/kotlin/library-tests/numlines/test.kt b/java/ql/test-kotlin1/library-tests/numlines/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/numlines/test.kt
rename to java/ql/test-kotlin1/library-tests/numlines/test.kt
diff --git a/java/ql/test/kotlin/library-tests/object/accesses.expected b/java/ql/test-kotlin1/library-tests/object/accesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/object/accesses.expected
rename to java/ql/test-kotlin1/library-tests/object/accesses.expected
diff --git a/java/ql/test/kotlin/library-tests/object/accesses.ql b/java/ql/test-kotlin1/library-tests/object/accesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/object/accesses.ql
rename to java/ql/test-kotlin1/library-tests/object/accesses.ql
diff --git a/java/ql/test/kotlin/library-tests/object/objects.expected b/java/ql/test-kotlin1/library-tests/object/objects.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/object/objects.expected
rename to java/ql/test-kotlin1/library-tests/object/objects.expected
diff --git a/java/ql/test/kotlin/library-tests/object/objects.kt b/java/ql/test-kotlin1/library-tests/object/objects.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/object/objects.kt
rename to java/ql/test-kotlin1/library-tests/object/objects.kt
diff --git a/java/ql/test/kotlin/library-tests/object/objects.ql b/java/ql/test-kotlin1/library-tests/object/objects.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/object/objects.ql
rename to java/ql/test-kotlin1/library-tests/object/objects.ql
diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected b/java/ql/test-kotlin1/library-tests/operator-overloads/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/operator-overloads/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/operator-overloads/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/operator-overloads/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/operator-overloads/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/reflection/checkParameterCounts.expected b/java/ql/test-kotlin1/library-tests/operator-overloads/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/checkParameterCounts.expected
rename to java/ql/test-kotlin1/library-tests/operator-overloads/test.expected
diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/test.kt b/java/ql/test-kotlin1/library-tests/operator-overloads/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/operator-overloads/test.kt
rename to java/ql/test-kotlin1/library-tests/operator-overloads/test.kt
diff --git a/java/ql/test/kotlin/library-tests/operator-overloads/test.ql b/java/ql/test-kotlin1/library-tests/operator-overloads/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/operator-overloads/test.ql
rename to java/ql/test-kotlin1/library-tests/operator-overloads/test.ql
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected b/java/ql/test-kotlin1/library-tests/parameter-defaults/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/parameter-defaults/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/defaults.expected b/java/ql/test-kotlin1/library-tests/parameter-defaults/defaults.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/defaults.expected
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/defaults.expected
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/defaults.ql b/java/ql/test-kotlin1/library-tests/parameter-defaults/defaults.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/defaults.ql
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/defaults.ql
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/erasure.expected b/java/ql/test-kotlin1/library-tests/parameter-defaults/erasure.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/erasure.expected
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/erasure.expected
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/erasure.ql b/java/ql/test-kotlin1/library-tests/parameter-defaults/erasure.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/erasure.ql
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/erasure.ql
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/flowTest.expected b/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/flowTest.expected
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.expected
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/flowTest.ql b/java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/flowTest.ql
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/flowTest.ql
diff --git a/java/ql/test/kotlin/library-tests/parameter-defaults/test.kt b/java/ql/test-kotlin1/library-tests/parameter-defaults/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/parameter-defaults/test.kt
rename to java/ql/test-kotlin1/library-tests/parameter-defaults/test.kt
diff --git a/java/ql/test/kotlin/library-tests/private-anonymous-types/other.kt b/java/ql/test-kotlin1/library-tests/private-anonymous-types/other.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/private-anonymous-types/other.kt
rename to java/ql/test-kotlin1/library-tests/private-anonymous-types/other.kt
diff --git a/java/ql/test/kotlin/library-tests/private-anonymous-types/test.expected b/java/ql/test-kotlin1/library-tests/private-anonymous-types/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/private-anonymous-types/test.expected
rename to java/ql/test-kotlin1/library-tests/private-anonymous-types/test.expected
diff --git a/java/ql/test/kotlin/library-tests/private-anonymous-types/test.kt b/java/ql/test-kotlin1/library-tests/private-anonymous-types/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/private-anonymous-types/test.kt
rename to java/ql/test-kotlin1/library-tests/private-anonymous-types/test.kt
diff --git a/java/ql/test/kotlin/library-tests/private-anonymous-types/test.ql b/java/ql/test-kotlin1/library-tests/private-anonymous-types/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/private-anonymous-types/test.ql
rename to java/ql/test-kotlin1/library-tests/private-anonymous-types/test.ql
diff --git a/java/ql/test/kotlin/library-tests/properties/properties.expected b/java/ql/test-kotlin1/library-tests/properties/properties.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/properties/properties.expected
rename to java/ql/test-kotlin1/library-tests/properties/properties.expected
diff --git a/java/ql/test/kotlin/library-tests/properties/properties.kt b/java/ql/test-kotlin1/library-tests/properties/properties.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/properties/properties.kt
rename to java/ql/test-kotlin1/library-tests/properties/properties.kt
diff --git a/java/ql/test/kotlin/library-tests/properties/properties.ql b/java/ql/test-kotlin1/library-tests/properties/properties.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/properties/properties.ql
rename to java/ql/test-kotlin1/library-tests/properties/properties.ql
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/BaseFoo.java b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/BaseFoo.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/BaseFoo.java
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/BaseFoo.java
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/Foo.java b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/Foo.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/Foo.java
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/Foo.java
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/classes.expected b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/classes.expected
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/classes.ql b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/classes.ql
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/test.kt b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-1/test.kt
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-1/test.kt
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/classes.expected b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/classes.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/classes.expected
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/classes.expected
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/classes.ql b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/classes.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/classes.ql
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/classes.ql
diff --git a/java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/stackOverflow.kt b/java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/stackOverflow.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/recursive-instantiations/stack-overflow-2/stackOverflow.kt
rename to java/ql/test-kotlin1/library-tests/recursive-instantiations/stack-overflow-2/stackOverflow.kt
diff --git a/java/ql/test/kotlin/library-tests/reflection/PrintAst.expected b/java/ql/test-kotlin1/library-tests/reflection/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/reflection/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/reflection/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/reflection/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/reflection/PrintAst.qlref
diff --git a/java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.expected b/java/ql/test-kotlin1/library-tests/reflection/checkParameterCounts.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.expected
rename to java/ql/test-kotlin1/library-tests/reflection/checkParameterCounts.expected
diff --git a/java/ql/test/kotlin/library-tests/reflection/checkParameterCounts.ql b/java/ql/test-kotlin1/library-tests/reflection/checkParameterCounts.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/checkParameterCounts.ql
rename to java/ql/test-kotlin1/library-tests/reflection/checkParameterCounts.ql
diff --git a/java/ql/test/kotlin/library-tests/reflection/reflection.expected b/java/ql/test-kotlin1/library-tests/reflection/reflection.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/reflection.expected
rename to java/ql/test-kotlin1/library-tests/reflection/reflection.expected
diff --git a/java/ql/test/kotlin/library-tests/reflection/reflection.kt b/java/ql/test-kotlin1/library-tests/reflection/reflection.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/reflection.kt
rename to java/ql/test-kotlin1/library-tests/reflection/reflection.kt
diff --git a/java/ql/test/kotlin/library-tests/reflection/reflection.ql b/java/ql/test-kotlin1/library-tests/reflection/reflection.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/reflection/reflection.ql
rename to java/ql/test-kotlin1/library-tests/reflection/reflection.ql
diff --git a/java/ql/test/kotlin/library-tests/special-method-getters/test.expected b/java/ql/test-kotlin1/library-tests/special-method-getters/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/special-method-getters/test.expected
rename to java/ql/test-kotlin1/library-tests/special-method-getters/test.expected
diff --git a/java/ql/test/kotlin/library-tests/special-method-getters/test.kt b/java/ql/test-kotlin1/library-tests/special-method-getters/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/special-method-getters/test.kt
rename to java/ql/test-kotlin1/library-tests/special-method-getters/test.kt
diff --git a/java/ql/test/kotlin/library-tests/special-method-getters/test.ql b/java/ql/test-kotlin1/library-tests/special-method-getters/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/special-method-getters/test.ql
rename to java/ql/test-kotlin1/library-tests/special-method-getters/test.ql
diff --git a/java/ql/test/kotlin/library-tests/static-method-calls/test.expected b/java/ql/test-kotlin1/library-tests/static-method-calls/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/static-method-calls/test.expected
rename to java/ql/test-kotlin1/library-tests/static-method-calls/test.expected
diff --git a/java/ql/test/kotlin/library-tests/static-method-calls/test.kt b/java/ql/test-kotlin1/library-tests/static-method-calls/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/static-method-calls/test.kt
rename to java/ql/test-kotlin1/library-tests/static-method-calls/test.kt
diff --git a/java/ql/test/kotlin/library-tests/static-method-calls/test.ql b/java/ql/test-kotlin1/library-tests/static-method-calls/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/static-method-calls/test.ql
rename to java/ql/test-kotlin1/library-tests/static-method-calls/test.ql
diff --git a/java/ql/test/kotlin/library-tests/stmts/PrintAst.expected b/java/ql/test-kotlin1/library-tests/stmts/PrintAst.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/PrintAst.expected
rename to java/ql/test-kotlin1/library-tests/stmts/PrintAst.expected
diff --git a/java/ql/test/kotlin/library-tests/stmts/PrintAst.qlref b/java/ql/test-kotlin1/library-tests/stmts/PrintAst.qlref
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/PrintAst.qlref
rename to java/ql/test-kotlin1/library-tests/stmts/PrintAst.qlref
diff --git a/java/ql/test/kotlin/library-tests/stmts/exprs.expected b/java/ql/test-kotlin1/library-tests/stmts/exprs.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/exprs.expected
rename to java/ql/test-kotlin1/library-tests/stmts/exprs.expected
diff --git a/java/ql/test/kotlin/library-tests/stmts/exprs.ql b/java/ql/test-kotlin1/library-tests/stmts/exprs.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/exprs.ql
rename to java/ql/test-kotlin1/library-tests/stmts/exprs.ql
diff --git a/java/ql/test/kotlin/library-tests/stmts/loops.expected b/java/ql/test-kotlin1/library-tests/stmts/loops.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/loops.expected
rename to java/ql/test-kotlin1/library-tests/stmts/loops.expected
diff --git a/java/ql/test/kotlin/library-tests/stmts/loops.ql b/java/ql/test-kotlin1/library-tests/stmts/loops.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/loops.ql
rename to java/ql/test-kotlin1/library-tests/stmts/loops.ql
diff --git a/java/ql/test/kotlin/library-tests/stmts/stmts.expected b/java/ql/test-kotlin1/library-tests/stmts/stmts.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/stmts.expected
rename to java/ql/test-kotlin1/library-tests/stmts/stmts.expected
diff --git a/java/ql/test/kotlin/library-tests/stmts/stmts.kt b/java/ql/test-kotlin1/library-tests/stmts/stmts.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/stmts.kt
rename to java/ql/test-kotlin1/library-tests/stmts/stmts.kt
diff --git a/java/ql/test/kotlin/library-tests/stmts/stmts.ql b/java/ql/test-kotlin1/library-tests/stmts/stmts.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/stmts.ql
rename to java/ql/test-kotlin1/library-tests/stmts/stmts.ql
diff --git a/java/ql/test/kotlin/library-tests/stmts/tryStmts.expected b/java/ql/test-kotlin1/library-tests/stmts/tryStmts.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/tryStmts.expected
rename to java/ql/test-kotlin1/library-tests/stmts/tryStmts.expected
diff --git a/java/ql/test/kotlin/library-tests/stmts/tryStmts.ql b/java/ql/test-kotlin1/library-tests/stmts/tryStmts.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/stmts/tryStmts.ql
rename to java/ql/test-kotlin1/library-tests/stmts/tryStmts.ql
diff --git a/java/ql/test/kotlin/library-tests/string-charat/Test.java b/java/ql/test-kotlin1/library-tests/string-charat/Test.java
similarity index 100%
rename from java/ql/test/kotlin/library-tests/string-charat/Test.java
rename to java/ql/test-kotlin1/library-tests/string-charat/Test.java
diff --git a/java/ql/test/kotlin/library-tests/string-charat/test.expected b/java/ql/test-kotlin1/library-tests/string-charat/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/string-charat/test.expected
rename to java/ql/test-kotlin1/library-tests/string-charat/test.expected
diff --git a/java/ql/test/kotlin/library-tests/string-charat/test.kt b/java/ql/test-kotlin1/library-tests/string-charat/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/string-charat/test.kt
rename to java/ql/test-kotlin1/library-tests/string-charat/test.kt
diff --git a/java/ql/test/kotlin/library-tests/string-charat/test.ql b/java/ql/test-kotlin1/library-tests/string-charat/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/string-charat/test.ql
rename to java/ql/test-kotlin1/library-tests/string-charat/test.ql
diff --git a/java/ql/test/kotlin/library-tests/super-method-calls/test.expected b/java/ql/test-kotlin1/library-tests/super-method-calls/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/super-method-calls/test.expected
rename to java/ql/test-kotlin1/library-tests/super-method-calls/test.expected
diff --git a/java/ql/test/kotlin/library-tests/super-method-calls/test.kt b/java/ql/test-kotlin1/library-tests/super-method-calls/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/super-method-calls/test.kt
rename to java/ql/test-kotlin1/library-tests/super-method-calls/test.kt
diff --git a/java/ql/test/kotlin/library-tests/super-method-calls/test.ql b/java/ql/test-kotlin1/library-tests/super-method-calls/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/super-method-calls/test.ql
rename to java/ql/test-kotlin1/library-tests/super-method-calls/test.ql
diff --git a/java/ql/test/kotlin/library-tests/this/call.expected b/java/ql/test-kotlin1/library-tests/this/call.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/this/call.expected
rename to java/ql/test-kotlin1/library-tests/this/call.expected
diff --git a/java/ql/test/kotlin/library-tests/this/call.ql b/java/ql/test-kotlin1/library-tests/this/call.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/this/call.ql
rename to java/ql/test-kotlin1/library-tests/this/call.ql
diff --git a/java/ql/test/kotlin/library-tests/this/this.expected b/java/ql/test-kotlin1/library-tests/this/this.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/this/this.expected
rename to java/ql/test-kotlin1/library-tests/this/this.expected
diff --git a/java/ql/test/kotlin/library-tests/this/this.kt b/java/ql/test-kotlin1/library-tests/this/this.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/this/this.kt
rename to java/ql/test-kotlin1/library-tests/this/this.kt
diff --git a/java/ql/test/kotlin/library-tests/this/this.ql b/java/ql/test-kotlin1/library-tests/this/this.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/this/this.ql
rename to java/ql/test-kotlin1/library-tests/this/this.ql
diff --git a/java/ql/test/kotlin/library-tests/trap/comments.expected b/java/ql/test-kotlin1/library-tests/trap/comments.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/comments.expected
rename to java/ql/test-kotlin1/library-tests/trap/comments.expected
diff --git a/java/ql/test/kotlin/library-tests/trap/comments.ql b/java/ql/test-kotlin1/library-tests/trap/comments.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/comments.ql
rename to java/ql/test-kotlin1/library-tests/trap/comments.ql
diff --git a/java/ql/test/kotlin/library-tests/trap/diags.expected b/java/ql/test-kotlin1/library-tests/trap/diags.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/diags.expected
rename to java/ql/test-kotlin1/library-tests/trap/diags.expected
diff --git a/java/ql/test/kotlin/library-tests/trap/diags.ql b/java/ql/test-kotlin1/library-tests/trap/diags.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/diags.ql
rename to java/ql/test-kotlin1/library-tests/trap/diags.ql
diff --git a/java/ql/test/kotlin/library-tests/trap/literals.expected b/java/ql/test-kotlin1/library-tests/trap/literals.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/literals.expected
rename to java/ql/test-kotlin1/library-tests/trap/literals.expected
diff --git a/java/ql/test/kotlin/library-tests/trap/literals.ql b/java/ql/test-kotlin1/library-tests/trap/literals.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/literals.ql
rename to java/ql/test-kotlin1/library-tests/trap/literals.ql
diff --git a/java/ql/test/kotlin/library-tests/trap/long_comments.kt b/java/ql/test-kotlin1/library-tests/trap/long_comments.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/long_comments.kt
rename to java/ql/test-kotlin1/library-tests/trap/long_comments.kt
diff --git a/java/ql/test/kotlin/library-tests/trap/long_string.kt b/java/ql/test-kotlin1/library-tests/trap/long_string.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trap/long_string.kt
rename to java/ql/test-kotlin1/library-tests/trap/long_string.kt
diff --git a/java/ql/test/kotlin/library-tests/trivial/Trivial.kt b/java/ql/test-kotlin1/library-tests/trivial/Trivial.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trivial/Trivial.kt
rename to java/ql/test-kotlin1/library-tests/trivial/Trivial.kt
diff --git a/java/ql/test/kotlin/library-tests/trivial/elements.expected b/java/ql/test-kotlin1/library-tests/trivial/elements.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trivial/elements.expected
rename to java/ql/test-kotlin1/library-tests/trivial/elements.expected
diff --git a/java/ql/test/kotlin/library-tests/trivial/elements.ql b/java/ql/test-kotlin1/library-tests/trivial/elements.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/trivial/elements.ql
rename to java/ql/test-kotlin1/library-tests/trivial/elements.ql
diff --git a/java/ql/test/kotlin/library-tests/type_aliases/aliases_with_type_parameters.kt b/java/ql/test-kotlin1/library-tests/type_aliases/aliases_with_type_parameters.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_aliases/aliases_with_type_parameters.kt
rename to java/ql/test-kotlin1/library-tests/type_aliases/aliases_with_type_parameters.kt
diff --git a/java/ql/test/kotlin/library-tests/type_aliases/test.kt b/java/ql/test-kotlin1/library-tests/type_aliases/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_aliases/test.kt
rename to java/ql/test-kotlin1/library-tests/type_aliases/test.kt
diff --git a/java/ql/test/kotlin/library-tests/type_aliases/type_aliases.expected b/java/ql/test-kotlin1/library-tests/type_aliases/type_aliases.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_aliases/type_aliases.expected
rename to java/ql/test-kotlin1/library-tests/type_aliases/type_aliases.expected
diff --git a/java/ql/test/kotlin/library-tests/type_aliases/type_aliases.ql b/java/ql/test-kotlin1/library-tests/type_aliases/type_aliases.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_aliases/type_aliases.ql
rename to java/ql/test-kotlin1/library-tests/type_aliases/type_aliases.ql
diff --git a/java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.expected b/java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.expected
rename to java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.expected
diff --git a/java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.kt b/java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.kt
rename to java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.kt
diff --git a/java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.ql b/java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/type_equivalences/type_equivalences.ql
rename to java/ql/test-kotlin1/library-tests/type_equivalences/type_equivalences.ql
diff --git a/java/ql/test/kotlin/library-tests/types/types.expected b/java/ql/test-kotlin1/library-tests/types/types.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/types/types.expected
rename to java/ql/test-kotlin1/library-tests/types/types.expected
diff --git a/java/ql/test/kotlin/library-tests/types/types.kt b/java/ql/test-kotlin1/library-tests/types/types.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/types/types.kt
rename to java/ql/test-kotlin1/library-tests/types/types.kt
diff --git a/java/ql/test/kotlin/library-tests/types/types.ql b/java/ql/test-kotlin1/library-tests/types/types.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/types/types.ql
rename to java/ql/test-kotlin1/library-tests/types/types.ql
diff --git a/java/ql/test/kotlin/library-tests/underscore-parameters/test.expected b/java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/underscore-parameters/test.expected
rename to java/ql/test-kotlin1/library-tests/underscore-parameters/test.expected
diff --git a/java/ql/test/kotlin/library-tests/underscore-parameters/test.kt b/java/ql/test-kotlin1/library-tests/underscore-parameters/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/underscore-parameters/test.kt
rename to java/ql/test-kotlin1/library-tests/underscore-parameters/test.kt
diff --git a/java/ql/test/kotlin/library-tests/underscore-parameters/test.ql b/java/ql/test-kotlin1/library-tests/underscore-parameters/test.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/underscore-parameters/test.ql
rename to java/ql/test-kotlin1/library-tests/underscore-parameters/test.ql
diff --git a/java/ql/test/kotlin/library-tests/vararg/args.expected b/java/ql/test-kotlin1/library-tests/vararg/args.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/args.expected
rename to java/ql/test-kotlin1/library-tests/vararg/args.expected
diff --git a/java/ql/test/kotlin/library-tests/vararg/args.ql b/java/ql/test-kotlin1/library-tests/vararg/args.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/args.ql
rename to java/ql/test-kotlin1/library-tests/vararg/args.ql
diff --git a/java/ql/test/kotlin/library-tests/vararg/dataflow.expected b/java/ql/test-kotlin1/library-tests/vararg/dataflow.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/dataflow.expected
rename to java/ql/test-kotlin1/library-tests/vararg/dataflow.expected
diff --git a/java/ql/test/kotlin/library-tests/vararg/dataflow.ql b/java/ql/test-kotlin1/library-tests/vararg/dataflow.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/dataflow.ql
rename to java/ql/test-kotlin1/library-tests/vararg/dataflow.ql
diff --git a/java/ql/test/kotlin/library-tests/vararg/intList.kt b/java/ql/test-kotlin1/library-tests/vararg/intList.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/intList.kt
rename to java/ql/test-kotlin1/library-tests/vararg/intList.kt
diff --git a/java/ql/test/kotlin/library-tests/vararg/test.kt b/java/ql/test-kotlin1/library-tests/vararg/test.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/vararg/test.kt
rename to java/ql/test-kotlin1/library-tests/vararg/test.kt
diff --git a/java/ql/test/kotlin/library-tests/variables/variableAccesses.expected b/java/ql/test-kotlin1/library-tests/variables/variableAccesses.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/variables/variableAccesses.expected
rename to java/ql/test-kotlin1/library-tests/variables/variableAccesses.expected
diff --git a/java/ql/test/kotlin/library-tests/variables/variableAccesses.ql b/java/ql/test-kotlin1/library-tests/variables/variableAccesses.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/variables/variableAccesses.ql
rename to java/ql/test-kotlin1/library-tests/variables/variableAccesses.ql
diff --git a/java/ql/test/kotlin/library-tests/variables/variables.expected b/java/ql/test-kotlin1/library-tests/variables/variables.expected
similarity index 100%
rename from java/ql/test/kotlin/library-tests/variables/variables.expected
rename to java/ql/test-kotlin1/library-tests/variables/variables.expected
diff --git a/java/ql/test/kotlin/library-tests/variables/variables.kt b/java/ql/test-kotlin1/library-tests/variables/variables.kt
similarity index 100%
rename from java/ql/test/kotlin/library-tests/variables/variables.kt
rename to java/ql/test-kotlin1/library-tests/variables/variables.kt
diff --git a/java/ql/test/kotlin/library-tests/variables/variables.ql b/java/ql/test-kotlin1/library-tests/variables/variables.ql
similarity index 100%
rename from java/ql/test/kotlin/library-tests/variables/variables.ql
rename to java/ql/test-kotlin1/library-tests/variables/variables.ql
diff --git a/java/ql/test-kotlin1/qlpack.yml b/java/ql/test-kotlin1/qlpack.yml
new file mode 100644
index 00000000000..6ca37f3eec9
--- /dev/null
+++ b/java/ql/test-kotlin1/qlpack.yml
@@ -0,0 +1,8 @@
+name: codeql/java-kotlin1-tests
+groups: [java, test]
+dependencies:
+ codeql/java-all: ${workspace}
+ codeql/java-queries: ${workspace}
+extractor: java
+tests: .
+warnOnImplicitThis: true
diff --git a/java/ql/test/kotlin/query-tests/AutoBoxing/AutoBoxing.expected b/java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AutoBoxing/AutoBoxing.expected
rename to java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.expected
diff --git a/java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.qlref b/java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.qlref
rename to java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/AbstractToConcreteCollection.qlref
diff --git a/java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/Test.kt b/java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AbstractToConcreteCollection/Test.kt
rename to java/ql/test-kotlin1/query-tests/AbstractToConcreteCollection/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/CloseReader/CloseReader.expected b/java/ql/test-kotlin1/query-tests/AutoBoxing/AutoBoxing.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseReader/CloseReader.expected
rename to java/ql/test-kotlin1/query-tests/AutoBoxing/AutoBoxing.expected
diff --git a/java/ql/test/kotlin/query-tests/AutoBoxing/AutoBoxing.qlref b/java/ql/test-kotlin1/query-tests/AutoBoxing/AutoBoxing.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AutoBoxing/AutoBoxing.qlref
rename to java/ql/test-kotlin1/query-tests/AutoBoxing/AutoBoxing.qlref
diff --git a/java/ql/test/kotlin/query-tests/AutoBoxing/Test.kt b/java/ql/test-kotlin1/query-tests/AutoBoxing/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/AutoBoxing/Test.kt
rename to java/ql/test-kotlin1/query-tests/AutoBoxing/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.expected b/java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.expected
rename to java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.expected
diff --git a/java/ql/test/kotlin/query-tests/CloseReader/CloseReader.kt b/java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseReader/CloseReader.kt
rename to java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.kt
diff --git a/java/ql/test/kotlin/query-tests/CloseReader/CloseReader.qlref b/java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseReader/CloseReader.qlref
rename to java/ql/test-kotlin1/query-tests/CloseReader/CloseReader.qlref
diff --git a/java/ql/test/kotlin/query-tests/ConfusingOverloading/ConfusingOverloading.expected b/java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConfusingOverloading/ConfusingOverloading.expected
rename to java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.expected
diff --git a/java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.kt b/java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.kt
rename to java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.kt
diff --git a/java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.qlref b/java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/CloseWriter/CloseWriter.qlref
rename to java/ql/test-kotlin1/query-tests/CloseWriter/CloseWriter.qlref
diff --git a/java/ql/test/kotlin/query-tests/DeadCode/DeadClass.expected b/java/ql/test-kotlin1/query-tests/ConfusingOverloading/ConfusingOverloading.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadCode/DeadClass.expected
rename to java/ql/test-kotlin1/query-tests/ConfusingOverloading/ConfusingOverloading.expected
diff --git a/java/ql/test/kotlin/query-tests/ConfusingOverloading/ConfusingOverloading.qlref b/java/ql/test-kotlin1/query-tests/ConfusingOverloading/ConfusingOverloading.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConfusingOverloading/ConfusingOverloading.qlref
rename to java/ql/test-kotlin1/query-tests/ConfusingOverloading/ConfusingOverloading.qlref
diff --git a/java/ql/test/kotlin/query-tests/ConfusingOverloading/Test.kt b/java/ql/test-kotlin1/query-tests/ConfusingOverloading/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConfusingOverloading/Test.kt
rename to java/ql/test-kotlin1/query-tests/ConfusingOverloading/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/ConstantLoopCondition/A.kt b/java/ql/test-kotlin1/query-tests/ConstantLoopCondition/A.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConstantLoopCondition/A.kt
rename to java/ql/test-kotlin1/query-tests/ConstantLoopCondition/A.kt
diff --git a/java/ql/test/kotlin/query-tests/ConstantLoopCondition/ConstantLoopCondition.expected b/java/ql/test-kotlin1/query-tests/ConstantLoopCondition/ConstantLoopCondition.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConstantLoopCondition/ConstantLoopCondition.expected
rename to java/ql/test-kotlin1/query-tests/ConstantLoopCondition/ConstantLoopCondition.expected
diff --git a/java/ql/test/kotlin/query-tests/ConstantLoopCondition/ConstantLoopCondition.qlref b/java/ql/test-kotlin1/query-tests/ConstantLoopCondition/ConstantLoopCondition.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ConstantLoopCondition/ConstantLoopCondition.qlref
rename to java/ql/test-kotlin1/query-tests/ConstantLoopCondition/ConstantLoopCondition.qlref
diff --git a/java/ql/test/kotlin/query-tests/DeadCode/DeadMethod.expected b/java/ql/test-kotlin1/query-tests/DeadCode/DeadClass.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadCode/DeadMethod.expected
rename to java/ql/test-kotlin1/query-tests/DeadCode/DeadClass.expected
diff --git a/java/ql/test/kotlin/query-tests/DeadCode/DeadClass.qlref b/java/ql/test-kotlin1/query-tests/DeadCode/DeadClass.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadCode/DeadClass.qlref
rename to java/ql/test-kotlin1/query-tests/DeadCode/DeadClass.qlref
diff --git a/java/ql/test/kotlin/query-tests/EmptyBlock/EmptyBlock.expected b/java/ql/test-kotlin1/query-tests/DeadCode/DeadMethod.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/EmptyBlock/EmptyBlock.expected
rename to java/ql/test-kotlin1/query-tests/DeadCode/DeadMethod.expected
diff --git a/java/ql/test/kotlin/query-tests/DeadCode/DeadMethod.qlref b/java/ql/test-kotlin1/query-tests/DeadCode/DeadMethod.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadCode/DeadMethod.qlref
rename to java/ql/test-kotlin1/query-tests/DeadCode/DeadMethod.qlref
diff --git a/java/ql/test/kotlin/query-tests/DeadCode/Test.kt b/java/ql/test-kotlin1/query-tests/DeadCode/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadCode/Test.kt
rename to java/ql/test-kotlin1/query-tests/DeadCode/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/DeadRefTypes/DeadRefTypes.expected b/java/ql/test-kotlin1/query-tests/DeadRefTypes/DeadRefTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadRefTypes/DeadRefTypes.expected
rename to java/ql/test-kotlin1/query-tests/DeadRefTypes/DeadRefTypes.expected
diff --git a/java/ql/test/kotlin/query-tests/DeadRefTypes/DeadRefTypes.qlref b/java/ql/test-kotlin1/query-tests/DeadRefTypes/DeadRefTypes.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadRefTypes/DeadRefTypes.qlref
rename to java/ql/test-kotlin1/query-tests/DeadRefTypes/DeadRefTypes.qlref
diff --git a/java/ql/test/kotlin/query-tests/DeadRefTypes/test.kt b/java/ql/test-kotlin1/query-tests/DeadRefTypes/test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/DeadRefTypes/test.kt
rename to java/ql/test-kotlin1/query-tests/DeadRefTypes/test.kt
diff --git a/java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposeRepresentation.expected b/java/ql/test-kotlin1/query-tests/EmptyBlock/EmptyBlock.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposeRepresentation.expected
rename to java/ql/test-kotlin1/query-tests/EmptyBlock/EmptyBlock.expected
diff --git a/java/ql/test/kotlin/query-tests/EmptyBlock/EmptyBlock.qlref b/java/ql/test-kotlin1/query-tests/EmptyBlock/EmptyBlock.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/EmptyBlock/EmptyBlock.qlref
rename to java/ql/test-kotlin1/query-tests/EmptyBlock/EmptyBlock.qlref
diff --git a/java/ql/test/kotlin/query-tests/EmptyBlock/Test.kt b/java/ql/test-kotlin1/query-tests/EmptyBlock/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/EmptyBlock/Test.kt
rename to java/ql/test-kotlin1/query-tests/EmptyBlock/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.expected b/java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposeRepresentation.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.expected
rename to java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposeRepresentation.expected
diff --git a/java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposeRepresentation.qlref b/java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposeRepresentation.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposeRepresentation.qlref
rename to java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposeRepresentation.qlref
diff --git a/java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposesRep.kt b/java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposesRep.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ExposeRepresentation/ExposesRep.kt
rename to java/ql/test-kotlin1/query-tests/ExposeRepresentation/ExposesRep.kt
diff --git a/java/ql/test/kotlin/query-tests/ExposeRepresentation/User.kt b/java/ql/test-kotlin1/query-tests/ExposeRepresentation/User.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ExposeRepresentation/User.kt
rename to java/ql/test-kotlin1/query-tests/ExposeRepresentation/User.kt
diff --git a/java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.expected b/java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.expected
rename to java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.expected
diff --git a/java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.qlref b/java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.qlref
rename to java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/InnerClassCouldBeStatic.qlref
diff --git a/java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/Test.kt b/java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/InnerClassCouldBeStatic/Test.kt
rename to java/ql/test-kotlin1/query-tests/InnerClassCouldBeStatic/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.expected b/java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.expected
rename to java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.expected
diff --git a/java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.qlref b/java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.qlref
rename to java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/MissingInstanceofInEquals.qlref
diff --git a/java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/Test.kt b/java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingInstanceofInEquals/Test.kt
rename to java/ql/test-kotlin1/query-tests/MissingInstanceofInEquals/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/MutualDependency/MutualDependency.expected b/java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MutualDependency/MutualDependency.expected
rename to java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.expected
diff --git a/java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.qlref b/java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.qlref
rename to java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/MissingOverrideAnnotation.qlref
diff --git a/java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/Test.kt b/java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MissingOverrideAnnotation/Test.kt
rename to java/ql/test-kotlin1/query-tests/MissingOverrideAnnotation/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableField.expected b/java/ql/test-kotlin1/query-tests/MutualDependency/MutualDependency.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableField.expected
rename to java/ql/test-kotlin1/query-tests/MutualDependency/MutualDependency.expected
diff --git a/java/ql/test/kotlin/query-tests/MutualDependency/MutualDependency.qlref b/java/ql/test-kotlin1/query-tests/MutualDependency/MutualDependency.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MutualDependency/MutualDependency.qlref
rename to java/ql/test-kotlin1/query-tests/MutualDependency/MutualDependency.qlref
diff --git a/java/ql/test/kotlin/query-tests/MutualDependency/Test.kt b/java/ql/test-kotlin1/query-tests/MutualDependency/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/MutualDependency/Test.kt
rename to java/ql/test-kotlin1/query-tests/MutualDependency/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.expected b/java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.expected
rename to java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.expected
diff --git a/java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.qlref b/java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.qlref
rename to java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/NamingConventionsRefTypes.qlref
diff --git a/java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/Test.kt b/java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NamingConventionsRefTypes/Test.kt
rename to java/ql/test-kotlin1/query-tests/NamingConventionsRefTypes/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.expected b/java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableField.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.expected
rename to java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableField.expected
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableField.qlref b/java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableField.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableField.qlref
rename to java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableField.qlref
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableFieldTest.kt b/java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableFieldTest.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableField/NonSerializableFieldTest.kt
rename to java/ql/test-kotlin1/query-tests/NonSerializableField/NonSerializableFieldTest.kt
diff --git a/java/ql/test/kotlin/query-tests/NullMaybe/NullMaybe.expected b/java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NullMaybe/NullMaybe.expected
rename to java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.expected
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.qlref b/java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.qlref
rename to java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClass.qlref
diff --git a/java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClassTest.kt b/java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClassTest.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NonSerializableInnerClass/NonSerializableInnerClassTest.kt
rename to java/ql/test-kotlin1/query-tests/NonSerializableInnerClass/NonSerializableInnerClassTest.kt
diff --git a/java/ql/test/kotlin/query-tests/OneStatementPerLine/OneStatementPerLine.expected b/java/ql/test-kotlin1/query-tests/NullMaybe/NullMaybe.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/OneStatementPerLine/OneStatementPerLine.expected
rename to java/ql/test-kotlin1/query-tests/NullMaybe/NullMaybe.expected
diff --git a/java/ql/test/kotlin/query-tests/NullMaybe/NullMaybe.qlref b/java/ql/test-kotlin1/query-tests/NullMaybe/NullMaybe.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NullMaybe/NullMaybe.qlref
rename to java/ql/test-kotlin1/query-tests/NullMaybe/NullMaybe.qlref
diff --git a/java/ql/test/kotlin/query-tests/NullMaybe/Test.kt b/java/ql/test-kotlin1/query-tests/NullMaybe/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/NullMaybe/Test.kt
rename to java/ql/test-kotlin1/query-tests/NullMaybe/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.expected b/java/ql/test-kotlin1/query-tests/OneStatementPerLine/OneStatementPerLine.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.expected
rename to java/ql/test-kotlin1/query-tests/OneStatementPerLine/OneStatementPerLine.expected
diff --git a/java/ql/test/kotlin/query-tests/OneStatementPerLine/OneStatementPerLine.qlref b/java/ql/test-kotlin1/query-tests/OneStatementPerLine/OneStatementPerLine.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/OneStatementPerLine/OneStatementPerLine.qlref
rename to java/ql/test-kotlin1/query-tests/OneStatementPerLine/OneStatementPerLine.qlref
diff --git a/java/ql/test/kotlin/query-tests/OneStatementPerLine/Test.kt b/java/ql/test-kotlin1/query-tests/OneStatementPerLine/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/OneStatementPerLine/Test.kt
rename to java/ql/test-kotlin1/query-tests/OneStatementPerLine/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/ReturnValueIgnored/ReturnValueIgnored.expected b/java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ReturnValueIgnored/ReturnValueIgnored.expected
rename to java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.expected
diff --git a/java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.qlref b/java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.qlref
rename to java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatch.qlref
diff --git a/java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatchTest.kt b/java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatchTest.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatchTest.kt
rename to java/ql/test-kotlin1/query-tests/PartiallyMaskedCatch/PartiallyMaskedCatchTest.kt
diff --git a/java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.expected b/java/ql/test-kotlin1/query-tests/ReturnValueIgnored/ReturnValueIgnored.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.expected
rename to java/ql/test-kotlin1/query-tests/ReturnValueIgnored/ReturnValueIgnored.expected
diff --git a/java/ql/test/kotlin/query-tests/ReturnValueIgnored/ReturnValueIgnored.qlref b/java/ql/test-kotlin1/query-tests/ReturnValueIgnored/ReturnValueIgnored.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ReturnValueIgnored/ReturnValueIgnored.qlref
rename to java/ql/test-kotlin1/query-tests/ReturnValueIgnored/ReturnValueIgnored.qlref
diff --git a/java/ql/test/kotlin/query-tests/ReturnValueIgnored/Test.kt b/java/ql/test-kotlin1/query-tests/ReturnValueIgnored/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/ReturnValueIgnored/Test.kt
rename to java/ql/test-kotlin1/query-tests/ReturnValueIgnored/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.expected b/java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.expected
rename to java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.expected
diff --git a/java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.kt b/java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.kt
rename to java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.kt
diff --git a/java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.qlref b/java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.qlref
rename to java/ql/test-kotlin1/query-tests/SimplifyBoolExpr/SimplifyBoolExpr.qlref
diff --git a/java/ql/test/kotlin/query-tests/UnderscoreIdentifier/Test.kt b/java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnderscoreIdentifier/Test.kt
rename to java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/UselessParameter/UselessParameter.expected b/java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessParameter/UselessParameter.expected
rename to java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.expected
diff --git a/java/ql/test/kotlin/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.qlref b/java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.qlref
rename to java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/UnderscoreIdentifier.qlref
diff --git a/java/ql/test/kotlin/query-tests/UnderscoreIdentifier/test.expected b/java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/test.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnderscoreIdentifier/test.expected
rename to java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/test.expected
diff --git a/java/ql/test/kotlin/query-tests/UnderscoreIdentifier/test.ql b/java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/test.ql
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnderscoreIdentifier/test.ql
rename to java/ql/test-kotlin1/query-tests/UnderscoreIdentifier/test.ql
diff --git a/java/ql/test/kotlin/query-tests/UnreadLocal/UnreadLocal.expected b/java/ql/test-kotlin1/query-tests/UnreadLocal/UnreadLocal.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnreadLocal/UnreadLocal.expected
rename to java/ql/test-kotlin1/query-tests/UnreadLocal/UnreadLocal.expected
diff --git a/java/ql/test/kotlin/query-tests/UnreadLocal/UnreadLocal.qlref b/java/ql/test-kotlin1/query-tests/UnreadLocal/UnreadLocal.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnreadLocal/UnreadLocal.qlref
rename to java/ql/test-kotlin1/query-tests/UnreadLocal/UnreadLocal.qlref
diff --git a/java/ql/test/kotlin/query-tests/UnreadLocal/test.kt b/java/ql/test-kotlin1/query-tests/UnreadLocal/test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UnreadLocal/test.kt
rename to java/ql/test-kotlin1/query-tests/UnreadLocal/test.kt
diff --git a/java/ql/test/kotlin/query-tests/UselessNullCheck/Test.kt b/java/ql/test-kotlin1/query-tests/UselessNullCheck/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessNullCheck/Test.kt
rename to java/ql/test-kotlin1/query-tests/UselessNullCheck/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/UselessNullCheck/UselessNullCheck.expected b/java/ql/test-kotlin1/query-tests/UselessNullCheck/UselessNullCheck.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessNullCheck/UselessNullCheck.expected
rename to java/ql/test-kotlin1/query-tests/UselessNullCheck/UselessNullCheck.expected
diff --git a/java/ql/test/kotlin/query-tests/UselessNullCheck/UselessNullCheck.qlref b/java/ql/test-kotlin1/query-tests/UselessNullCheck/UselessNullCheck.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessNullCheck/UselessNullCheck.qlref
rename to java/ql/test-kotlin1/query-tests/UselessNullCheck/UselessNullCheck.qlref
diff --git a/java/ql/test/kotlin/query-tests/UselessParameter/Test.kt b/java/ql/test-kotlin1/query-tests/UselessParameter/Test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessParameter/Test.kt
rename to java/ql/test-kotlin1/query-tests/UselessParameter/Test.kt
diff --git a/java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.expected b/java/ql/test-kotlin1/query-tests/UselessParameter/UselessParameter.expected
similarity index 100%
rename from java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.expected
rename to java/ql/test-kotlin1/query-tests/UselessParameter/UselessParameter.expected
diff --git a/java/ql/test/kotlin/query-tests/UselessParameter/UselessParameter.qlref b/java/ql/test-kotlin1/query-tests/UselessParameter/UselessParameter.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/UselessParameter/UselessParameter.qlref
rename to java/ql/test-kotlin1/query-tests/UselessParameter/UselessParameter.qlref
diff --git a/java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.expected b/java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.expected
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.qlref b/java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.qlref
similarity index 100%
rename from java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.qlref
rename to java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/WhitespaceContradictsPrecedence.qlref
diff --git a/java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/test.kt b/java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/test.kt
similarity index 100%
rename from java/ql/test/kotlin/query-tests/WhitespaceContradictsPrecedence/test.kt
rename to java/ql/test-kotlin1/query-tests/WhitespaceContradictsPrecedence/test.kt
diff --git a/java/ql/test-kotlin2/TestUtilities/InlineExpectationsTest.qll b/java/ql/test-kotlin2/TestUtilities/InlineExpectationsTest.qll
new file mode 100644
index 00000000000..44306864a97
--- /dev/null
+++ b/java/ql/test-kotlin2/TestUtilities/InlineExpectationsTest.qll
@@ -0,0 +1,8 @@
+/**
+ * Inline expectation tests for Java.
+ * See `shared/util/codeql/util/test/InlineExpectationsTest.qll`
+ */
+
+private import codeql.util.test.InlineExpectationsTest
+private import internal.InlineExpectationsTestImpl
+import Make
diff --git a/java/ql/test-kotlin2/TestUtilities/InlineFlowTest.qll b/java/ql/test-kotlin2/TestUtilities/InlineFlowTest.qll
new file mode 100644
index 00000000000..d815f302638
--- /dev/null
+++ b/java/ql/test-kotlin2/TestUtilities/InlineFlowTest.qll
@@ -0,0 +1,33 @@
+/**
+ * Inline flow tests for Java.
+ * See `shared/util/codeql/dataflow/test/InlineFlowTest.qll`
+ */
+
+import java
+import semmle.code.java.dataflow.DataFlow
+private import codeql.dataflow.test.InlineFlowTest
+private import semmle.code.java.dataflow.internal.DataFlowImplSpecific
+private import semmle.code.java.dataflow.internal.TaintTrackingImplSpecific
+private import internal.InlineExpectationsTestImpl
+
+private module FlowTestImpl implements InputSig {
+ predicate defaultSource(DataFlow::Node source) {
+ source.asExpr().(MethodCall).getMethod().getName() = ["source", "taint"]
+ }
+
+ predicate defaultSink(DataFlow::Node sink) {
+ exists(MethodCall ma | ma.getMethod().hasName("sink") | sink.asExpr() = ma.getAnArgument())
+ }
+
+ private string getSourceArgString(DataFlow::Node src) {
+ defaultSource(src) and
+ src.asExpr().(MethodCall).getAnArgument().(StringLiteral).getValue() = result
+ }
+
+ string getArgString(DataFlow::Node src, DataFlow::Node sink) {
+ (if exists(getSourceArgString(src)) then result = getSourceArgString(src) else result = "") and
+ exists(sink)
+ }
+}
+
+import InlineFlowTestMake
diff --git a/java/ql/test-kotlin2/TestUtilities/internal/InlineExpectationsTestImpl.qll b/java/ql/test-kotlin2/TestUtilities/internal/InlineExpectationsTestImpl.qll
new file mode 100644
index 00000000000..cd62fdb757e
--- /dev/null
+++ b/java/ql/test-kotlin2/TestUtilities/internal/InlineExpectationsTestImpl.qll
@@ -0,0 +1,35 @@
+private import java as J
+private import codeql.util.test.InlineExpectationsTest
+
+module Impl implements InlineExpectationsTestSig {
+ /**
+ * A class representing line comments in Java, which is simply Javadoc restricted
+ * to EOL comments, with an extra accessor used by the InlineExpectations core code
+ */
+ abstract class ExpectationComment extends J::Top {
+ /** Gets the contents of the given comment, _without_ the preceding comment marker (`//`). */
+ abstract string getContents();
+ }
+
+ private class JavadocExpectationComment extends J::Javadoc, ExpectationComment {
+ JavadocExpectationComment() { isEolComment(this) }
+
+ override string getContents() { result = this.getChild(0).toString() }
+ }
+
+ private class KtExpectationComment extends J::KtComment, ExpectationComment {
+ KtExpectationComment() { this.isEolComment() }
+
+ override string getContents() { result = this.getText().suffix(2).trim() }
+ }
+
+ private class XmlExpectationComment extends ExpectationComment instanceof J::XmlComment {
+ override string getContents() { result = super.getText().trim() }
+
+ override Location getLocation() { result = J::XmlComment.super.getLocation() }
+
+ override string toString() { result = J::XmlComment.super.toString() }
+ }
+
+ class Location = J::Location;
+}
diff --git a/java/ql/test-kotlin2/library-tests/.gitignore b/java/ql/test-kotlin2/library-tests/.gitignore
new file mode 100644
index 00000000000..3e31e72635e
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/.gitignore
@@ -0,0 +1,2 @@
+META-INF
+*.class
diff --git a/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.expected b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.expected
new file mode 100644
index 00000000000..6b4abd0e1a4
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.expected
@@ -0,0 +1 @@
+| Generated.kt:0:0:0:0 | Generated |
diff --git a/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.kt b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.kt
new file mode 100644
index 00000000000..4aa496a1b7d
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.kt
@@ -0,0 +1,3 @@
+// This file was auto generated by me
+
+class B
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.ql b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.ql
new file mode 100644
index 00000000000..131acde1993
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/GeneratedFiles/Generated.ql
@@ -0,0 +1,4 @@
+import java
+
+from GeneratedFile f
+select f
diff --git a/java/ql/test-kotlin2/library-tests/GeneratedFiles/NonGenerated.kt b/java/ql/test-kotlin2/library-tests/GeneratedFiles/NonGenerated.kt
new file mode 100644
index 00000000000..4fd8af3f7a3
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/GeneratedFiles/NonGenerated.kt
@@ -0,0 +1,3 @@
+// This file was not generated
+
+class A
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.expected b/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.expected
new file mode 100644
index 00000000000..b482f60c01b
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.expected
@@ -0,0 +1,4 @@
+| test.kt:4:5:6:5 | keySet | 0 | java.util.concurrent.ConcurrentHashMap$KeySetView |
+| test.kt:8:5:10:5 | keySet | 1 | java.util.concurrent.ConcurrentHashMap$KeySetView |
+| test.kt:17:5:19:5 | keySet | 0 | java.util.Set |
+| test.kt:21:5:23:5 | keySet | 1 | java.util.concurrent.OtherConcurrentHashMap$KeySetView |
diff --git a/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.ql b/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.ql
new file mode 100644
index 00000000000..61951308af0
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/android_function_return_types/returnTypes.ql
@@ -0,0 +1,5 @@
+import java
+
+from Method m
+where m.fromSource()
+select m, m.getNumberOfParameters(), m.getReturnType().(RefType).getQualifiedName()
diff --git a/java/ql/test-kotlin2/library-tests/android_function_return_types/test.kt b/java/ql/test-kotlin2/library-tests/android_function_return_types/test.kt
new file mode 100644
index 00000000000..eaebacd5b01
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/android_function_return_types/test.kt
@@ -0,0 +1,27 @@
+package java.util.concurrent
+
+class ConcurrentHashMap {
+ fun keySet(): MutableSet {
+ return null!!
+ }
+
+ fun keySet(p: V): KeySetView? {
+ return null
+ }
+
+ class KeySetView {
+ }
+}
+
+class OtherConcurrentHashMap {
+ fun keySet(): MutableSet {
+ return null!!
+ }
+
+ fun keySet(p: V): KeySetView? {
+ return null
+ }
+
+ class KeySetView {
+ }
+}
diff --git a/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.expected b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.expected
new file mode 100644
index 00000000000..3f91fe4f141
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.expected
@@ -0,0 +1,21 @@
+test.kt:
+# 0| [CompilationUnit] test
+# 3| 1: [Interface] A
+#-----| -3: (Annotations)
+# 0| 1: [Annotation] Retention
+# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
+# 0| -1: [TypeAccess] RetentionPolicy
+# 3| 1: [Method] c1
+# 3| 3: [TypeAccess] Class>
+# 3| 0: [WildcardTypeAccess] ? ...
+# 3| 2: [Method] c2
+# 3| 3: [TypeAccess] Class extends CharSequence>
+# 3| 0: [WildcardTypeAccess] ? ...
+# 3| 0: [TypeAccess] CharSequence
+# 3| 3: [Method] c3
+# 3| 3: [TypeAccess] Class
+# 3| 0: [TypeAccess] String
+# 3| 4: [Method] c4
+# 3| 3: [TypeAccess] Class>[]
+# 3| 0: [TypeAccess] Class>
+# 3| 0: [WildcardTypeAccess] ? ...
diff --git a/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.qlref b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.qlref
new file mode 100644
index 00000000000..c7fd5faf239
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/PrintAst.qlref
@@ -0,0 +1 @@
+semmle/code/java/PrintAst.ql
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.expected b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.expected
new file mode 100644
index 00000000000..0391e2d9b86
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.expected
@@ -0,0 +1,11 @@
+classExprs
+| test.kt:3:20:3:36 | Class> | Class> |
+| test.kt:3:39:3:70 | Class extends CharSequence> | Class extends CharSequence> |
+| test.kt:3:73:3:94 | Class | Class |
+| test.kt:3:97:3:120 | Class> | Class> |
+| test.kt:3:97:3:120 | Class>[] | Class>[] |
+#select
+| test.kt:3:20:3:36 | c1 | Class> |
+| test.kt:3:39:3:70 | c2 | Class extends CharSequence> |
+| test.kt:3:73:3:94 | c3 | Class |
+| test.kt:3:97:3:120 | c4 | Class>[] |
diff --git a/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.kt b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.kt
new file mode 100644
index 00000000000..15d03914a1a
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.kt
@@ -0,0 +1,3 @@
+import kotlin.reflect.KClass
+
+annotation class A(val c1: KClass<*>, val c2: KClass, val c3: KClass, val c4: Array>) { }
diff --git a/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.ql b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.ql
new file mode 100644
index 00000000000..65576a7c19d
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation-accessor-result-type/test.ql
@@ -0,0 +1,11 @@
+import java
+
+query predicate classExprs(Expr e, string tstr) {
+ exists(e.getFile().getRelativePath()) and
+ tstr = e.getType().toString() and
+ tstr.matches("%Class%")
+}
+
+from Method m
+where m.getDeclaringType().fromSource()
+select m, m.getReturnType().toString()
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/Annot0j.java b/java/ql/test-kotlin2/library-tests/annotation_classes/Annot0j.java
new file mode 100644
index 00000000000..acadc19cc97
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/Annot0j.java
@@ -0,0 +1,3 @@
+public @interface Annot0j {
+ int abc() default 0;
+}
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/Annot1j.java b/java/ql/test-kotlin2/library-tests/annotation_classes/Annot1j.java
new file mode 100644
index 00000000000..b3b1f072eee
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/Annot1j.java
@@ -0,0 +1,15 @@
+public @interface Annot1j {
+ int a() default 2;
+
+ String b() default "ab";
+
+ Class c() default X.class;
+
+ Y d() default Y.A;
+
+ Y[] e() default { Y.A, Y.B };
+
+ Annot0j f() default @Annot0j(
+ abc = 1
+ );
+}
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected
new file mode 100644
index 00000000000..dfec79078ce
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected
@@ -0,0 +1,283 @@
+Annot0j.java:
+# 0| [CompilationUnit] Annot0j
+# 1| 1: [Interface] Annot0j
+# 2| 1: [Method] abc
+# 2| 3: [TypeAccess] int
+Annot1j.java:
+# 0| [CompilationUnit] Annot1j
+# 1| 1: [Interface] Annot1j
+# 2| 1: [Method] a
+# 2| 3: [TypeAccess] int
+# 4| 2: [Method] b
+# 4| 3: [TypeAccess] String
+# 6| 3: [Method] c
+# 6| 3: [TypeAccess] Class<>
+# 8| 4: [Method] d
+# 8| 3: [TypeAccess] Y
+# 10| 5: [Method] e
+# 10| 3: [ArrayTypeAccess] ...[]
+# 10| 0: [TypeAccess] Y
+# 12| 6: [Method] f
+# 12| 3: [TypeAccess] Annot0j
+def.kt:
+# 0| [CompilationUnit] def
+# 0| 1: [Class] DefKt
+# 45| 2: [Method] fn
+#-----| 1: (Annotations)
+# 45| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+#-----| 2: (Generic Parameters)
+# 46| 0: [TypeVariable] T
+# 45| 3: [TypeAccess] Unit
+#-----| 4: (Parameters)
+# 46| 0: [Parameter] a
+#-----| -1: (Annotations)
+# 46| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 46| 0: [TypeAccess] Annot0k
+# 46| 5: [BlockStmt] { ... }
+# 47| 0: [ExprStmt] ;
+# 47| 0: [MethodCall] println(...)
+# 47| -1: [TypeAccess] ConsoleKt
+# 47| 0: [MethodCall] a(...)
+# 47| -1: [VarAccess] a
+# 49| 1: [LocalVariableDeclStmt] var ...;
+# 49| 1: [LocalVariableDeclExpr] x
+# 50| 0: [IntegerLiteral] 10
+# 53| 3: [Method] getP
+#-----| 1: (Annotations)
+# 54| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 53| 3: [TypeAccess] int
+# 53| 5: [BlockStmt] { ... }
+# 53| 0: [ReturnStmt] return ...
+# 53| 0: [VarAccess] DefKt.p
+# 53| -1: [TypeAccess] DefKt
+# 53| 4: [FieldDeclaration] int p;
+#-----| -2: (Annotations)
+# 56| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 53| -1: [TypeAccess] int
+# 57| 0: [IntegerLiteral] 5
+# 53| 5: [Method] setP
+#-----| 1: (Annotations)
+# 55| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 53| 3: [TypeAccess] Unit
+#-----| 4: (Parameters)
+# 53| 0: [Parameter]
+# 53| 0: [TypeAccess] int
+# 53| 5: [BlockStmt] { ... }
+# 53| 0: [ExprStmt] ;
+# 53| 0: [AssignExpr] ...=...
+# 53| 0: [VarAccess] DefKt.p
+# 53| -1: [TypeAccess] DefKt
+# 53| 1: [VarAccess]
+# 59| 6: [ExtensionMethod] myExtension
+# 59| 3: [TypeAccess] Unit
+#-----| 4: (Parameters)
+# 59| 0: [Parameter]
+#-----| -1: (Annotations)
+# 59| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 59| 0: [TypeAccess] String
+# 59| 5: [BlockStmt] { ... }
+# 5| 2: [Interface] Annot0k
+#-----| -3: (Annotations)
+# 0| 1: [Annotation] Retention
+# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
+# 0| -1: [TypeAccess] RetentionPolicy
+# 0| 2: [Annotation] Target
+# 0| 1: [ArrayInit] {...}
+# 0| 1: [VarAccess] ElementType.TYPE
+# 0| -1: [TypeAccess] ElementType
+# 0| 2: [VarAccess] ElementType.FIELD
+# 0| -1: [TypeAccess] ElementType
+# 0| 3: [VarAccess] ElementType.METHOD
+# 0| -1: [TypeAccess] ElementType
+# 0| 4: [VarAccess] ElementType.PARAMETER
+# 0| -1: [TypeAccess] ElementType
+# 0| 5: [VarAccess] ElementType.CONSTRUCTOR
+# 0| -1: [TypeAccess] ElementType
+# 0| 6: [VarAccess] ElementType.LOCAL_VARIABLE
+# 0| -1: [TypeAccess] ElementType
+# 0| 7: [VarAccess] ElementType.ANNOTATION_TYPE
+# 0| -1: [TypeAccess] ElementType
+# 0| 8: [VarAccess] ElementType.TYPE_PARAMETER
+# 0| -1: [TypeAccess] ElementType
+# 0| 9: [VarAccess] ElementType.TYPE_USE
+# 0| -1: [TypeAccess] ElementType
+# 5| 3: [Annotation] Target
+# 5| 1: [ArrayInit] {...}
+# 5| 1: [VarAccess] AnnotationTarget.CLASS
+# 5| -1: [TypeAccess] AnnotationTarget
+# 6| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
+# 6| -1: [TypeAccess] AnnotationTarget
+# 7| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
+# 7| -1: [TypeAccess] AnnotationTarget
+# 8| 4: [VarAccess] AnnotationTarget.PROPERTY
+# 8| -1: [TypeAccess] AnnotationTarget
+# 9| 5: [VarAccess] AnnotationTarget.FIELD
+# 9| -1: [TypeAccess] AnnotationTarget
+# 10| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
+# 10| -1: [TypeAccess] AnnotationTarget
+# 11| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
+# 11| -1: [TypeAccess] AnnotationTarget
+# 12| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
+# 12| -1: [TypeAccess] AnnotationTarget
+# 13| 9: [VarAccess] AnnotationTarget.FUNCTION
+# 13| -1: [TypeAccess] AnnotationTarget
+# 14| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
+# 14| -1: [TypeAccess] AnnotationTarget
+# 15| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
+# 15| -1: [TypeAccess] AnnotationTarget
+# 16| 12: [VarAccess] AnnotationTarget.TYPE
+# 16| -1: [TypeAccess] AnnotationTarget
+# 18| 13: [VarAccess] AnnotationTarget.FILE
+# 18| -1: [TypeAccess] AnnotationTarget
+# 19| 14: [VarAccess] AnnotationTarget.TYPEALIAS
+# 19| -1: [TypeAccess] AnnotationTarget
+# 21| 1: [Method] a
+#-----| 1: (Annotations)
+# 21| 1: [Annotation] JvmName
+# 21| 1: [StringLiteral] "a"
+# 21| 3: [TypeAccess] int
+# 23| 3: [Interface] Annot1k
+#-----| -3: (Annotations)
+# 0| 1: [Annotation] Retention
+# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
+# 0| -1: [TypeAccess] RetentionPolicy
+# 23| 2: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 25| 1: [Method] a
+# 25| 3: [TypeAccess] int
+# 26| 2: [Method] b
+# 26| 3: [TypeAccess] String
+# 27| 3: [Method] c
+# 27| 3: [TypeAccess] Class>
+# 27| 0: [WildcardTypeAccess] ? ...
+# 28| 4: [Method] d
+# 28| 3: [TypeAccess] Y
+# 29| 5: [Method] e
+# 29| 3: [TypeAccess] Y[]
+# 29| 0: [TypeAccess] Y
+# 30| 6: [Method] f
+# 30| 3: [TypeAccess] Annot0k
+# 33| 4: [Class] X
+# 33| 1: [Constructor] X
+# 33| 5: [BlockStmt] { ... }
+# 33| 0: [SuperConstructorInvocationStmt] super(...)
+# 33| 1: [BlockStmt] { ... }
+# 34| 5: [Class] Y
+# 34| 2: [Constructor] Y
+# 34| 5: [BlockStmt] { ... }
+# 34| 0: [ExprStmt] ;
+# 34| 0: [ClassInstanceExpr] new Enum(...)
+# 34| -3: [TypeAccess] Enum
+# 34| 0: [TypeAccess] Y
+# 34| 0: [NullLiteral] null
+# 34| 1: [IntegerLiteral] 0
+# 34| 1: [BlockStmt] { ... }
+# 34| 3: [Method] getEntries
+# 34| 3: [TypeAccess] EnumEntries
+# 34| 0: [TypeAccess] Y
+# 34| 4: [Method] valueOf
+# 34| 3: [TypeAccess] Y
+#-----| 4: (Parameters)
+# 34| 0: [Parameter] value
+# 34| 0: [TypeAccess] String
+# 34| 5: [Method] values
+# 34| 3: [TypeAccess] Y[]
+# 34| 0: [TypeAccess] Y
+# 35| 6: [FieldDeclaration] Y A;
+# 35| -1: [TypeAccess] Y
+# 35| 0: [ClassInstanceExpr] new Y(...)
+# 35| -3: [TypeAccess] Y
+# 35| 7: [FieldDeclaration] Y B;
+# 35| -1: [TypeAccess] Y
+# 35| 0: [ClassInstanceExpr] new Y(...)
+# 35| -3: [TypeAccess] Y
+# 35| 8: [FieldDeclaration] Y C;
+# 35| -1: [TypeAccess] Y
+# 35| 0: [ClassInstanceExpr] new Y(...)
+# 35| -3: [TypeAccess] Y
+# 38| 6: [Class] Z
+#-----| -3: (Annotations)
+# 38| 1: [Annotation] Annot0k
+# 38| 1: [IntegerLiteral] 1
+# 39| 2: [Annotation] Annot1k
+# 25| 1: [IntegerLiteral] 2
+# 26| 2: [StringLiteral] "ab"
+# 27| 3: [TypeLiteral] X.class
+# 27| 0: [TypeAccess] X
+# 30| 4: [Annotation] Annot0k
+# 30| 1: [IntegerLiteral] 1
+# 39| 5: [VarAccess] Y.B
+# 39| -1: [TypeAccess] Y
+# 39| 6: [ArrayInit] {...}
+# 39| 1: [VarAccess] Y.C
+# 39| -1: [TypeAccess] Y
+# 39| 2: [VarAccess] Y.A
+# 39| -1: [TypeAccess] Y
+# 41| 1: [Constructor] Z
+#-----| 1: (Annotations)
+# 41| 1: [Annotation] Annot0k
+# 21| 1: [IntegerLiteral] 0
+# 41| 5: [BlockStmt] { ... }
+# 42| 0: [SuperConstructorInvocationStmt] super(...)
+# 41| 1: [BlockStmt] { ... }
+use.java:
+# 0| [CompilationUnit] use
+# 1| 1: [Class] use
+#-----| -1: (Base Types)
+# 1| 0: [TypeAccess] Annot0k
+# 3| 2: [Method] a
+#-----| 1: (Annotations)
+# 2| 1: [Annotation] Override
+# 3| 3: [TypeAccess] int
+# 3| 5: [BlockStmt] { ... }
+# 3| 0: [ReturnStmt] return ...
+# 3| 0: [IntegerLiteral] 1
+# 6| 3: [Method] annotationType
+#-----| 1: (Annotations)
+# 5| 1: [Annotation] Override
+# 6| 3: [TypeAccess] Class extends Annotation>
+# 6| 0: [WildcardTypeAccess] ? ...
+# 6| 0: [TypeAccess] Annotation
+# 6| 5: [BlockStmt] { ... }
+# 7| 0: [ReturnStmt] return ...
+# 7| 0: [NullLiteral] null
+# 14| 4: [Class] Z
+#-----| -3: (Annotations)
+# 10| 1: [Annotation] Annot0j
+# 10| 1: [IntegerLiteral] 1
+# 11| 2: [Annotation] Annot1j
+# 11| 1: [IntegerLiteral] 1
+# 11| 2: [StringLiteral] "ac"
+# 11| 3: [TypeLiteral] X.class
+# 11| 0: [TypeAccess] X
+# 11| 4: [VarAccess] Y.B
+# 11| -1: [TypeAccess] Y
+# 11| 5: [ArrayInit] {...}
+# 11| 3: [VarAccess] Y.C
+# 11| -1: [TypeAccess] Y
+# 11| 4: [VarAccess] Y.A
+# 11| -1: [TypeAccess] Y
+# 11| 6: [Annotation] Annot0j
+# 11| 1: [IntegerLiteral] 2
+# 12| 3: [Annotation] Annot0k
+# 12| 1: [IntegerLiteral] 1
+# 13| 4: [Annotation] Annot1k
+# 13| 1: [IntegerLiteral] 1
+# 13| 2: [StringLiteral] "ac"
+# 13| 3: [TypeLiteral] X.class
+# 13| 0: [TypeAccess] X
+# 13| 4: [VarAccess] Y.B
+# 13| -1: [TypeAccess] Y
+# 13| 5: [ArrayInit] {...}
+# 13| 3: [VarAccess] Y.C
+# 13| -1: [TypeAccess] Y
+# 13| 4: [VarAccess] Y.A
+# 13| -1: [TypeAccess] Y
+# 13| 6: [Annotation] Annot0k
+# 13| 1: [IntegerLiteral] 2
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.qlref b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.qlref
new file mode 100644
index 00000000000..c7fd5faf239
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.qlref
@@ -0,0 +1 @@
+semmle/code/java/PrintAst.ql
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected
new file mode 100644
index 00000000000..cf47ffc15bd
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected
@@ -0,0 +1,82 @@
+#select
+| Annot0j.java:1:19:1:25 | Annot0j | Interface |
+| Annot1j.java:1:19:1:25 | Annot1j | Interface |
+| def.kt:0:0:0:0 | DefKt | Class |
+| def.kt:5:1:21:60 | Annot0k | Interface |
+| def.kt:23:1:31:1 | Annot1k | Interface |
+| def.kt:33:1:33:10 | X | Class |
+| def.kt:34:1:36:1 | Y | Class |
+| def.kt:38:1:43:1 | Z | Class |
+| use.java:1:14:1:16 | use | Class |
+| use.java:14:18:14:18 | Z | Class |
+annotationDeclarations
+| Annot0j.java:1:19:1:25 | Annot0j | Annot0j.java:2:9:2:11 | abc |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:2:9:2:9 | a |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:4:12:4:12 | b |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:6:11:6:11 | c |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:8:7:8:7 | d |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:10:9:10:9 | e |
+| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:12:13:12:13 | f |
+| def.kt:5:1:21:60 | Annot0k | def.kt:21:26:21:59 | a |
+| def.kt:23:1:31:1 | Annot1k | def.kt:25:5:25:18 | a |
+| def.kt:23:1:31:1 | Annot1k | def.kt:26:5:26:24 | b |
+| def.kt:23:1:31:1 | Annot1k | def.kt:27:5:27:31 | c |
+| def.kt:23:1:31:1 | Annot1k | def.kt:28:5:28:18 | d |
+| def.kt:23:1:31:1 | Annot1k | def.kt:29:5:29:32 | e |
+| def.kt:23:1:31:1 | Annot1k | def.kt:30:5:30:31 | f |
+annotations
+| def.kt:23:1:23:8 | Annot0k | def.kt:23:1:31:1 | Annot1k | def.kt:5:1:21:60 | Annot0k |
+| def.kt:30:22:30:31 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
+| def.kt:38:1:38:17 | Annot0k | def.kt:38:1:43:1 | Z | def.kt:5:1:21:60 | Annot0k |
+| def.kt:39:1:39:40 | Annot1k | def.kt:38:1:43:1 | Z | def.kt:23:1:31:1 | Annot1k |
+| def.kt:41:5:41:12 | Annot0k | def.kt:41:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
+| def.kt:45:1:45:8 | Annot0k | def.kt:45:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
+| def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k |
+| def.kt:54:1:54:12 | Annot0k | def.kt:53:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
+| def.kt:55:1:55:12 | Annot0k | def.kt:53:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
+| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
+| def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | | def.kt:5:1:21:60 | Annot0k |
+| use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j |
+| use.java:11:5:11:90 | Annot1j | use.java:14:18:14:18 | Z | Annot1j.java:1:19:1:25 | Annot1j |
+| use.java:11:73:11:89 | Annot0j | use.java:11:5:11:90 | Annot1j | Annot0j.java:1:19:1:25 | Annot0j |
+| use.java:12:5:12:19 | Annot0k | use.java:14:18:14:18 | Z | def.kt:5:1:21:60 | Annot0k |
+| use.java:13:5:13:88 | Annot1k | use.java:14:18:14:18 | Z | def.kt:23:1:31:1 | Annot1k |
+| use.java:13:73:13:87 | Annot0k | use.java:13:5:13:88 | Annot1k | def.kt:5:1:21:60 | Annot0k |
+annotationValues
+| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
+| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
+| def.kt:0:0:0:0 | Target | def.kt:0:0:0:0 | {...} |
+| def.kt:5:1:20:1 | Target | def.kt:5:9:19:30 | {...} |
+| def.kt:21:26:21:42 | JvmName | def.kt:21:39:21:41 | "a" |
+| def.kt:23:1:23:8 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:30:22:30:31 | Annot0k | def.kt:30:30:30:30 | 1 |
+| def.kt:38:1:38:17 | Annot0k | def.kt:38:16:38:16 | 1 |
+| def.kt:39:1:39:40 | Annot1k | def.kt:25:18:25:18 | 2 |
+| def.kt:39:1:39:40 | Annot1k | def.kt:26:21:26:24 | "ab" |
+| def.kt:39:1:39:40 | Annot1k | def.kt:27:24:27:31 | X.class |
+| def.kt:39:1:39:40 | Annot1k | def.kt:30:22:30:31 | Annot0k |
+| def.kt:39:1:39:40 | Annot1k | def.kt:39:16:39:16 | Y.B |
+| def.kt:39:1:39:40 | Annot1k | def.kt:39:23:39:39 | {...} |
+| def.kt:41:5:41:12 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:45:1:45:8 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:46:21:46:28 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:54:1:54:12 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:55:1:55:12 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:56:1:56:14 | Annot0k | def.kt:21:59:21:59 | 0 |
+| def.kt:59:5:59:21 | Annot0k | def.kt:21:59:21:59 | 0 |
+| use.java:10:5:10:21 | Annot0j | use.java:10:20:10:20 | 1 |
+| use.java:11:5:11:90 | Annot1j | use.java:11:18:11:18 | 1 |
+| use.java:11:5:11:90 | Annot1j | use.java:11:25:11:28 | "ac" |
+| use.java:11:5:11:90 | Annot1j | use.java:11:35:11:41 | X.class |
+| use.java:11:5:11:90 | Annot1j | use.java:11:48:11:50 | Y.B |
+| use.java:11:5:11:90 | Annot1j | use.java:11:57:11:66 | {...} |
+| use.java:11:5:11:90 | Annot1j | use.java:11:73:11:89 | Annot0j |
+| use.java:11:73:11:89 | Annot0j | use.java:11:88:11:88 | 2 |
+| use.java:12:5:12:19 | Annot0k | use.java:12:18:12:18 | 1 |
+| use.java:13:5:13:88 | Annot1k | use.java:13:18:13:18 | 1 |
+| use.java:13:5:13:88 | Annot1k | use.java:13:25:13:28 | "ac" |
+| use.java:13:5:13:88 | Annot1k | use.java:13:35:13:41 | X.class |
+| use.java:13:5:13:88 | Annot1k | use.java:13:48:13:50 | Y.B |
+| use.java:13:5:13:88 | Annot1k | use.java:13:57:13:66 | {...} |
+| use.java:13:5:13:88 | Annot1k | use.java:13:73:13:87 | Annot0k |
+| use.java:13:73:13:87 | Annot0k | use.java:13:86:13:86 | 2 |
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/classes.ql b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.ql
new file mode 100644
index 00000000000..936165cf023
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/classes.ql
@@ -0,0 +1,20 @@
+import java
+
+from ClassOrInterface x
+where x.fromSource()
+select x, x.getPrimaryQlClasses()
+
+query predicate annotationDeclarations(AnnotationType at, AnnotationElement ae) {
+ at.fromSource() and
+ at.getAnAnnotationElement() = ae
+}
+
+query predicate annotations(Annotation a, Element e, AnnotationType at) {
+ at.fromSource() and
+ a.getAnnotatedElement() = e and
+ at = a.getType()
+}
+
+query predicate annotationValues(Annotation a, Expr v) {
+ a.getValue(_) = v and v.getFile().isSourceFile()
+}
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/def.kt b/java/ql/test-kotlin2/library-tests/annotation_classes/def.kt
new file mode 100644
index 00000000000..f499d1026fc
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/def.kt
@@ -0,0 +1,62 @@
+@file:Annot0k
+
+import kotlin.reflect.KClass
+
+@Target(AnnotationTarget.CLASS,
+ AnnotationTarget.ANNOTATION_CLASS,
+ AnnotationTarget.TYPE_PARAMETER,
+ AnnotationTarget.PROPERTY,
+ AnnotationTarget.FIELD,
+ AnnotationTarget.LOCAL_VARIABLE, // TODO
+ AnnotationTarget.VALUE_PARAMETER,
+ AnnotationTarget.CONSTRUCTOR,
+ AnnotationTarget.FUNCTION,
+ AnnotationTarget.PROPERTY_GETTER,
+ AnnotationTarget.PROPERTY_SETTER,
+ AnnotationTarget.TYPE, // TODO
+ //AnnotationTarget.EXPRESSION, // TODO
+ AnnotationTarget.FILE, // TODO
+ AnnotationTarget.TYPEALIAS // TODO
+)
+annotation class Annot0k(@get:JvmName("a") val abc: Int = 0)
+
+@Annot0k
+annotation class Annot1k(
+ val a: Int = 2,
+ val b: String = "ab",
+ val c: KClass<*> = X::class,
+ val d: Y = Y.A,
+ val e: Array = [Y.A, Y.B],
+ val f: Annot0k = Annot0k(1)
+)
+
+class X {}
+enum class Y {
+ A,B,C
+}
+
+@Annot0k(abc = 1)
+@Annot1k(d = Y.B, e = arrayOf(Y.C, Y.A))
+class Z {
+ @Annot0k
+ constructor(){}
+}
+
+@Annot0k
+fun <@Annot0k T> fn(@Annot0k a: Annot0k) {
+ println(a.abc)
+
+ @Annot0k
+ var x = 10
+}
+
+@Annot0k
+@get:Annot0k
+@set:Annot0k
+@field:Annot0k
+var p: @Annot0k Int = 5
+
+fun @receiver:Annot0k String.myExtension() { }
+
+@Annot0k
+typealias AAA = Z
diff --git a/java/ql/test-kotlin2/library-tests/annotation_classes/use.java b/java/ql/test-kotlin2/library-tests/annotation_classes/use.java
new file mode 100644
index 00000000000..ec0dd0fa447
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotation_classes/use.java
@@ -0,0 +1,15 @@
+public class use implements Annot0k {
+ @Override
+ public int a() { return 1; }
+
+ @Override
+ public Class extends java.lang.annotation.Annotation> annotationType() {
+ return null;
+ }
+
+ @Annot0j(abc = 1)
+ @Annot1j(a = 1, b = "ac", c = X.class, d = Y.B, e = {Y.C, Y.A}, f = @Annot0j(abc = 2))
+ @Annot0k(a = 1)
+ @Annot1k(a = 1, b = "ac", c = X.class, d = Y.B, e = {Y.C, Y.A}, f = @Annot0k(a = 2))
+ public class Z { }
+}
diff --git a/java/ql/test-kotlin2/library-tests/annotations/jvmName/Test.java b/java/ql/test-kotlin2/library-tests/annotations/jvmName/Test.java
new file mode 100644
index 00000000000..f76fd8e018d
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotations/jvmName/Test.java
@@ -0,0 +1,5 @@
+class Test {
+ public void m() {
+ int i = new X().getX_prop();
+ }
+}
\ No newline at end of file
diff --git a/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected
new file mode 100644
index 00000000000..a3313a519ca
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.expected
@@ -0,0 +1,8 @@
+| Test.java:2:17:2:17 | m | m | m |
+| test.kt:3:9:4:18 | getX_prop | getX_prop | getX |
+| test.kt:6:5:6:19 | getX | getX | getX |
+| test.kt:8:5:10:19 | changeY | changeY | setY |
+| test.kt:8:5:10:19 | y | y | getY |
+| test.kt:12:5:13:15 | method | method | fn |
+| test.kt:17:5:17:14 | p | p | p |
+| test.kt:18:5:18:32 | w | w | q |
diff --git a/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.kt b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.kt
new file mode 100644
index 00000000000..eea98625d5c
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.kt
@@ -0,0 +1,18 @@
+class X {
+ val x: Int
+ @JvmName("getX_prop")
+ get() = 15
+
+ fun getX() = 10
+
+ @get:JvmName("y")
+ @set:JvmName("changeY")
+ var y: Int = 23
+
+ @JvmName("method")
+ fun fn() {}
+}
+
+annotation class Ann(
+ val p: Int,
+ @get:JvmName("w") val q: Int)
diff --git a/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.ql b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.ql
new file mode 100644
index 00000000000..7285e3a1053
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/annotations/jvmName/test.ql
@@ -0,0 +1,5 @@
+import java
+
+query predicate names(Method m, string name, string kotlinName) {
+ m.fromSource() and name = m.getName() and kotlinName = m.getKotlinName()
+}
diff --git a/java/ql/test-kotlin2/library-tests/arrays-with-variances/User.java b/java/ql/test-kotlin2/library-tests/arrays-with-variances/User.java
new file mode 100644
index 00000000000..d3c00088d13
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/arrays-with-variances/User.java
@@ -0,0 +1,11 @@
+public class User {
+
+ public static void test() {
+
+ TakesArrayList tal = new TakesArrayList();
+ tal.invarArray(null);
+ // Using one method suffices to get the extractor to describe all the methods defined on takesArrayList.
+
+ }
+
+}
diff --git a/java/ql/test-kotlin2/library-tests/arrays-with-variances/takesArrayList.kt b/java/ql/test-kotlin2/library-tests/arrays-with-variances/takesArrayList.kt
new file mode 100644
index 00000000000..1278d866d84
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/arrays-with-variances/takesArrayList.kt
@@ -0,0 +1,112 @@
+public class TakesArrayList {
+
+ // There is a Java user to flag up any problems, as if the .class file differs from my
+ // claimed types above we'll see two overloads and two parameter types instead of one.
+
+ // Test how Array types with a variance should be lowered:
+ fun invarArray(a: Array) { }
+ fun outArray(a: Array) { }
+ fun inArray(a: Array) { }
+
+ fun invarInvarArray(a: Array>) { }
+ fun invarOutArray(a: Array>) { }
+ fun invarInArray(a: Array>) { }
+
+ fun outInvarArray(a: Array>) { }
+ fun outOutArray(a: Array>) { }
+ fun outInArray(a: Array>) { }
+
+ fun inInvarArray(a: Array>) { }
+ fun inOutArray(a: Array>) { }
+ fun inInArray(a: Array>) { }
+
+ // Test how Array type arguments with a variance should acquire implicit wildcards:
+ fun invarArrayList(l: List>) { }
+ fun outArrayList(l: List>) { }
+ fun inArrayList(l: List>) { }
+
+ // Check the cases of nested arrays:
+ fun invarInvarArrayList(l: List>>) { }
+ fun invarOutArrayList(l: List>>) { }
+ fun invarInArrayList(l: List>>) { }
+ fun outInvarArrayList(l: List>>) { }
+ fun outOutArrayList(l: List>>) { }
+ fun outInArrayList(l: List>>) { }
+ fun inInvarArrayList(l: List>>) { }
+ fun inOutArrayList(l: List>>) { }
+ fun inInArrayList(l: List>>) { }
+
+ // Now check all of that again for Comparable, whose type parameter is contravariant:
+ fun invarArrayComparable(c: Comparable>) { }
+ fun outArrayComparable(c: Comparable>) { }
+ fun inArrayComparable(c: Comparable>) { }
+
+ fun invarInvarArrayComparable(c: Comparable>>) { }
+ fun invarOutArrayComparable(c: Comparable>>) { }
+ fun invarInArrayComparable(c: Comparable>>) { }
+ fun outInvarArrayComparable(c: Comparable>>) { }
+ fun outOutArrayComparable(c: Comparable>>) { }
+ fun outInArrayComparable(c: Comparable>>) { }
+ fun inInvarArrayComparable(c: Comparable>>) { }
+ fun inOutArrayComparable(c: Comparable>>) { }
+ fun inInArrayComparable(c: Comparable>>) { }
+
+ // ... duplicate all of that for a final array element (I choose String as a final type), which sometimes suppresses addition of `? extends ...`
+ fun invarArrayListFinal(l: List>) { }
+ fun outArrayListFinal(l: List>) { }
+ fun inArrayListFinal(l: List>) { }
+
+ fun invarInvarArrayListFinal(l: List>>) { }
+ fun invarOutArrayListFinal(l: List>>) { }
+ fun invarInArrayListFinal(l: List>>) { }
+ fun outInvarArrayListFinal(l: List>>) { }
+ fun outOutArrayListFinal(l: List>>) { }
+ fun outInArrayListFinal(l: List>>) { }
+ fun inInvarArrayListFinal(l: List>>) { }
+ fun inOutArrayListFinal(l: List>>) { }
+ fun inInArrayListFinal(l: List>>) { }
+
+ fun invarArrayComparableFinal(c: Comparable>) { }
+ fun outArrayComparableFinal(c: Comparable>) { }
+ fun inArrayComparableFinal(c: Comparable>) { }
+
+ fun invarInvarArrayComparableFinal(c: Comparable>>) { }
+ fun invarOutArrayComparableFinal(c: Comparable>>) { }
+ fun invarInArrayComparableFinal(c: Comparable>>) { }
+ fun outInvarArrayComparableFinal(c: Comparable>>) { }
+ fun outOutArrayComparableFinal(c: Comparable>>) { }
+ fun outInArrayComparableFinal(c: Comparable>>) { }
+ fun inInvarArrayComparableFinal(c: Comparable>>) { }
+ fun inOutArrayComparableFinal(c: Comparable>>) { }
+ fun inInArrayComparableFinal(c: Comparable>>) { }
+
+ // ... and duplicate it once more with Any as the array element, which can suppress adding `? super ...`
+ fun invarArrayListAny(l: List>) { }
+ fun outArrayListAny(l: List>) { }
+ fun inArrayListAny(l: List>) { }
+
+ fun invarInvarArrayListAny(l: List>>) { }
+ fun invarOutArrayListAny(l: List>>) { }
+ fun invarInArrayListAny(l: List>>) { }
+ fun outInvarArrayListAny(l: List>>) { }
+ fun outOutArrayListAny(l: List>>) { }
+ fun outInArrayListAny(l: List>>) { }
+ fun inInvarArrayListAny(l: List>>) { }
+ fun inOutArrayListAny(l: List>>) { }
+ fun inInArrayListAny(l: List>>) { }
+
+ fun invarArrayComparableAny(c: Comparable>) { }
+ fun outArrayComparableAny(c: Comparable>) { }
+ fun inArrayComparableAny(c: Comparable>) { }
+
+ fun invarInvarArrayComparableAny(c: Comparable>>) { }
+ fun invarOutArrayComparableAny(c: Comparable>>) { }
+ fun invarInArrayComparableAny(c: Comparable>>) { }
+ fun outInvarArrayComparableAny(c: Comparable>>) { }
+ fun outOutArrayComparableAny(c: Comparable>>) { }
+ fun outInArrayComparableAny(c: Comparable>>) { }
+ fun inInvarArrayComparableAny(c: Comparable>>) { }
+ fun inOutArrayComparableAny(c: Comparable>>) { }
+ fun inInArrayComparableAny(c: Comparable>>) { }
+
+}
diff --git a/java/ql/test-kotlin2/library-tests/arrays-with-variances/test.expected b/java/ql/test-kotlin2/library-tests/arrays-with-variances/test.expected
new file mode 100644
index 00000000000..d552925819e
--- /dev/null
+++ b/java/ql/test-kotlin2/library-tests/arrays-with-variances/test.expected
@@ -0,0 +1,86 @@
+broken
+#select
+| inArray | Object[] |
+| inArrayComparable | Comparable super Object[]> |
+| inArrayComparableAny | Comparable super Object[]> |
+| inArrayComparableFinal | Comparable super Object[]> |
+| inArrayList | List extends Object[]> |
+| inArrayListAny | List