diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 4091ef97e4d7..19784b530e7a 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -6,7 +6,7 @@ ### Deprecated APIs -* The `NonThrowing` class (`semmle.code.cpp.models.interfaces.NonThrowing`) has been deprecated. Please use the `NonCppThrowingFunction` class instead. +* The `NonThrowingFunction` class (`semmle.code.cpp.models.interfaces.NonThrowing.NonThrowingFunction`) has been deprecated. Please use the `NonCppThrowingFunction` class instead. ## 2.1.1 diff --git a/cpp/ql/lib/change-notes/2024-12-04-guard-conditions.md b/cpp/ql/lib/change-notes/2024-12-04-guard-conditions.md new file mode 100644 index 000000000000..f60a6a2970a6 --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-12-04-guard-conditions.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The `Guards` library (`semmle.code.cpp.controlflow.Guards`) has been improved to recognize more guard conditions. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/released/3.0.0.md b/cpp/ql/lib/change-notes/released/3.0.0.md index 5945c94c566d..a2847031fc95 100644 --- a/cpp/ql/lib/change-notes/released/3.0.0.md +++ b/cpp/ql/lib/change-notes/released/3.0.0.md @@ -6,4 +6,4 @@ ### Deprecated APIs -* The `NonThrowing` class (`semmle.code.cpp.models.interfaces.NonThrowing`) has been deprecated. Please use the `NonCppThrowingFunction` class instead. +* The `NonThrowingFunction` class (`semmle.code.cpp.models.interfaces.NonThrowing.NonThrowingFunction`) has been deprecated. Please use the `NonCppThrowingFunction` class instead. diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll index 9b4d28430ff3..bb2b71e65495 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll @@ -5,6 +5,7 @@ import cpp import semmle.code.cpp.ir.IR +private import semmle.code.cpp.ir.ValueNumbering private import semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr private import semmle.code.cpp.ir.implementation.raw.internal.InstructionTag @@ -59,26 +60,17 @@ class MatchValue extends AbstractValue, TMatchValue { } /** - * A Boolean condition in the AST that guards one or more basic blocks. + * A Boolean condition in the AST that guards one or more basic blocks. This includes + * operands of logical operators but not switch statements. */ -cached -class GuardCondition extends Expr { - cached - GuardCondition() { - exists(IRGuardCondition ir | this = ir.getUnconvertedResultExpression()) - or - // no binary operators in the IR - this.(BinaryLogicalOperation).getAnOperand() instanceof GuardCondition - } - +abstract private class GuardConditionImpl extends Expr { /** * Holds if this condition controls `controlled`, meaning that `controlled` is only * entered if the value of this condition is `v`. * * For details on what "controls" mean, see the QLDoc for `controls`. */ - cached - predicate valueControls(BasicBlock controlled, AbstractValue v) { none() } + abstract predicate valueControls(BasicBlock controlled, AbstractValue v); /** * Holds if this condition controls `controlled`, meaning that `controlled` is only @@ -106,67 +98,64 @@ class GuardCondition extends Expr { * being short-circuited) then it will only control blocks dominated by the * true (for `&&`) or false (for `||`) branch. */ - cached final predicate controls(BasicBlock controlled, boolean testIsTrue) { this.valueControls(controlled, any(BooleanValue bv | bv.getValue() = testIsTrue)) } /** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { - none() - } + pragma[inline] + abstract predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue); /** * Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`. * If `isLessThan = false` then this implies `left >= right + k`. */ - cached - predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { none() } + pragma[inline] + abstract predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan); /** * Holds if (determined by this guard) `e < k` evaluates to `isLessThan` if * this expression evaluates to `value`. */ - cached - predicate comparesLt(Expr e, int k, boolean isLessThan, AbstractValue value) { none() } + pragma[inline] + abstract predicate comparesLt(Expr e, int k, boolean isLessThan, AbstractValue value); /** * Holds if (determined by this guard) `e < k` must be `isLessThan` in `block`. * If `isLessThan = false` then this implies `e >= k`. */ - cached - predicate ensuresLt(Expr e, int k, BasicBlock block, boolean isLessThan) { none() } + pragma[inline] + abstract predicate ensuresLt(Expr e, int k, BasicBlock block, boolean isLessThan); /** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { - none() - } + pragma[inline] + abstract predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue); /** * Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`. * If `areEqual = false` then this implies `left != right + k`. */ - cached - predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { none() } + pragma[inline] + abstract predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual); /** Holds if (determined by this guard) `e == k` evaluates to `areEqual` if this expression evaluates to `value`. */ - cached - predicate comparesEq(Expr e, int k, boolean areEqual, AbstractValue value) { none() } + pragma[inline] + abstract predicate comparesEq(Expr e, int k, boolean areEqual, AbstractValue value); /** * Holds if (determined by this guard) `e == k` must be `areEqual` in `block`. * If `areEqual = false` then this implies `e != k`. */ - cached - predicate ensuresEq(Expr e, int k, BasicBlock block, boolean areEqual) { none() } + pragma[inline] + abstract predicate ensuresEq(Expr e, int k, BasicBlock block, boolean areEqual); } +final class GuardCondition = GuardConditionImpl; + /** * A binary logical operator in the AST that guards one or more basic blocks. */ -private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { +private class GuardConditionFromBinaryLogicalOperator extends GuardConditionImpl { GuardConditionFromBinaryLogicalOperator() { this.(BinaryLogicalOperation).getAnOperand() instanceof GuardCondition } @@ -198,12 +187,14 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { ) } + pragma[inline] override predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { exists(boolean testIsTrue | this.comparesLt(left, right, k, isLessThan, testIsTrue) and this.controls(block, testIsTrue) ) } + pragma[inline] override predicate ensuresLt(Expr e, int k, BasicBlock block, boolean isLessThan) { exists(AbstractValue value | this.comparesLt(e, k, isLessThan, value) and this.valueControls(block, value) @@ -218,6 +209,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { ) } + pragma[inline] override predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { exists(boolean testIsTrue | this.comparesEq(left, right, k, areEqual, testIsTrue) and this.controls(block, testIsTrue) @@ -233,6 +225,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { ) } + pragma[inline] override predicate ensuresEq(Expr e, int k, BasicBlock block, boolean areEqual) { exists(AbstractValue value | this.comparesEq(e, k, areEqual, value) and this.valueControls(block, value) @@ -244,7 +237,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { * A Boolean condition in the AST that guards one or more basic blocks and has a corresponding IR * instruction. */ -private class GuardConditionFromIR extends GuardCondition { +private class GuardConditionFromIR extends GuardConditionImpl { IRGuardCondition ir; GuardConditionFromIR() { this = ir.getUnconvertedResultExpression() } @@ -255,6 +248,7 @@ private class GuardConditionFromIR extends GuardCondition { this.controlsBlock(controlled, v) } + pragma[inline] override predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { exists(Instruction li, Instruction ri | li.getUnconvertedResultExpression() = left and @@ -263,6 +257,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate comparesLt(Expr e, int k, boolean isLessThan, AbstractValue value) { exists(Instruction i | i.getUnconvertedResultExpression() = e and @@ -270,6 +265,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { exists(Instruction li, Instruction ri, boolean testIsTrue | li.getUnconvertedResultExpression() = left and @@ -279,6 +275,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate ensuresLt(Expr e, int k, BasicBlock block, boolean isLessThan) { exists(Instruction i, AbstractValue value | i.getUnconvertedResultExpression() = e and @@ -287,6 +284,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { exists(Instruction li, Instruction ri | li.getUnconvertedResultExpression() = left and @@ -295,6 +293,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { exists(Instruction li, Instruction ri, boolean testIsTrue | li.getUnconvertedResultExpression() = left and @@ -304,6 +303,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate comparesEq(Expr e, int k, boolean areEqual, AbstractValue value) { exists(Instruction i | i.getUnconvertedResultExpression() = e and @@ -311,6 +311,7 @@ private class GuardConditionFromIR extends GuardCondition { ) } + pragma[inline] override predicate ensuresEq(Expr e, int k, BasicBlock block, boolean areEqual) { exists(Instruction i, AbstractValue value | i.getUnconvertedResultExpression() = e and @@ -370,7 +371,6 @@ private predicate nonExcludedIRAndBasicBlock(IRBlock irb, BasicBlock controlled) * Note that `&&` and `||` don't have an explicit representation in the IR, * and therefore will not appear as IRGuardConditions. */ -cached class IRGuardCondition extends Instruction { Instruction branch; @@ -391,7 +391,7 @@ class IRGuardCondition extends Instruction { * gcc extension. * * The implementation of all four follows the same structure: Each relation - * has a cached user-facing predicate that. For example, + * has a user-facing predicate that. For example, * `GuardCondition::comparesEq` calls `compares_eq`. This predicate has * several cases that recursively decompose the relation to bring it to a * canonical form (i.e., a relation of the form `e1 == e2 + k`). The base @@ -401,7 +401,6 @@ class IRGuardCondition extends Instruction { * `e1 + k1 == e2 + k2` into canonical the form `e1 == e2 + (k2 - k1)`. */ - cached IRGuardCondition() { branch = getBranchForCondition(this) } /** @@ -410,7 +409,6 @@ class IRGuardCondition extends Instruction { * * For details on what "controls" mean, see the QLDoc for `controls`. */ - cached predicate valueControls(IRBlock controlled, AbstractValue v) { // This condition must determine the flow of control; that is, this // node must be a top-level condition. @@ -448,7 +446,6 @@ class IRGuardCondition extends Instruction { * being short-circuited) then it will only control blocks dominated by the * true (for `&&`) or false (for `||`) branch. */ - cached predicate controls(IRBlock controlled, boolean testIsTrue) { this.valueControls(controlled, any(BooleanValue bv | bv.getValue() = testIsTrue)) } @@ -457,7 +454,6 @@ class IRGuardCondition extends Instruction { * Holds if the control-flow edge `(pred, succ)` may be taken only if * the value of this condition is `v`. */ - cached predicate valueControlsEdge(IRBlock pred, IRBlock succ, AbstractValue v) { pred.getASuccessor() = succ and this.valueControls(pred, v) @@ -476,7 +472,6 @@ class IRGuardCondition extends Instruction { * Holds if the control-flow edge `(pred, succ)` may be taken only if * the value of this condition is `testIsTrue`. */ - cached final predicate controlsEdge(IRBlock pred, IRBlock succ, boolean testIsTrue) { this.valueControlsEdge(pred, succ, any(BooleanValue bv | bv.getValue() = testIsTrue)) } @@ -514,10 +509,10 @@ class IRGuardCondition extends Instruction { } /** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */ - cached + pragma[inline] predicate comparesLt(Operand left, Operand right, int k, boolean isLessThan, boolean testIsTrue) { exists(BooleanValue value | - compares_lt(this, left, right, k, isLessThan, value) and + compares_lt(valueNumber(this), left, right, k, isLessThan, value) and value.getValue() = testIsTrue ) } @@ -526,19 +521,20 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `op < k` evaluates to `isLessThan` if * this expression evaluates to `value`. */ - cached + pragma[inline] predicate comparesLt(Operand op, int k, boolean isLessThan, AbstractValue value) { - compares_lt(this, op, k, isLessThan, value) + compares_lt(valueNumber(this), op, k, isLessThan, value) } /** * Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`. * If `isLessThan = false` then this implies `left >= right + k`. */ - cached + pragma[inline] predicate ensuresLt(Operand left, Operand right, int k, IRBlock block, boolean isLessThan) { exists(AbstractValue value | - compares_lt(this, left, right, k, isLessThan, value) and this.valueControls(block, value) + compares_lt(valueNumber(this), left, right, k, isLessThan, value) and + this.valueControls(block, value) ) } @@ -546,10 +542,11 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `op < k` must be `isLessThan` in `block`. * If `isLessThan = false` then this implies `op >= k`. */ - cached + pragma[inline] predicate ensuresLt(Operand op, int k, IRBlock block, boolean isLessThan) { exists(AbstractValue value | - compares_lt(this, op, k, isLessThan, value) and this.valueControls(block, value) + compares_lt(valueNumber(this), op, k, isLessThan, value) and + this.valueControls(block, value) ) } @@ -557,12 +554,12 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `left < right + k` must be `isLessThan` on the edge from * `pred` to `succ`. If `isLessThan = false` then this implies `left >= right + k`. */ - cached + pragma[inline] predicate ensuresLtEdge( Operand left, Operand right, int k, IRBlock pred, IRBlock succ, boolean isLessThan ) { exists(AbstractValue value | - compares_lt(this, left, right, k, isLessThan, value) and + compares_lt(valueNumber(this), left, right, k, isLessThan, value) and this.valueControlsEdge(pred, succ, value) ) } @@ -571,37 +568,38 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `op < k` must be `isLessThan` on the edge from * `pred` to `succ`. If `isLessThan = false` then this implies `op >= k`. */ - cached + pragma[inline] predicate ensuresLtEdge(Operand left, int k, IRBlock pred, IRBlock succ, boolean isLessThan) { exists(AbstractValue value | - compares_lt(this, left, k, isLessThan, value) and + compares_lt(valueNumber(this), left, k, isLessThan, value) and this.valueControlsEdge(pred, succ, value) ) } /** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */ - cached + pragma[inline] predicate comparesEq(Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue) { exists(BooleanValue value | - compares_eq(this, left, right, k, areEqual, value) and + compares_eq(valueNumber(this), left, right, k, areEqual, value) and value.getValue() = testIsTrue ) } /** Holds if (determined by this guard) `op == k` evaluates to `areEqual` if this expression evaluates to `value`. */ - cached + pragma[inline] predicate comparesEq(Operand op, int k, boolean areEqual, AbstractValue value) { - unary_compares_eq(this, op, k, areEqual, false, value) + unary_compares_eq(valueNumber(this), op, k, areEqual, false, value) } /** * Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`. * If `areEqual = false` then this implies `left != right + k`. */ - cached + pragma[inline] predicate ensuresEq(Operand left, Operand right, int k, IRBlock block, boolean areEqual) { exists(AbstractValue value | - compares_eq(this, left, right, k, areEqual, value) and this.valueControls(block, value) + compares_eq(valueNumber(this), left, right, k, areEqual, value) and + this.valueControls(block, value) ) } @@ -609,10 +607,11 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `op == k` must be `areEqual` in `block`. * If `areEqual = false` then this implies `op != k`. */ - cached + pragma[inline] predicate ensuresEq(Operand op, int k, IRBlock block, boolean areEqual) { exists(AbstractValue value | - unary_compares_eq(this, op, k, areEqual, false, value) and this.valueControls(block, value) + unary_compares_eq(valueNumber(this), op, k, areEqual, false, value) and + this.valueControls(block, value) ) } @@ -620,12 +619,12 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `left == right + k` must be `areEqual` on the edge from * `pred` to `succ`. If `areEqual = false` then this implies `left != right + k`. */ - cached + pragma[inline] predicate ensuresEqEdge( Operand left, Operand right, int k, IRBlock pred, IRBlock succ, boolean areEqual ) { exists(AbstractValue value | - compares_eq(this, left, right, k, areEqual, value) and + compares_eq(valueNumber(this), left, right, k, areEqual, value) and this.valueControlsEdge(pred, succ, value) ) } @@ -634,10 +633,10 @@ class IRGuardCondition extends Instruction { * Holds if (determined by this guard) `op == k` must be `areEqual` on the edge from * `pred` to `succ`. If `areEqual = false` then this implies `op != k`. */ - cached + pragma[inline] predicate ensuresEqEdge(Operand op, int k, IRBlock pred, IRBlock succ, boolean areEqual) { exists(AbstractValue value | - unary_compares_eq(this, op, k, areEqual, false, value) and + unary_compares_eq(valueNumber(this), op, k, areEqual, false, value) and this.valueControlsEdge(pred, succ, value) ) } @@ -727,630 +726,730 @@ class IRGuardCondition extends Instruction { private Instruction getBranchForCondition(Instruction guard) { result.(ConditionalBranchInstruction).getCondition() = guard or - exists(LogicalNotInstruction cond | - result = getBranchForCondition(cond) and cond.getUnary() = guard - ) - or result.(SwitchInstruction).getExpression() = guard -} - -/** - * Holds if `left == right + k` is `areEqual` given that test is `testIsTrue`. - * - * Beware making mistaken logical implications here relating `areEqual` and `testIsTrue`. - */ -private predicate compares_eq( - Instruction test, Operand left, Operand right, int k, boolean areEqual, AbstractValue value -) { - /* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */ - exists(AbstractValue v | simple_comparison_eq(test, left, right, k, v) | - areEqual = true and value = v - or - areEqual = false and value = v.getDualValue() - ) - or - // I think this is handled by forwarding in controlsBlock. - //or - //logical_comparison_eq(test, left, right, k, areEqual, testIsTrue) - /* a == b + k => b == a - k */ - exists(int mk | k = -mk | compares_eq(test, right, left, mk, areEqual, value)) - or - complex_eq(test, left, right, k, areEqual, value) - or - /* (x is true => (left == right + k)) => (!x is false => (left == right + k)) */ - exists(AbstractValue dual | value = dual.getDualValue() | - compares_eq(test.(LogicalNotInstruction).getUnary(), left, right, k, areEqual, dual) - ) or - compares_eq(test.(BuiltinExpectCallInstruction).getCondition(), left, right, k, areEqual, value) -} - -/** - * Holds if `op == k` is `areEqual` given that `test` is equal to `value`. - * - * Many internal predicates in this file have a `inNonZeroCase` column. - * Ideally, the `k` column would be a type such as `Option::Option`, to - * represent whether we have a concrete value `k` such that `op == k`, or whether - * we only know that `op != 0`. - * However, cannot instantiate `Option` with an infinite type. Thus the boolean - * `inNonZeroCase` is used to distinquish the `Some` (where we have a concrete - * value `k`) and `None` cases (where we only know that `op != 0`). - * - * Thus, if `inNonZeroCase = true` then `op != 0` and the value of `k` is - * meaningless. - * - * To see why `inNonZeroCase` is needed consider the following C program: - * ```c - * char* p = ...; - * if(p) { - * use(p); - * } - * ``` - * in C++ there would be an int-to-bool conversion on `p`. However, since C - * does not have booleans there is no conversion. We want to be able to - * conclude that `p` is non-zero in the true branch, so we need to give `k` - * some value. However, simply setting `k = 1` would make the rest of the - * analysis think that `k == 1` holds inside the branch. So we distinquish - * between the above case and - * ```c - * if(p == 1) { - * use(p) - * } - * ``` - * by setting `inNonZeroCase` to `true` in the former case, but not in the - * latter. - */ -private predicate unary_compares_eq( - Instruction test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, AbstractValue value -) { - /* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */ - exists(AbstractValue v | - unary_simple_comparison_eq(test, k, inNonZeroCase, v) and op.getDef() = test - | - areEqual = true and value = v - or - areEqual = false and value = v.getDualValue() - ) - or - unary_complex_eq(test, op, k, areEqual, inNonZeroCase, value) - or - /* (x is true => (op == k)) => (!x is false => (op == k)) */ - exists(AbstractValue dual, boolean inNonZeroCase0 | - value = dual.getDualValue() and - unary_compares_eq(test.(LogicalNotInstruction).getUnary(), op, k, inNonZeroCase0, areEqual, dual) - | - k = 0 and inNonZeroCase = inNonZeroCase0 - or - k != 0 and inNonZeroCase = true - ) - or - // ((test is `areEqual` => op == const + k2) and const == `k1`) => - // test is `areEqual` => op == k1 + k2 - inNonZeroCase = false and - exists(int k1, int k2, ConstantInstruction const | - compares_eq(test, op, const.getAUse(), k2, areEqual, value) and - int_value(const) = k1 and - k = k1 + k2 + exists(LogicalNotInstruction cond | + result = getBranchForCondition(cond) and cond.getUnary() = guard ) - or - unary_compares_eq(test.(BuiltinExpectCallInstruction).getCondition(), op, k, areEqual, - inNonZeroCase, value) } -/** Rearrange various simple comparisons into `left == right + k` form. */ -private predicate simple_comparison_eq( - CompareInstruction cmp, Operand left, Operand right, int k, AbstractValue value -) { - left = cmp.getLeftOperand() and - cmp instanceof CompareEQInstruction and - right = cmp.getRightOperand() and - k = 0 and - value.(BooleanValue).getValue() = true - or - left = cmp.getLeftOperand() and - cmp instanceof CompareNEInstruction and - right = cmp.getRightOperand() and - k = 0 and - value.(BooleanValue).getValue() = false -} +cached +private module Cached { + /** + * A value number such that at least one of the instructions is + * a `CompareInstruction`. + */ + private class CompareValueNumber extends ValueNumber { + CompareInstruction cmp; + + CompareValueNumber() { cmp = this.getAnInstruction() } + + /** Gets a `CompareInstruction` belonging to this value number. */ + CompareInstruction getCompareInstruction() { result = cmp } + + /** + * Gets the left and right operands of a `CompareInstruction` that + * belong to this value number. + */ + predicate hasOperands(Operand left, Operand right) { + left = cmp.getLeftOperand() and + right = cmp.getRightOperand() + } + } -/** - * Rearrange various simple comparisons into `op == k` form. - */ -private predicate unary_simple_comparison_eq( - Instruction test, int k, boolean inNonZeroCase, AbstractValue value -) { - exists(SwitchInstruction switch, CaseEdge case | - test = switch.getExpression() and - case = value.(MatchValue).getCase() and - exists(switch.getSuccessor(case)) and - case.getValue().toInt() = k and - inNonZeroCase = false - ) - or - // Any instruction with an integral type could potentially be part of a - // check for nullness when used in a guard. So we include all integral - // typed instructions here. However, since some of these instructions are - // already included as guards in other cases, we exclude those here. - // These are instructions that compute a binary equality or inequality - // relation. For example, the following: - // ```cpp - // if(a == b + 42) { ... } - // ``` - // generates the following IR: - // ``` - // r1(glval) = VariableAddress[a] : - // r2(int) = Load[a] : &:r1, m1 - // r3(glval) = VariableAddress[b] : - // r4(int) = Load[b] : &:r3, m2 - // r5(int) = Constant[42] : - // r6(int) = Add : r4, r5 - // r7(bool) = CompareEQ : r2, r6 - // v1(void) = ConditionalBranch : r7 - // ``` - // and since `r7` is an integral typed instruction this predicate could - // include a case for when `r7` evaluates to true (in which case we would - // infer that `r6` was non-zero, and a case for when `r7` evaluates to false - // (in which case we would infer that `r6` was zero). - // However, since `a == b + 42` is already supported when reasoning about - // binary equalities we exclude those cases here. - not test.isGLValue() and - not simple_comparison_eq(test, _, _, _, _) and - not simple_comparison_lt(test, _, _, _) and - not test = any(SwitchInstruction switch).getExpression() and - ( - test.getResultIRType() instanceof IRAddressType or - test.getResultIRType() instanceof IRIntegerType or - test.getResultIRType() instanceof IRBooleanType - ) and - ( - k = 1 and - value.(BooleanValue).getValue() = true and - inNonZeroCase = true - or - k = 0 and - value.(BooleanValue).getValue() = false and - inNonZeroCase = false - ) -} + private class CompareEQValueNumber extends CompareValueNumber { + override CompareEQInstruction cmp; + } -/** A call to the builtin operation `__builtin_expect`. */ -private class BuiltinExpectCallInstruction extends CallInstruction { - BuiltinExpectCallInstruction() { this.getStaticCallTarget().hasName("__builtin_expect") } + private class CompareNEValueNumber extends CompareValueNumber { + override CompareNEInstruction cmp; + } - /** Gets the condition of this call. */ - Instruction getCondition() { - // The first parameter of `__builtin_expect` has type `long`. So we skip - // the conversion when inferring guards. - result = this.getArgument(0).(ConvertInstruction).getUnary() + private class CompareLTValueNumber extends CompareValueNumber { + override CompareLTInstruction cmp; } -} -/** - * Holds if `left == right + k` is `areEqual` if `cmp` evaluates to `value`, - * and `cmp` is an instruction that compares the value of - * `__builtin_expect(left == right + k, _)` to `0`. - */ -private predicate builtin_expect_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value -) { - exists(BuiltinExpectCallInstruction call, Instruction const, AbstractValue innerValue | - int_value(const) = 0 and - cmp.hasOperands(call.getAUse(), const.getAUse()) and - compares_eq(call.getCondition(), left, right, k, areEqual, innerValue) - | - cmp instanceof CompareNEInstruction and - value = innerValue - or - cmp instanceof CompareEQInstruction and - value.getDualValue() = innerValue - ) -} + private class CompareGTValueNumber extends CompareValueNumber { + override CompareGTInstruction cmp; + } -private predicate complex_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value -) { - sub_eq(cmp, left, right, k, areEqual, value) - or - add_eq(cmp, left, right, k, areEqual, value) - or - builtin_expect_eq(cmp, left, right, k, areEqual, value) -} + private class CompareLEValueNumber extends CompareValueNumber { + override CompareLEInstruction cmp; + } -/** - * Holds if `op == k` is `areEqual` if `cmp` evaluates to `value`, and `cmp` is - * an instruction that compares the value of `__builtin_expect(op == k, _)` to `0`. - */ -private predicate unary_builtin_expect_eq( - CompareInstruction cmp, Operand op, int k, boolean areEqual, boolean inNonZeroCase, - AbstractValue value -) { - exists(BuiltinExpectCallInstruction call, Instruction const, AbstractValue innerValue | - int_value(const) = 0 and - cmp.hasOperands(call.getAUse(), const.getAUse()) and - unary_compares_eq(call.getCondition(), op, k, areEqual, inNonZeroCase, innerValue) - | - cmp instanceof CompareNEInstruction and - value = innerValue - or - cmp instanceof CompareEQInstruction and - value.getDualValue() = innerValue - ) -} + private class CompareGEValueNumber extends CompareValueNumber { + override CompareGEInstruction cmp; + } -private predicate unary_complex_eq( - Instruction test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, AbstractValue value -) { - unary_sub_eq(test, op, k, areEqual, inNonZeroCase, value) - or - unary_add_eq(test, op, k, areEqual, inNonZeroCase, value) - or - unary_builtin_expect_eq(test, op, k, areEqual, inNonZeroCase, value) -} + /** + * A value number such that at least one of the instructions provides + * the integer value controlling a `SwitchInstruction`. + */ + private class SwitchConditionValueNumber extends ValueNumber { + SwitchInstruction switch; -/* - * Simplification of inequality expressions - * Simplify conditions in the source to the canonical form l < r + k. - */ + pragma[nomagic] + SwitchConditionValueNumber() { this.getAnInstruction() = switch.getExpression() } -/** Holds if `left < right + k` evaluates to `isLt` given that test is `testIsTrue`. */ -private predicate compares_lt( - Instruction test, Operand left, Operand right, int k, boolean isLt, AbstractValue value -) { - /* In the simple case, the test is the comparison, so isLt = testIsTrue */ - simple_comparison_lt(test, left, right, k) and - value.(BooleanValue).getValue() = isLt - or - complex_lt(test, left, right, k, isLt, value) - or - /* (not (left < right + k)) => (left >= right + k) */ - exists(boolean isGe | isLt = isGe.booleanNot() | compares_ge(test, left, right, k, isGe, value)) - or - /* (x is true => (left < right + k)) => (!x is false => (left < right + k)) */ - exists(AbstractValue dual | value = dual.getDualValue() | - compares_lt(test.(LogicalNotInstruction).getUnary(), left, right, k, isLt, dual) - ) -} + /** Gets an expression that belongs to this value number. */ + Operand getExpressionOperand() { result = switch.getExpressionOperand() } -/** Holds if `op < k` evaluates to `isLt` given that `test` evaluates to `value`. */ -private predicate compares_lt(Instruction test, Operand op, int k, boolean isLt, AbstractValue value) { - unary_simple_comparison_lt(test, k, isLt, value) and - op.getDef() = test - or - complex_lt(test, op, k, isLt, value) - or - /* (x is true => (op < k)) => (!x is false => (op < k)) */ - exists(AbstractValue dual | value = dual.getDualValue() | - compares_lt(test.(LogicalNotInstruction).getUnary(), op, k, isLt, dual) - ) - or - exists(int k1, int k2, ConstantInstruction const | - compares_lt(test, op, const.getAUse(), k2, isLt, value) and - int_value(const) = k1 and - k = k1 + k2 - ) -} + Instruction getSuccessor(CaseEdge kind) { result = switch.getSuccessor(kind) } + } -/** `(a < b + k) => (b > a - k) => (b >= a + (1-k))` */ -private predicate compares_ge( - Instruction test, Operand left, Operand right, int k, boolean isGe, AbstractValue value -) { - exists(int onemk | k = 1 - onemk | compares_lt(test, right, left, onemk, isGe, value)) -} + private class BuiltinExpectCallValueNumber extends ValueNumber { + BuiltinExpectCallInstruction instr; -/** Rearrange various simple comparisons into `left < right + k` form. */ -private predicate simple_comparison_lt(CompareInstruction cmp, Operand left, Operand right, int k) { - left = cmp.getLeftOperand() and - cmp instanceof CompareLTInstruction and - right = cmp.getRightOperand() and - k = 0 - or - left = cmp.getLeftOperand() and - cmp instanceof CompareLEInstruction and - right = cmp.getRightOperand() and - k = 1 - or - right = cmp.getLeftOperand() and - cmp instanceof CompareGTInstruction and - left = cmp.getRightOperand() and - k = 0 - or - right = cmp.getLeftOperand() and - cmp instanceof CompareGEInstruction and - left = cmp.getRightOperand() and - k = 1 -} + BuiltinExpectCallValueNumber() { this.getAnInstruction() = instr } -/** Rearrange various simple comparisons into `op < k` form. */ -private predicate unary_simple_comparison_lt( - Instruction test, int k, boolean isLt, AbstractValue value -) { - exists(SwitchInstruction switch, CaseEdge case | - test = switch.getExpression() and - case = value.(MatchValue).getCase() and - exists(switch.getSuccessor(case)) and - case.getMaxValue() > case.getMinValue() - | - // op <= k => op < k - 1 - isLt = true and - case.getMaxValue().toInt() = k - 1 - or - isLt = false and - case.getMinValue().toInt() = k - ) -} + ValueNumber getCondition() { result.getAnInstruction() = instr.getCondition() } -private predicate complex_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value -) { - sub_lt(cmp, left, right, k, isLt, value) - or - add_lt(cmp, left, right, k, isLt, value) -} + Operand getAUse() { result = instr.getAUse() } + } -private predicate complex_lt( - Instruction test, Operand left, int k, boolean isLt, AbstractValue value -) { - sub_lt(test, left, k, isLt, value) - or - add_lt(test, left, k, isLt, value) -} + private class LogicalNotValueNumber extends ValueNumber { + LogicalNotInstruction instr; -// left - x < right + c => left < right + (c+x) -// left < (right - x) + c => left < right + (c-x) -private predicate sub_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value -) { - exists(SubInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(SubInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) - or - exists(PointerSubInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(PointerSubInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) -} + LogicalNotValueNumber() { this.getAnInstruction() = instr } -private predicate sub_lt(Instruction test, Operand left, int k, boolean isLt, AbstractValue value) { - exists(SubInstruction lhs, int c, int x | - compares_lt(test, lhs.getAUse(), c, isLt, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(PointerSubInstruction lhs, int c, int x | - compares_lt(test, lhs.getAUse(), c, isLt, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) -} + ValueNumber getUnary() { result.getAnInstruction() = instr.getUnary() } + } -// left + x < right + c => left < right + (c-x) -// left < (right + x) + c => left < right + (c+x) -private predicate add_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value -) { - exists(AddInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) - or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(AddInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + /** + * Holds if `left == right + k` is `areEqual` given that test is `testIsTrue`. + * + * Beware making mistaken logical implications here relating `areEqual` and `value`. + */ + cached + predicate compares_eq( + ValueNumber test, Operand left, Operand right, int k, boolean areEqual, AbstractValue value + ) { + /* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */ + exists(AbstractValue v | simple_comparison_eq(test, left, right, k, v) | + areEqual = true and value = v or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) - or - exists(PointerAddInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + areEqual = false and value = v.getDualValue() + ) + or + // I think this is handled by forwarding in controlsBlock. + //or + //logical_comparison_eq(test, left, right, k, areEqual, testIsTrue) + /* a == b + k => b == a - k */ + exists(int mk | k = -mk | compares_eq(test, right, left, mk, areEqual, value)) + or + complex_eq(test, left, right, k, areEqual, value) + or + /* (x is true => (left == right + k)) => (!x is false => (left == right + k)) */ + exists(AbstractValue dual | value = dual.getDualValue() | + compares_eq(test.(LogicalNotValueNumber).getUnary(), left, right, k, areEqual, dual) + ) + or + compares_eq(test.(BuiltinExpectCallValueNumber).getCondition(), left, right, k, areEqual, value) + } + + /** + * Holds if `op == k` is `areEqual` given that `test` is equal to `value`. + * + * Many internal predicates in this file have a `inNonZeroCase` column. + * Ideally, the `k` column would be a type such as `Option::Option`, to + * represent whether we have a concrete value `k` such that `op == k`, or whether + * we only know that `op != 0`. + * However, cannot instantiate `Option` with an infinite type. Thus the boolean + * `inNonZeroCase` is used to distinquish the `Some` (where we have a concrete + * value `k`) and `None` cases (where we only know that `op != 0`). + * + * Thus, if `inNonZeroCase = true` then `op != 0` and the value of `k` is + * meaningless. + * + * To see why `inNonZeroCase` is needed consider the following C program: + * ```c + * char* p = ...; + * if(p) { + * use(p); + * } + * ``` + * in C++ there would be an int-to-bool conversion on `p`. However, since C + * does not have booleans there is no conversion. We want to be able to + * conclude that `p` is non-zero in the true branch, so we need to give `k` + * some value. However, simply setting `k = 1` would make the rest of the + * analysis think that `k == 1` holds inside the branch. So we distinquish + * between the above case and + * ```c + * if(p == 1) { + * use(p) + * } + * ``` + * by setting `inNonZeroCase` to `true` in the former case, but not in the + * latter. + */ + cached + predicate unary_compares_eq( + ValueNumber test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, + AbstractValue value + ) { + /* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */ + exists(AbstractValue v | unary_simple_comparison_eq(test, op, k, inNonZeroCase, v) | + areEqual = true and value = v or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(PointerAddInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + areEqual = false and value = v.getDualValue() + ) + or + unary_complex_eq(test, op, k, areEqual, inNonZeroCase, value) + or + /* (x is true => (op == k)) => (!x is false => (op == k)) */ + exists(AbstractValue dual, boolean inNonZeroCase0 | + value = dual.getDualValue() and + unary_compares_eq(test.(LogicalNotValueNumber).getUnary(), op, k, inNonZeroCase0, areEqual, + dual) + | + k = 0 and inNonZeroCase = inNonZeroCase0 or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) -} + k != 0 and inNonZeroCase = true + ) + or + // ((test is `areEqual` => op == const + k2) and const == `k1`) => + // test is `areEqual` => op == k1 + k2 + inNonZeroCase = false and + exists(int k1, int k2, Instruction const | + compares_eq(test, op, const.getAUse(), k2, areEqual, value) and + int_value(const) = k1 and + k = k1 + k2 + ) + or + unary_compares_eq(test.(BuiltinExpectCallValueNumber).getCondition(), op, k, areEqual, + inNonZeroCase, value) + } -private predicate add_lt(Instruction test, Operand left, int k, boolean isLt, AbstractValue value) { - exists(AddInstruction lhs, int c, int x | - compares_lt(test, lhs.getAUse(), c, isLt, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + /** Rearrange various simple comparisons into `left == right + k` form. */ + private predicate simple_comparison_eq( + CompareValueNumber cmp, Operand left, Operand right, int k, AbstractValue value + ) { + cmp instanceof CompareEQValueNumber and + cmp.hasOperands(left, right) and + k = 0 and + value.(BooleanValue).getValue() = true + or + cmp instanceof CompareNEValueNumber and + cmp.hasOperands(left, right) and + k = 0 and + value.(BooleanValue).getValue() = false + } + + /** + * Holds if `op` is an operand that is eventually used in a unary comparison + * with a constant. + */ + private predicate isRelevantUnaryComparisonOperand(Operand op) { + // Base case: `op` is an operand of a `CompareEQInstruction` or `CompareNEInstruction`, + // and the other operand is a constant. + exists(CompareInstruction eq, Instruction instr | + eq.hasOperands(op, instr.getAUse()) and + exists(int_value(instr)) + | + eq instanceof CompareEQInstruction or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(PointerAddInstruction lhs, int c, int x | - compares_lt(test, lhs.getAUse(), c, isLt, value) and + eq instanceof CompareNEInstruction + ) + or + // C doesn't have int-to-bool conversions, so `if(x)` will just generate: + // r2_1(glval) = VariableAddress[x] + // r2_2(int) = Load[x] : &:r2_1, m1_6 + // v2_3(void) = ConditionalBranch : r2_2 + exists(ConditionalBranchInstruction branch | branch.getConditionOperand() = op) + or + // If `!x` is a relevant unary comparison then so is `x`. + exists(LogicalNotInstruction logicalNot | + isRelevantUnaryComparisonOperand(unique( | | logicalNot.getAUse())) and + logicalNot.getUnaryOperand() = op + ) + or + // If `y` is a relevant unary comparison and `y = x` then so is `x`. + not op.isDefinitionInexact() and + exists(CopyInstruction copy | + isRelevantUnaryComparisonOperand(unique( | | copy.getAUse())) and + op = copy.getSourceValueOperand() + ) + or + // If phi(x1, x2) is a relevant unary comparison then so are `x1` and `x2`. + not op.isDefinitionInexact() and + exists(PhiInstruction phi | + isRelevantUnaryComparisonOperand(unique( | | phi.getAUse())) and + op = phi.getAnInputOperand() + ) + or + // If `__builtin_expect(x)` is a relevant unary comparison then so is `x`. + exists(BuiltinExpectCallInstruction call | + isRelevantUnaryComparisonOperand(unique( | | call.getAUse())) and + op = call.getConditionOperand() + ) + } + + /** Rearrange various simple comparisons into `op == k` form. */ + private predicate unary_simple_comparison_eq( + ValueNumber test, Operand op, int k, boolean inNonZeroCase, AbstractValue value + ) { + exists(CaseEdge case, SwitchConditionValueNumber condition | + condition = test and + op = condition.getExpressionOperand() and + case = value.(MatchValue).getCase() and + exists(condition.getSuccessor(case)) and + case.getValue().toInt() = k and + inNonZeroCase = false + ) + or + isRelevantUnaryComparisonOperand(op) and + op.getDef() = test.getAnInstruction() and ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + k = 1 and + value.(BooleanValue).getValue() = true and + inNonZeroCase = true or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) -} + k = 0 and + value.(BooleanValue).getValue() = false and + inNonZeroCase = false + ) + } -// left - x == right + c => left == right + (c+x) -// left == (right - x) + c => left == right + (c-x) -private predicate sub_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value -) { - exists(SubInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(SubInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) - or - exists(PointerSubInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(PointerSubInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) -} + /** A call to the builtin operation `__builtin_expect`. */ + private class BuiltinExpectCallInstruction extends CallInstruction { + BuiltinExpectCallInstruction() { this.getStaticCallTarget().hasName("__builtin_expect") } -// op - x == c => op == (c+x) -private predicate unary_sub_eq( - Instruction test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, AbstractValue value -) { - inNonZeroCase = false and - exists(SubInstruction sub, int c, int x | - unary_compares_eq(test, sub.getAUse(), c, areEqual, inNonZeroCase, value) and - op = sub.getLeftOperand() and - x = int_value(sub.getRight()) and - k = c + x - ) - or - inNonZeroCase = false and - exists(PointerSubInstruction sub, int c, int x | - unary_compares_eq(test, sub.getAUse(), c, areEqual, inNonZeroCase, value) and - op = sub.getLeftOperand() and - x = int_value(sub.getRight()) and - k = c + x - ) -} + /** Gets the condition of this call. */ + Instruction getCondition() { result = this.getConditionOperand().getDef() } -// left + x == right + c => left == right + (c-x) -// left == (right + x) + c => left == right + (c+x) -private predicate add_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value -) { - exists(AddInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) - or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(AddInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) - or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) - or - exists(PointerAddInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) - or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(PointerAddInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + Operand getConditionOperand() { + // The first parameter of `__builtin_expect` has type `long`. So we skip + // the conversion when inferring guards. + result = this.getArgument(0).(ConvertInstruction).getUnaryOperand() + } + } + + /** + * Holds if `left == right + k` is `areEqual` if `cmp` evaluates to `value`, + * and `cmp` is an instruction that compares the value of + * `__builtin_expect(left == right + k, _)` to `0`. + */ + private predicate builtin_expect_eq( + CompareValueNumber cmp, Operand left, Operand right, int k, boolean areEqual, + AbstractValue value + ) { + exists(BuiltinExpectCallValueNumber call, Instruction const, AbstractValue innerValue | + int_value(const) = 0 and + cmp.hasOperands(call.getAUse(), const.getAUse()) and + compares_eq(call.getCondition(), left, right, k, areEqual, innerValue) + | + cmp instanceof CompareNEValueNumber and + value = innerValue or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) -} + cmp instanceof CompareEQValueNumber and + value.getDualValue() = innerValue + ) + } -// left + x == right + c => left == right + (c-x) -private predicate unary_add_eq( - Instruction test, Operand left, int k, boolean areEqual, boolean inNonZeroCase, - AbstractValue value -) { - inNonZeroCase = false and - exists(AddInstruction lhs, int c, int x | - unary_compares_eq(test, lhs.getAUse(), c, areEqual, inNonZeroCase, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + private predicate complex_eq( + ValueNumber cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value + ) { + sub_eq(cmp, left, right, k, areEqual, value) + or + add_eq(cmp, left, right, k, areEqual, value) + or + builtin_expect_eq(cmp, left, right, k, areEqual, value) + } + + /** + * Holds if `op == k` is `areEqual` if `cmp` evaluates to `value`, and `cmp` is + * an instruction that compares the value of `__builtin_expect(op == k, _)` to `0`. + */ + private predicate unary_builtin_expect_eq( + CompareValueNumber cmp, Operand op, int k, boolean areEqual, boolean inNonZeroCase, + AbstractValue value + ) { + exists(BuiltinExpectCallValueNumber call, Instruction const, AbstractValue innerValue | + int_value(const) = 0 and + cmp.hasOperands(call.getAUse(), const.getAUse()) and + unary_compares_eq(call.getCondition(), op, k, areEqual, inNonZeroCase, innerValue) + | + cmp instanceof CompareNEValueNumber and + value = innerValue or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - inNonZeroCase = false and - exists(PointerAddInstruction lhs, int c, int x | - unary_compares_eq(test, lhs.getAUse(), c, areEqual, inNonZeroCase, value) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + cmp instanceof CompareEQValueNumber and + value.getDualValue() = innerValue + ) + } + + private predicate unary_complex_eq( + ValueNumber test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, + AbstractValue value + ) { + unary_sub_eq(test, op, k, areEqual, inNonZeroCase, value) + or + unary_add_eq(test, op, k, areEqual, inNonZeroCase, value) + or + unary_builtin_expect_eq(test, op, k, areEqual, inNonZeroCase, value) + } + + /* + * Simplification of inequality expressions + * Simplify conditions in the source to the canonical form l < r + k. + */ + + /** Holds if `left < right + k` evaluates to `isLt` given that test is `value`. */ + cached + predicate compares_lt( + ValueNumber test, Operand left, Operand right, int k, boolean isLt, AbstractValue value + ) { + /* In the simple case, the test is the comparison, so isLt = testIsTrue */ + simple_comparison_lt(test, left, right, k) and + value.(BooleanValue).getValue() = isLt + or + complex_lt(test, left, right, k, isLt, value) + or + /* (not (left < right + k)) => (left >= right + k) */ + exists(boolean isGe | isLt = isGe.booleanNot() | compares_ge(test, left, right, k, isGe, value)) + or + /* (x is true => (left < right + k)) => (!x is false => (left < right + k)) */ + exists(AbstractValue dual | value = dual.getDualValue() | + compares_lt(test.(LogicalNotValueNumber).getUnary(), left, right, k, isLt, dual) + ) + } + + /** Holds if `op < k` evaluates to `isLt` given that `test` evaluates to `value`. */ + cached + predicate compares_lt(ValueNumber test, Operand op, int k, boolean isLt, AbstractValue value) { + unary_simple_comparison_lt(test, op, k, isLt, value) + or + complex_lt(test, op, k, isLt, value) + or + /* (x is true => (op < k)) => (!x is false => (op < k)) */ + exists(AbstractValue dual | value = dual.getDualValue() | + compares_lt(test.(LogicalNotValueNumber).getUnary(), op, k, isLt, dual) + ) + or + exists(int k1, int k2, Instruction const | + compares_lt(test, op, const.getAUse(), k2, isLt, value) and + int_value(const) = k1 and + k = k1 + k2 + ) + } + + /** `(a < b + k) => (b > a - k) => (b >= a + (1-k))` */ + private predicate compares_ge( + ValueNumber test, Operand left, Operand right, int k, boolean isGe, AbstractValue value + ) { + exists(int onemk | k = 1 - onemk | compares_lt(test, right, left, onemk, isGe, value)) + } + + /** Rearrange various simple comparisons into `left < right + k` form. */ + private predicate simple_comparison_lt(CompareValueNumber cmp, Operand left, Operand right, int k) { + cmp.hasOperands(left, right) and + cmp instanceof CompareLTValueNumber and + k = 0 + or + cmp.hasOperands(left, right) and + cmp instanceof CompareLEValueNumber and + k = 1 + or + cmp.hasOperands(right, left) and + cmp instanceof CompareGTValueNumber and + k = 0 + or + cmp.hasOperands(right, left) and + cmp instanceof CompareGEValueNumber and + k = 1 + } + + /** Rearrange various simple comparisons into `op < k` form. */ + private predicate unary_simple_comparison_lt( + SwitchConditionValueNumber test, Operand op, int k, boolean isLt, AbstractValue value + ) { + exists(CaseEdge case | + test.getExpressionOperand() = op and + case = value.(MatchValue).getCase() and + exists(test.getSuccessor(case)) and + case.getMaxValue() > case.getMinValue() + | + // op <= k => op < k - 1 + isLt = true and + case.getMaxValue().toInt() = k - 1 or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) -} + isLt = false and + case.getMinValue().toInt() = k + ) + } -private class IntegerOrPointerConstantInstruction extends ConstantInstruction { - IntegerOrPointerConstantInstruction() { - this instanceof IntegerConstantInstruction or - this instanceof PointerConstantInstruction + private predicate complex_lt( + ValueNumber cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value + ) { + sub_lt(cmp, left, right, k, isLt, value) + or + add_lt(cmp, left, right, k, isLt, value) + } + + private predicate complex_lt( + ValueNumber test, Operand left, int k, boolean isLt, AbstractValue value + ) { + sub_lt(test, left, k, isLt, value) + or + add_lt(test, left, k, isLt, value) + } + + // left - x < right + c => left < right + (c+x) + // left < (right - x) + c => left < right + (c-x) + private predicate sub_lt( + ValueNumber cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value + ) { + exists(SubInstruction lhs, int c, int x | + compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + or + exists(SubInstruction rhs, int c, int x | + compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and + right = rhs.getLeftOperand() and + x = int_value(rhs.getRight()) and + k = c - x + ) + or + exists(PointerSubInstruction lhs, int c, int x | + compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + or + exists(PointerSubInstruction rhs, int c, int x | + compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and + right = rhs.getLeftOperand() and + x = int_value(rhs.getRight()) and + k = c - x + ) + } + + private predicate sub_lt(ValueNumber test, Operand left, int k, boolean isLt, AbstractValue value) { + exists(SubInstruction lhs, int c, int x | + compares_lt(test, lhs.getAUse(), c, isLt, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + or + exists(PointerSubInstruction lhs, int c, int x | + compares_lt(test, lhs.getAUse(), c, isLt, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + } + + // left + x < right + c => left < right + (c-x) + // left < (right + x) + c => left < right + (c+x) + private predicate add_lt( + ValueNumber cmp, Operand left, Operand right, int k, boolean isLt, AbstractValue value + ) { + exists(AddInstruction lhs, int c, int x | + compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + exists(AddInstruction rhs, int c, int x | + compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and + ( + right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + or + right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) + ) and + k = c + x + ) + or + exists(PointerAddInstruction lhs, int c, int x | + compares_lt(cmp, lhs.getAUse(), right, c, isLt, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + exists(PointerAddInstruction rhs, int c, int x | + compares_lt(cmp, left, rhs.getAUse(), c, isLt, value) and + ( + right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + or + right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) + ) and + k = c + x + ) + } + + private predicate add_lt(ValueNumber test, Operand left, int k, boolean isLt, AbstractValue value) { + exists(AddInstruction lhs, int c, int x | + compares_lt(test, lhs.getAUse(), c, isLt, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + exists(PointerAddInstruction lhs, int c, int x | + compares_lt(test, lhs.getAUse(), c, isLt, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + } + + // left - x == right + c => left == right + (c+x) + // left == (right - x) + c => left == right + (c-x) + private predicate sub_eq( + ValueNumber cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value + ) { + exists(SubInstruction lhs, int c, int x | + compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + or + exists(SubInstruction rhs, int c, int x | + compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and + right = rhs.getLeftOperand() and + x = int_value(rhs.getRight()) and + k = c - x + ) + or + exists(PointerSubInstruction lhs, int c, int x | + compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and + left = lhs.getLeftOperand() and + x = int_value(lhs.getRight()) and + k = c + x + ) + or + exists(PointerSubInstruction rhs, int c, int x | + compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and + right = rhs.getLeftOperand() and + x = int_value(rhs.getRight()) and + k = c - x + ) + } + + // op - x == c => op == (c+x) + private predicate unary_sub_eq( + ValueNumber test, Operand op, int k, boolean areEqual, boolean inNonZeroCase, + AbstractValue value + ) { + inNonZeroCase = false and + exists(SubInstruction sub, int c, int x | + unary_compares_eq(test, sub.getAUse(), c, areEqual, inNonZeroCase, value) and + op = sub.getLeftOperand() and + x = int_value(sub.getRight()) and + k = c + x + ) + or + inNonZeroCase = false and + exists(PointerSubInstruction sub, int c, int x | + unary_compares_eq(test, sub.getAUse(), c, areEqual, inNonZeroCase, value) and + op = sub.getLeftOperand() and + x = int_value(sub.getRight()) and + k = c + x + ) } -} -/** The int value of integer constant expression. */ -private int int_value(Instruction i) { - result = i.(IntegerOrPointerConstantInstruction).getValue().toInt() + // left + x == right + c => left == right + (c-x) + // left == (right + x) + c => left == right + (c+x) + private predicate add_eq( + ValueNumber cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value + ) { + exists(AddInstruction lhs, int c, int x | + compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + exists(AddInstruction rhs, int c, int x | + compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and + ( + right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + or + right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) + ) and + k = c + x + ) + or + exists(PointerAddInstruction lhs, int c, int x | + compares_eq(cmp, lhs.getAUse(), right, c, areEqual, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + exists(PointerAddInstruction rhs, int c, int x | + compares_eq(cmp, left, rhs.getAUse(), c, areEqual, value) and + ( + right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) + or + right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) + ) and + k = c + x + ) + } + + // left + x == right + c => left == right + (c-x) + private predicate unary_add_eq( + ValueNumber test, Operand left, int k, boolean areEqual, boolean inNonZeroCase, + AbstractValue value + ) { + inNonZeroCase = false and + exists(AddInstruction lhs, int c, int x | + unary_compares_eq(test, lhs.getAUse(), c, areEqual, inNonZeroCase, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + or + inNonZeroCase = false and + exists(PointerAddInstruction lhs, int c, int x | + unary_compares_eq(test, lhs.getAUse(), c, areEqual, inNonZeroCase, value) and + ( + left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) + or + left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) + ) and + k = c - x + ) + } + + private class IntegerOrPointerConstantInstruction extends ConstantInstruction { + IntegerOrPointerConstantInstruction() { + this instanceof IntegerConstantInstruction or + this instanceof PointerConstantInstruction + } + } + + /** The int value of integer constant expression. */ + private int int_value(IntegerOrPointerConstantInstruction i) { result = i.getValue().toInt() } } + +private import Cached diff --git a/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll b/cpp/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from cpp/ql/test/TestUtilities/InlineExpectationsTest.qll rename to cpp/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/cpp/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/cpp/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from cpp/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to cpp/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/cpp/ql/test/TestUtilities/dataflow/FlowTestCommon.qll b/cpp/ql/lib/utils/test/dataflow/FlowTestCommon.qll similarity index 98% rename from cpp/ql/test/TestUtilities/dataflow/FlowTestCommon.qll rename to cpp/ql/lib/utils/test/dataflow/FlowTestCommon.qll index 8f393cccde5b..0effb698f419 100644 --- a/cpp/ql/test/TestUtilities/dataflow/FlowTestCommon.qll +++ b/cpp/ql/lib/utils/test/dataflow/FlowTestCommon.qll @@ -14,7 +14,7 @@ import cpp private import semmle.code.cpp.ir.dataflow.DataFlow::DataFlow as IRDataFlow private import semmle.code.cpp.dataflow.DataFlow::DataFlow as AstDataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module IRFlowTest implements TestSig { string getARelevantTag() { result = "ir" } diff --git a/cpp/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/cpp/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from cpp/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to cpp/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.expected b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.expected index 106313c87079..15125038d19c 100644 --- a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.expected +++ b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.expected @@ -17,6 +17,7 @@ | test.cpp:49:12:49:12 | Load: x | test.cpp:46:22:46:22 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:48:9:48:13 | test.cpp:48:9:48:13 | | test.cpp:49:12:49:12 | Load: x | test.cpp:46:29:46:29 | ValueNumberBound | -2 | true | CompareLT: ... < ... | test.cpp:48:9:48:13 | test.cpp:48:9:48:13 | | test.cpp:54:12:54:12 | Load: x | test.cpp:46:22:46:22 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:52:7:52:11 | test.cpp:52:7:52:11 | +| test.cpp:54:12:54:12 | Load: x | test.cpp:46:29:46:29 | ValueNumberBound | -2 | true | CompareLT: ... < ... | test.cpp:52:7:52:11 | test.cpp:52:7:52:11 | | test.cpp:62:10:62:13 | Load: iter | test.cpp:60:17:60:17 | ValueNumberBound | 0 | false | NoReason | file://:0:0:0:0 | file://:0:0:0:0 | | test.cpp:62:10:62:13 | Load: iter | test.cpp:60:17:60:17 | ValueNumberBound | 3 | true | CompareLT: ... < ... | test.cpp:61:32:61:51 | test.cpp:61:32:61:51 | | test.cpp:62:10:62:13 | Load: iter | test.cpp:61:39:61:51 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:61:32:61:51 | test.cpp:61:32:61:51 | diff --git a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/test.cpp b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/test.cpp index 87653c2fa43d..6b241fc42f77 100644 --- a/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/test.cpp +++ b/cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/test.cpp @@ -51,7 +51,7 @@ int test5(int x, int y, int z) { } if (x < y) { if (y < z) { - sink(x); // x < z is not inferred here + sink(x); // x < z is inferred here } } } diff --git a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected index d097fa7dfa67..24ce995f8133 100644 --- a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected +++ b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected @@ -42,6 +42,8 @@ astGuards astGuardsCompare | 7 | 0 < x+0 when ... > ... is true | | 7 | 0 >= x+0 when ... > ... is false | +| 7 | ... > ... != 0 when ... > ... is true | +| 7 | ... > ... == 0 when ... > ... is false | | 7 | x < 0+1 when ... > ... is false | | 7 | x >= 0+1 when ... > ... is true | | 17 | 0 < x+1 when ... < ... is false | @@ -50,6 +52,12 @@ astGuardsCompare | 17 | 1 < y+0 when ... && ... is true | | 17 | 1 < y+0 when ... > ... is true | | 17 | 1 >= y+0 when ... > ... is false | +| 17 | ... < ... != 0 when ... && ... is true | +| 17 | ... < ... != 0 when ... < ... is true | +| 17 | ... < ... == 0 when ... < ... is false | +| 17 | ... > ... != 0 when ... && ... is true | +| 17 | ... > ... != 0 when ... > ... is true | +| 17 | ... > ... == 0 when ... > ... is false | | 17 | x < 0+0 when ... && ... is true | | 17 | x < 0+0 when ... < ... is true | | 17 | x >= 0+0 when ... < ... is false | @@ -60,30 +68,42 @@ astGuardsCompare | 18 | call to get == 0 when call to get is false | | 26 | 0 < x+0 when ... > ... is true | | 26 | 0 >= x+0 when ... > ... is false | +| 26 | ... > ... != 0 when ... > ... is true | +| 26 | ... > ... == 0 when ... > ... is false | | 26 | x < 0+1 when ... > ... is false | | 26 | x >= 0+1 when ... > ... is true | | 31 | - ... != x+0 when ... == ... is false | | 31 | - ... == x+0 when ... == ... is true | +| 31 | ... == ... != 0 when ... == ... is true | +| 31 | ... == ... == 0 when ... == ... is false | | 31 | x != -1 when ... == ... is false | | 31 | x != - ...+0 when ... == ... is false | | 31 | x == -1 when ... == ... is true | | 31 | x == - ...+0 when ... == ... is true | | 34 | 10 < j+1 when ... < ... is false | | 34 | 10 >= j+1 when ... < ... is true | +| 34 | ... < ... != 0 when ... < ... is true | +| 34 | ... < ... == 0 when ... < ... is false | | 34 | j < 10+0 when ... < ... is true | | 34 | j >= 10+0 when ... < ... is false | | 42 | 10 < j+1 when ... < ... is false | | 42 | 10 >= j+1 when ... < ... is true | +| 42 | ... < ... != 0 when ... < ... is true | +| 42 | ... < ... == 0 when ... < ... is false | | 42 | call to getABool != 0 when call to getABool is true | | 42 | call to getABool == 0 when call to getABool is false | | 42 | j < 10+0 when ... < ... is true | | 42 | j >= 10+0 when ... < ... is false | | 44 | 0 < z+0 when ... > ... is true | | 44 | 0 >= z+0 when ... > ... is false | +| 44 | ... > ... != 0 when ... > ... is true | +| 44 | ... > ... == 0 when ... > ... is false | | 44 | z < 0+1 when ... > ... is false | | 44 | z >= 0+1 when ... > ... is true | | 45 | 0 < y+0 when ... > ... is true | | 45 | 0 >= y+0 when ... > ... is false | +| 45 | ... > ... != 0 when ... > ... is true | +| 45 | ... > ... == 0 when ... > ... is false | | 45 | y < 0+1 when ... > ... is false | | 45 | y >= 0+1 when ... > ... is true | | 58 | 0 != x+0 when ... == ... is false | @@ -92,6 +112,12 @@ astGuardsCompare | 58 | 0 < y+1 when ... \|\| ... is false | | 58 | 0 == x+0 when ... == ... is true | | 58 | 0 >= y+1 when ... < ... is true | +| 58 | ... < ... != 0 when ... < ... is true | +| 58 | ... < ... == 0 when ... < ... is false | +| 58 | ... < ... == 0 when ... \|\| ... is false | +| 58 | ... == ... != 0 when ... == ... is true | +| 58 | ... == ... == 0 when ... == ... is false | +| 58 | ... == ... == 0 when ... \|\| ... is false | | 58 | x != 0 when ... == ... is false | | 58 | x != 0 when ... \|\| ... is false | | 58 | x != 0+0 when ... == ... is false | @@ -103,6 +129,8 @@ astGuardsCompare | 58 | y >= 0+0 when ... \|\| ... is false | | 75 | 0 != x+0 when ... == ... is false | | 75 | 0 == x+0 when ... == ... is true | +| 75 | ... == ... != 0 when ... == ... is true | +| 75 | ... == ... == 0 when ... == ... is false | | 75 | x != 0 when ... == ... is false | | 75 | x != 0+0 when ... == ... is false | | 75 | x == 0 when ... == ... is true | @@ -113,6 +141,12 @@ astGuardsCompare | 85 | 0 == x+0 when ... && ... is true | | 85 | 0 == x+0 when ... == ... is true | | 85 | 0 == y+0 when ... != ... is false | +| 85 | ... != ... != 0 when ... != ... is true | +| 85 | ... != ... != 0 when ... && ... is true | +| 85 | ... != ... == 0 when ... != ... is false | +| 85 | ... == ... != 0 when ... && ... is true | +| 85 | ... == ... != 0 when ... == ... is true | +| 85 | ... == ... == 0 when ... == ... is false | | 85 | x != 0 when ... == ... is false | | 85 | x != 0+0 when ... == ... is false | | 85 | x == 0 when ... && ... is true | @@ -127,12 +161,16 @@ astGuardsCompare | 85 | y == 0+0 when ... != ... is false | | 94 | 0 != x+0 when ... != ... is true | | 94 | 0 == x+0 when ... != ... is false | +| 94 | ... != ... != 0 when ... != ... is true | +| 94 | ... != ... == 0 when ... != ... is false | | 94 | x != 0 when ... != ... is true | | 94 | x != 0+0 when ... != ... is true | | 94 | x == 0 when ... != ... is false | | 94 | x == 0+0 when ... != ... is false | | 102 | 10 < j+1 when ... < ... is false | | 102 | 10 >= j+1 when ... < ... is true | +| 102 | ... < ... != 0 when ... < ... is true | +| 102 | ... < ... == 0 when ... < ... is false | | 102 | j < 10+0 when ... < ... is true | | 102 | j >= 10+0 when ... < ... is false | | 109 | 0 != x+0 when ... == ... is false | @@ -141,6 +179,12 @@ astGuardsCompare | 109 | 0 < y+1 when ... \|\| ... is false | | 109 | 0 == x+0 when ... == ... is true | | 109 | 0 >= y+1 when ... < ... is true | +| 109 | ... < ... != 0 when ... < ... is true | +| 109 | ... < ... == 0 when ... < ... is false | +| 109 | ... < ... == 0 when ... \|\| ... is false | +| 109 | ... == ... != 0 when ... == ... is true | +| 109 | ... == ... == 0 when ... == ... is false | +| 109 | ... == ... == 0 when ... \|\| ... is false | | 109 | x != 0 when ... == ... is false | | 109 | x != 0 when ... \|\| ... is false | | 109 | x != 0+0 when ... == ... is false | @@ -173,6 +217,8 @@ astGuardsCompare | 152 | y == 0 when y is false | | 156 | ... + ... != x+0 when ... == ... is false | | 156 | ... + ... == x+0 when ... == ... is true | +| 156 | ... == ... != 0 when ... == ... is true | +| 156 | ... == ... == 0 when ... == ... is false | | 156 | x != ... + ...+0 when ... == ... is false | | 156 | x != y+42 when ... == ... is false | | 156 | x == ... + ...+0 when ... == ... is true | @@ -181,6 +227,8 @@ astGuardsCompare | 156 | y == x+-42 when ... == ... is true | | 159 | ... - ... != x+0 when ... == ... is false | | 159 | ... - ... == x+0 when ... == ... is true | +| 159 | ... == ... != 0 when ... == ... is true | +| 159 | ... == ... == 0 when ... == ... is false | | 159 | x != ... - ...+0 when ... == ... is false | | 159 | x != y+-42 when ... == ... is false | | 159 | x == ... - ...+0 when ... == ... is true | @@ -189,6 +237,8 @@ astGuardsCompare | 159 | y == x+42 when ... == ... is true | | 162 | ... + ... < x+1 when ... < ... is false | | 162 | ... + ... >= x+1 when ... < ... is true | +| 162 | ... < ... != 0 when ... < ... is true | +| 162 | ... < ... == 0 when ... < ... is false | | 162 | x < ... + ...+0 when ... < ... is true | | 162 | x < y+42 when ... < ... is true | | 162 | x >= ... + ...+0 when ... < ... is false | @@ -197,6 +247,8 @@ astGuardsCompare | 162 | y >= x+-41 when ... < ... is true | | 165 | ... - ... < x+1 when ... < ... is false | | 165 | ... - ... >= x+1 when ... < ... is true | +| 165 | ... < ... != 0 when ... < ... is true | +| 165 | ... < ... == 0 when ... < ... is false | | 165 | x < ... - ...+0 when ... < ... is true | | 165 | x < y+-42 when ... < ... is true | | 165 | x >= ... - ...+0 when ... < ... is false | @@ -205,6 +257,8 @@ astGuardsCompare | 165 | y >= x+43 when ... < ... is true | | 175 | 0 != call to foo+0 when ... == ... is false | | 175 | 0 == call to foo+0 when ... == ... is true | +| 175 | ... == ... != 0 when ... == ... is true | +| 175 | ... == ... == 0 when ... == ... is false | | 175 | call to foo != 0 when ... == ... is false | | 175 | call to foo != 0+0 when ... == ... is false | | 175 | call to foo == 0 when ... == ... is true | @@ -414,10 +468,20 @@ astGuardsEnsure | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 75 | 77 | | test.c:75:9:75:14 | ... == ... | test.c:75:14:75:14 | 0 | != | test.c:75:9:75:9 | x | 0 | 78 | 79 | | test.c:75:9:75:14 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | != | test.c:85:13:85:13 | 0 | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:13:85:13 | 0 | != | test.c:85:8:85:8 | x | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 75 | 77 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:18:85:18 | y | != | test.c:85:23:85:23 | 0 | 0 | 86 | 86 | @@ -491,16 +555,81 @@ astGuardsEnsure | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:12:31:13 | - ... | == | test.cpp:31:7:31:7 | x | 0 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:12:31:13 | - ... | == | test.cpp:31:7:31:7 | x | 0 | 31 | 32 | astGuardsEnsure_const +| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:13 | ... > ... | != | 0 | 7 | 9 | +| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:13 | ... > ... | == | 0 | 10 | 11 | +| test.c:17:8:17:12 | ... < ... | test.c:17:8:17:12 | ... < ... | != | 0 | 17 | 17 | +| test.c:17:8:17:12 | ... < ... | test.c:17:8:17:12 | ... < ... | != | 0 | 18 | 18 | +| test.c:17:8:17:21 | ... && ... | test.c:17:8:17:12 | ... < ... | != | 0 | 18 | 18 | +| test.c:17:8:17:21 | ... && ... | test.c:17:17:17:21 | ... > ... | != | 0 | 18 | 18 | +| test.c:17:17:17:21 | ... > ... | test.c:17:17:17:21 | ... > ... | != | 0 | 18 | 18 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | != | 0 | 26 | 28 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 2 | 2 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 31 | 34 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 34 | 34 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 39 | 42 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 42 | 42 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 42 | 44 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 45 | 45 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 45 | 47 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 51 | 53 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 56 | 58 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 58 | 58 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 58 | 66 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 62 | 62 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | != | 0 | 34 | 34 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 2 | 2 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 39 | 42 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 42 | 42 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 42 | 44 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 45 | 45 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 45 | 47 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 51 | 53 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 56 | 58 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 58 | 58 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 58 | 66 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 62 | 62 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 42 | 42 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 42 | 44 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 45 | 45 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 45 | 47 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 51 | 53 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | != | 0 | 45 | 45 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | != | 0 | 45 | 47 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | == | 0 | 42 | 42 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | == | 0 | 51 | 53 | +| test.c:45:16:45:20 | ... > ... | test.c:45:16:45:20 | ... > ... | != | 0 | 45 | 47 | | test.c:58:9:58:14 | ... == ... | test.c:58:9:58:9 | x | != | 0 | 58 | 58 | | test.c:58:9:58:14 | ... == ... | test.c:58:9:58:9 | x | != | 0 | 62 | 62 | +| test.c:58:9:58:14 | ... == ... | test.c:58:9:58:14 | ... == ... | == | 0 | 58 | 58 | +| test.c:58:9:58:14 | ... == ... | test.c:58:9:58:14 | ... == ... | == | 0 | 62 | 62 | | test.c:58:9:58:23 | ... \|\| ... | test.c:58:9:58:9 | x | != | 0 | 62 | 62 | +| test.c:58:9:58:23 | ... \|\| ... | test.c:58:9:58:14 | ... == ... | == | 0 | 62 | 62 | +| test.c:58:9:58:23 | ... \|\| ... | test.c:58:19:58:23 | ... < ... | == | 0 | 62 | 62 | +| test.c:58:19:58:23 | ... < ... | test.c:58:19:58:23 | ... < ... | == | 0 | 62 | 62 | | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | != | 0 | 78 | 79 | | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:75:9:75:14 | ... == ... | == | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | != | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:13 | ... == ... | == | 0 | 78 | 79 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:9 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:14 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:8:85:8 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:85:8:85:13 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:18:85:18 | y | != | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:85:18:85:23 | ... != ... | != | 0 | 86 | 86 | | test.c:85:18:85:23 | ... != ... | test.c:85:18:85:18 | y | != | 0 | 86 | 86 | +| test.c:85:18:85:23 | ... != ... | test.c:85:18:85:23 | ... != ... | != | 0 | 86 | 86 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | != | 0 | 94 | 96 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 70 | 70 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 99 | 102 | @@ -509,16 +638,41 @@ astGuardsEnsure_const | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 109 | 109 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 109 | 117 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 113 | 113 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | != | 0 | 94 | 96 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 70 | 70 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 99 | 102 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 102 | 102 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 107 | 109 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 109 | 109 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 109 | 117 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 113 | 113 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | != | 0 | 102 | 102 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 70 | 70 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 107 | 109 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 109 | 109 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 109 | 117 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 113 | 113 | | test.c:109:9:109:14 | ... == ... | test.c:109:9:109:9 | x | != | 0 | 109 | 109 | | test.c:109:9:109:14 | ... == ... | test.c:109:9:109:9 | x | != | 0 | 113 | 113 | +| test.c:109:9:109:14 | ... == ... | test.c:109:9:109:14 | ... == ... | == | 0 | 109 | 109 | +| test.c:109:9:109:14 | ... == ... | test.c:109:9:109:14 | ... == ... | == | 0 | 113 | 113 | | test.c:109:9:109:23 | ... \|\| ... | test.c:109:9:109:9 | x | != | 0 | 113 | 113 | +| test.c:109:9:109:23 | ... \|\| ... | test.c:109:9:109:14 | ... == ... | == | 0 | 113 | 113 | +| test.c:109:9:109:23 | ... \|\| ... | test.c:109:19:109:23 | ... < ... | == | 0 | 113 | 113 | +| test.c:109:19:109:23 | ... < ... | test.c:109:19:109:23 | ... < ... | == | 0 | 113 | 113 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 126 | 126 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 126 | 128 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 131 | 131 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 131 | 132 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 134 | 123 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 126 | 126 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 126 | 128 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 131 | 131 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 131 | 132 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 134 | 123 | | test.c:126:7:126:28 | ... && ... | test.c:126:7:126:7 | 1 | != | 0 | 126 | 128 | | test.c:126:7:126:28 | ... && ... | test.c:126:12:126:26 | call to test3_condition | != | 0 | 126 | 128 | +| test.c:126:7:126:28 | ... && ... | test.c:127:9:127:9 | 1 | != | 0 | 126 | 128 | | test.c:126:12:126:26 | call to test3_condition | test.c:126:12:126:26 | call to test3_condition | != | 0 | 126 | 128 | | test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 | | test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 | @@ -529,8 +683,14 @@ astGuardsEnsure_const | test.c:152:10:152:15 | ... && ... | test.c:152:10:152:10 | x | != | 0 | 151 | 152 | | test.c:152:10:152:15 | ... && ... | test.c:152:15:152:15 | y | != | 0 | 151 | 152 | | test.c:152:15:152:15 | y | test.c:152:15:152:15 | y | != | 0 | 151 | 152 | +| test.c:156:9:156:19 | ... == ... | test.c:156:9:156:19 | ... == ... | != | 0 | 156 | 157 | +| test.c:159:9:159:19 | ... == ... | test.c:159:9:159:19 | ... == ... | != | 0 | 159 | 160 | +| test.c:162:9:162:18 | ... < ... | test.c:162:9:162:18 | ... < ... | != | 0 | 162 | 163 | +| test.c:165:9:165:18 | ... < ... | test.c:165:9:165:18 | ... < ... | != | 0 | 165 | 166 | | test.c:175:13:175:32 | ... == ... | test.c:175:13:175:15 | call to foo | != | 0 | 175 | 175 | | test.c:175:13:175:32 | ... == ... | test.c:175:13:175:15 | call to foo | == | 0 | 175 | 175 | +| test.c:175:13:175:32 | ... == ... | test.c:175:13:175:32 | ... == ... | != | 0 | 175 | 175 | +| test.c:175:13:175:32 | ... == ... | test.c:175:13:175:32 | ... == ... | == | 0 | 175 | 175 | | test.c:181:9:181:9 | x | test.c:181:9:181:9 | x | != | 0 | 181 | 182 | | test.c:181:9:181:9 | x | test.c:181:9:181:9 | x | != | 0 | 186 | 180 | | test.c:181:9:181:9 | x | test.c:181:9:181:9 | x | == | 0 | 183 | 184 | @@ -539,6 +699,10 @@ astGuardsEnsure_const | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 34 | 34 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | == | -1 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | == | -1 | 31 | 32 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | != | 0 | 30 | 30 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | != | 0 | 31 | 32 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 0 | 30 | 30 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 0 | 34 | 34 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 0 | 43 | 45 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 0 | 53 | 53 | irGuards @@ -579,6 +743,8 @@ irGuards irGuardsCompare | 7 | 0 < x+0 when CompareGT: ... > ... is true | | 7 | 0 >= x+0 when CompareGT: ... > ... is false | +| 7 | ... > ... != 0 when CompareGT: ... > ... is true | +| 7 | ... > ... == 0 when CompareGT: ... > ... is false | | 7 | x < 0+1 when CompareGT: ... > ... is false | | 7 | x < 1 when CompareGT: ... > ... is false | | 7 | x >= 0+1 when CompareGT: ... > ... is true | @@ -587,6 +753,10 @@ irGuardsCompare | 17 | 0 >= x+1 when CompareLT: ... < ... is true | | 17 | 1 < y+0 when CompareGT: ... > ... is true | | 17 | 1 >= y+0 when CompareGT: ... > ... is false | +| 17 | ... < ... != 0 when CompareLT: ... < ... is true | +| 17 | ... < ... == 0 when CompareLT: ... < ... is false | +| 17 | ... > ... != 0 when CompareGT: ... > ... is true | +| 17 | ... > ... == 0 when CompareGT: ... > ... is false | | 17 | x < 0 when CompareLT: ... < ... is true | | 17 | x < 0+0 when CompareLT: ... < ... is true | | 17 | x >= 0 when CompareLT: ... < ... is false | @@ -599,24 +769,32 @@ irGuardsCompare | 18 | call to get == 0 when CompareNE: (bool)... is false | | 26 | 0 < x+0 when CompareGT: ... > ... is true | | 26 | 0 >= x+0 when CompareGT: ... > ... is false | +| 26 | ... > ... != 0 when CompareGT: ... > ... is true | +| 26 | ... > ... == 0 when CompareGT: ... > ... is false | | 26 | x < 0+1 when CompareGT: ... > ... is false | | 26 | x < 1 when CompareGT: ... > ... is false | | 26 | x >= 0+1 when CompareGT: ... > ... is true | | 26 | x >= 1 when CompareGT: ... > ... is true | | 31 | - ... != x+0 when CompareEQ: ... == ... is false | | 31 | - ... == x+0 when CompareEQ: ... == ... is true | +| 31 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 31 | ... == ... == 0 when CompareEQ: ... == ... is false | | 31 | x != -1 when CompareEQ: ... == ... is false | | 31 | x != - ...+0 when CompareEQ: ... == ... is false | | 31 | x == -1 when CompareEQ: ... == ... is true | | 31 | x == - ...+0 when CompareEQ: ... == ... is true | | 34 | 10 < j+1 when CompareLT: ... < ... is false | | 34 | 10 >= j+1 when CompareLT: ... < ... is true | +| 34 | ... < ... != 0 when CompareLT: ... < ... is true | +| 34 | ... < ... == 0 when CompareLT: ... < ... is false | | 34 | j < 10 when CompareLT: ... < ... is true | | 34 | j < 10+0 when CompareLT: ... < ... is true | | 34 | j >= 10 when CompareLT: ... < ... is false | | 34 | j >= 10+0 when CompareLT: ... < ... is false | | 42 | 10 < j+1 when CompareLT: ... < ... is false | | 42 | 10 >= j+1 when CompareLT: ... < ... is true | +| 42 | ... < ... != 0 when CompareLT: ... < ... is true | +| 42 | ... < ... == 0 when CompareLT: ... < ... is false | | 42 | call to getABool != 0 when Call: call to getABool is true | | 42 | call to getABool == 0 when Call: call to getABool is false | | 42 | j < 10 when CompareLT: ... < ... is true | @@ -625,12 +803,16 @@ irGuardsCompare | 42 | j >= 10+0 when CompareLT: ... < ... is false | | 44 | 0 < z+0 when CompareGT: ... > ... is true | | 44 | 0 >= z+0 when CompareGT: ... > ... is false | +| 44 | ... > ... != 0 when CompareGT: ... > ... is true | +| 44 | ... > ... == 0 when CompareGT: ... > ... is false | | 44 | z < 0+1 when CompareGT: ... > ... is false | | 44 | z < 1 when CompareGT: ... > ... is false | | 44 | z >= 0+1 when CompareGT: ... > ... is true | | 44 | z >= 1 when CompareGT: ... > ... is true | | 45 | 0 < y+0 when CompareGT: ... > ... is true | | 45 | 0 >= y+0 when CompareGT: ... > ... is false | +| 45 | ... > ... != 0 when CompareGT: ... > ... is true | +| 45 | ... > ... == 0 when CompareGT: ... > ... is false | | 45 | y < 0+1 when CompareGT: ... > ... is false | | 45 | y < 1 when CompareGT: ... > ... is false | | 45 | y >= 0+1 when CompareGT: ... > ... is true | @@ -639,6 +821,10 @@ irGuardsCompare | 58 | 0 < y+1 when CompareLT: ... < ... is false | | 58 | 0 == x+0 when CompareEQ: ... == ... is true | | 58 | 0 >= y+1 when CompareLT: ... < ... is true | +| 58 | ... < ... != 0 when CompareLT: ... < ... is true | +| 58 | ... < ... == 0 when CompareLT: ... < ... is false | +| 58 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 58 | ... == ... == 0 when CompareEQ: ... == ... is false | | 58 | x != 0 when CompareEQ: ... == ... is false | | 58 | x != 0+0 when CompareEQ: ... == ... is false | | 58 | x == 0 when CompareEQ: ... == ... is true | @@ -649,6 +835,8 @@ irGuardsCompare | 58 | y >= 0+0 when CompareLT: ... < ... is false | | 75 | 0 != x+0 when CompareEQ: ... == ... is false | | 75 | 0 == x+0 when CompareEQ: ... == ... is true | +| 75 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 75 | ... == ... == 0 when CompareEQ: ... == ... is false | | 75 | x != 0 when CompareEQ: ... == ... is false | | 75 | x != 0+0 when CompareEQ: ... == ... is false | | 75 | x == 0 when CompareEQ: ... == ... is true | @@ -657,6 +845,10 @@ irGuardsCompare | 85 | 0 != y+0 when CompareNE: ... != ... is true | | 85 | 0 == x+0 when CompareEQ: ... == ... is true | | 85 | 0 == y+0 when CompareNE: ... != ... is false | +| 85 | ... != ... != 0 when CompareNE: ... != ... is true | +| 85 | ... != ... == 0 when CompareNE: ... != ... is false | +| 85 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 85 | ... == ... == 0 when CompareEQ: ... == ... is false | | 85 | x != 0 when CompareEQ: ... == ... is false | | 85 | x != 0+0 when CompareEQ: ... == ... is false | | 85 | x == 0 when CompareEQ: ... == ... is true | @@ -667,12 +859,16 @@ irGuardsCompare | 85 | y == 0+0 when CompareNE: ... != ... is false | | 94 | 0 != x+0 when CompareNE: ... != ... is true | | 94 | 0 == x+0 when CompareNE: ... != ... is false | +| 94 | ... != ... != 0 when CompareNE: ... != ... is true | +| 94 | ... != ... == 0 when CompareNE: ... != ... is false | | 94 | x != 0 when CompareNE: ... != ... is true | | 94 | x != 0+0 when CompareNE: ... != ... is true | | 94 | x == 0 when CompareNE: ... != ... is false | | 94 | x == 0+0 when CompareNE: ... != ... is false | | 102 | 10 < j+1 when CompareLT: ... < ... is false | | 102 | 10 >= j+1 when CompareLT: ... < ... is true | +| 102 | ... < ... != 0 when CompareLT: ... < ... is true | +| 102 | ... < ... == 0 when CompareLT: ... < ... is false | | 102 | j < 10 when CompareLT: ... < ... is true | | 102 | j < 10+0 when CompareLT: ... < ... is true | | 102 | j >= 10 when CompareLT: ... < ... is false | @@ -681,6 +877,10 @@ irGuardsCompare | 109 | 0 < y+1 when CompareLT: ... < ... is false | | 109 | 0 == x+0 when CompareEQ: ... == ... is true | | 109 | 0 >= y+1 when CompareLT: ... < ... is true | +| 109 | ... < ... != 0 when CompareLT: ... < ... is true | +| 109 | ... < ... == 0 when CompareLT: ... < ... is false | +| 109 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 109 | ... == ... == 0 when CompareEQ: ... == ... is false | | 109 | x != 0 when CompareEQ: ... == ... is false | | 109 | x != 0+0 when CompareEQ: ... == ... is false | | 109 | x == 0 when CompareEQ: ... == ... is true | @@ -708,6 +908,8 @@ irGuardsCompare | 152 | y == 0 when Load: y is false | | 156 | ... + ... != x+0 when CompareEQ: ... == ... is false | | 156 | ... + ... == x+0 when CompareEQ: ... == ... is true | +| 156 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 156 | ... == ... == 0 when CompareEQ: ... == ... is false | | 156 | x != ... + ...+0 when CompareEQ: ... == ... is false | | 156 | x != y+42 when CompareEQ: ... == ... is false | | 156 | x == ... + ...+0 when CompareEQ: ... == ... is true | @@ -716,6 +918,8 @@ irGuardsCompare | 156 | y == x+-42 when CompareEQ: ... == ... is true | | 159 | ... - ... != x+0 when CompareEQ: ... == ... is false | | 159 | ... - ... == x+0 when CompareEQ: ... == ... is true | +| 159 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 159 | ... == ... == 0 when CompareEQ: ... == ... is false | | 159 | x != ... - ...+0 when CompareEQ: ... == ... is false | | 159 | x != y+-42 when CompareEQ: ... == ... is false | | 159 | x == ... - ...+0 when CompareEQ: ... == ... is true | @@ -724,6 +928,8 @@ irGuardsCompare | 159 | y == x+42 when CompareEQ: ... == ... is true | | 162 | ... + ... < x+1 when CompareLT: ... < ... is false | | 162 | ... + ... >= x+1 when CompareLT: ... < ... is true | +| 162 | ... < ... != 0 when CompareLT: ... < ... is true | +| 162 | ... < ... == 0 when CompareLT: ... < ... is false | | 162 | x < ... + ...+0 when CompareLT: ... < ... is true | | 162 | x < y+42 when CompareLT: ... < ... is true | | 162 | x >= ... + ...+0 when CompareLT: ... < ... is false | @@ -732,6 +938,8 @@ irGuardsCompare | 162 | y >= x+-41 when CompareLT: ... < ... is true | | 165 | ... - ... < x+1 when CompareLT: ... < ... is false | | 165 | ... - ... >= x+1 when CompareLT: ... < ... is true | +| 165 | ... < ... != 0 when CompareLT: ... < ... is true | +| 165 | ... < ... == 0 when CompareLT: ... < ... is false | | 165 | x < ... - ...+0 when CompareLT: ... < ... is true | | 165 | x < y+-42 when CompareLT: ... < ... is true | | 165 | x >= ... - ...+0 when CompareLT: ... < ... is false | @@ -740,6 +948,8 @@ irGuardsCompare | 165 | y >= x+43 when CompareLT: ... < ... is true | | 175 | 0 != call to foo+0 when CompareEQ: ... == ... is false | | 175 | 0 == call to foo+0 when CompareEQ: ... == ... is true | +| 175 | ... == ... != 0 when CompareEQ: ... == ... is true | +| 175 | ... == ... == 0 when CompareEQ: ... == ... is false | | 175 | call to foo != 0 when CompareEQ: ... == ... is false | | 175 | call to foo != 0+0 when CompareEQ: ... == ... is false | | 175 | call to foo == 0 when CompareEQ: ... == ... is true | @@ -930,6 +1140,14 @@ irGuardsEnsure | test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | test.c:75:14:75:14 | Constant: 0 | 0 | 76 | 76 | | test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:14:75:14 | Constant: 0 | != | test.c:75:9:75:9 | Load: x | 0 | 79 | 79 | | test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:14:75:14 | Constant: 0 | == | test.c:75:9:75:9 | Load: x | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | != | test.c:85:13:85:13 | Constant: 0 | 0 | 79 | 79 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | test.c:85:13:85:13 | Constant: 0 | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:13:85:13 | Constant: 0 | != | test.c:85:8:85:8 | Load: x | 0 | 79 | 79 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:13:85:13 | Constant: 0 | == | test.c:85:8:85:8 | Load: x | 0 | 76 | 76 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | test.c:75:14:75:14 | Constant: 0 | 0 | 85 | 85 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | test.c:75:14:75:14 | Constant: 0 | 0 | 86 | 86 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:14:75:14 | Constant: 0 | == | test.c:75:9:75:9 | Load: x | 0 | 85 | 85 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:14:75:14 | Constant: 0 | == | test.c:75:9:75:9 | Load: x | 0 | 86 | 86 | | test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | test.c:85:13:85:13 | Constant: 0 | 0 | 85 | 85 | | test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | test.c:85:13:85:13 | Constant: 0 | 0 | 86 | 86 | | test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:13:85:13 | Constant: 0 | == | test.c:85:8:85:8 | Load: x | 0 | 85 | 85 | @@ -1003,9 +1221,14 @@ irGuardsEnsure irGuardsEnsure_const | test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:9 | Load: x | < | 1 | 11 | 11 | | test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:9 | Load: x | >= | 1 | 8 | 8 | +| test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:13 | CompareGT: ... > ... | != | 0 | 8 | 8 | +| test.c:7:9:7:13 | CompareGT: ... > ... | test.c:7:9:7:13 | CompareGT: ... > ... | == | 0 | 11 | 11 | | test.c:17:8:17:12 | CompareLT: ... < ... | test.c:17:8:17:8 | Load: x | < | 0 | 17 | 17 | | test.c:17:8:17:12 | CompareLT: ... < ... | test.c:17:8:17:8 | Load: x | < | 0 | 18 | 18 | +| test.c:17:8:17:12 | CompareLT: ... < ... | test.c:17:8:17:12 | CompareLT: ... < ... | != | 0 | 17 | 17 | +| test.c:17:8:17:12 | CompareLT: ... < ... | test.c:17:8:17:12 | CompareLT: ... < ... | != | 0 | 18 | 18 | | test.c:17:17:17:21 | CompareGT: ... > ... | test.c:17:17:17:17 | Load: y | >= | 2 | 18 | 18 | +| test.c:17:17:17:21 | CompareGT: ... > ... | test.c:17:17:17:21 | CompareGT: ... > ... | != | 0 | 18 | 18 | | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | < | 1 | 2 | 2 | | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | < | 1 | 31 | 31 | | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | < | 1 | 34 | 34 | @@ -1021,6 +1244,21 @@ irGuardsEnsure_const | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | < | 1 | 59 | 59 | | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | < | 1 | 62 | 62 | | test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:11 | Load: x | >= | 1 | 27 | 27 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | != | 0 | 27 | 27 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 2 | 2 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 31 | 31 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 34 | 34 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 35 | 35 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 39 | 39 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 42 | 42 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 43 | 43 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 45 | 45 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 46 | 46 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 52 | 52 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 56 | 56 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 58 | 58 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 59 | 59 | +| test.c:26:11:26:15 | CompareGT: ... > ... | test.c:26:11:26:15 | CompareGT: ... > ... | == | 0 | 62 | 62 | | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | < | 10 | 35 | 35 | | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | >= | 10 | 2 | 2 | | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | >= | 10 | 39 | 39 | @@ -1033,22 +1271,58 @@ irGuardsEnsure_const | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | >= | 10 | 58 | 58 | | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | >= | 10 | 59 | 59 | | test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:16 | Load: j | >= | 10 | 62 | 62 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | != | 0 | 35 | 35 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 2 | 2 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 39 | 39 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 42 | 42 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 43 | 43 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 45 | 45 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 46 | 46 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 52 | 52 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 56 | 56 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 58 | 58 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 59 | 59 | +| test.c:34:16:34:21 | CompareLT: ... < ... | test.c:34:16:34:21 | CompareLT: ... < ... | == | 0 | 62 | 62 | | test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:16 | Load: j | < | 10 | 43 | 43 | | test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:16 | Load: j | < | 10 | 45 | 45 | | test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:16 | Load: j | < | 10 | 46 | 46 | | test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:16 | Load: j | < | 10 | 52 | 52 | +| test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:21 | CompareLT: ... < ... | != | 0 | 43 | 43 | +| test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:21 | CompareLT: ... < ... | != | 0 | 45 | 45 | +| test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:21 | CompareLT: ... < ... | != | 0 | 46 | 46 | +| test.c:42:16:42:21 | CompareLT: ... < ... | test.c:42:16:42:21 | CompareLT: ... < ... | != | 0 | 52 | 52 | | test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:12 | Load: z | < | 1 | 52 | 52 | | test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:12 | Load: z | >= | 1 | 45 | 45 | | test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:12 | Load: z | >= | 1 | 46 | 46 | +| test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:16 | CompareGT: ... > ... | != | 0 | 45 | 45 | +| test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:16 | CompareGT: ... > ... | != | 0 | 46 | 46 | +| test.c:44:12:44:16 | CompareGT: ... > ... | test.c:44:12:44:16 | CompareGT: ... > ... | == | 0 | 52 | 52 | | test.c:45:16:45:20 | CompareGT: ... > ... | test.c:45:16:45:16 | Load: y | >= | 1 | 46 | 46 | +| test.c:45:16:45:20 | CompareGT: ... > ... | test.c:45:16:45:20 | CompareGT: ... > ... | != | 0 | 46 | 46 | | test.c:58:9:58:14 | CompareEQ: ... == ... | test.c:58:9:58:9 | Load: x | != | 0 | 58 | 58 | | test.c:58:9:58:14 | CompareEQ: ... == ... | test.c:58:9:58:9 | Load: x | != | 0 | 62 | 62 | +| test.c:58:9:58:14 | CompareEQ: ... == ... | test.c:58:9:58:14 | CompareEQ: ... == ... | == | 0 | 58 | 58 | +| test.c:58:9:58:14 | CompareEQ: ... == ... | test.c:58:9:58:14 | CompareEQ: ... == ... | == | 0 | 62 | 62 | | test.c:58:19:58:23 | CompareLT: ... < ... | test.c:58:19:58:19 | Load: y | >= | 0 | 62 | 62 | +| test.c:58:19:58:23 | CompareLT: ... < ... | test.c:58:19:58:23 | CompareLT: ... < ... | == | 0 | 62 | 62 | | test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | != | 0 | 79 | 79 | | test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:9:75:14 | CompareEQ: ... == ... | != | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:75:9:75:14 | CompareEQ: ... == ... | == | 0 | 79 | 79 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | != | 0 | 79 | 79 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:13 | CompareEQ: ... == ... | != | 0 | 76 | 76 | +| test.c:75:9:75:14 | CompareEQ: ... == ... | test.c:85:8:85:13 | CompareEQ: ... == ... | == | 0 | 79 | 79 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | 0 | 85 | 85 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:9 | Load: x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:14 | CompareEQ: ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:75:9:75:14 | CompareEQ: ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | 0 | 85 | 85 | | test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:8 | Load: x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:13 | CompareEQ: ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | CompareEQ: ... == ... | test.c:85:8:85:13 | CompareEQ: ... == ... | != | 0 | 86 | 86 | | test.c:85:18:85:23 | CompareNE: ... != ... | test.c:85:18:85:18 | Load: y | != | 0 | 86 | 86 | +| test.c:85:18:85:23 | CompareNE: ... != ... | test.c:85:18:85:23 | CompareNE: ... != ... | != | 0 | 86 | 86 | | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | != | 0 | 95 | 95 | | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | == | 0 | 70 | 70 | | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | == | 0 | 99 | 99 | @@ -1058,34 +1332,78 @@ irGuardsEnsure_const | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | == | 0 | 109 | 109 | | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | == | 0 | 110 | 110 | | test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:11 | Load: x | == | 0 | 113 | 113 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | != | 0 | 95 | 95 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 70 | 70 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 99 | 99 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 102 | 102 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 103 | 103 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 107 | 107 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 109 | 109 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 110 | 110 | +| test.c:94:11:94:16 | CompareNE: ... != ... | test.c:94:11:94:16 | CompareNE: ... != ... | == | 0 | 113 | 113 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | < | 10 | 103 | 103 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | >= | 10 | 70 | 70 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | >= | 10 | 107 | 107 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | >= | 10 | 109 | 109 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | >= | 10 | 110 | 110 | | test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:16 | Load: j | >= | 10 | 113 | 113 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | != | 0 | 103 | 103 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | == | 0 | 70 | 70 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | == | 0 | 107 | 107 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | == | 0 | 109 | 109 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | == | 0 | 110 | 110 | +| test.c:102:16:102:21 | CompareLT: ... < ... | test.c:102:16:102:21 | CompareLT: ... < ... | == | 0 | 113 | 113 | | test.c:109:9:109:14 | CompareEQ: ... == ... | test.c:109:9:109:9 | Load: x | != | 0 | 109 | 109 | | test.c:109:9:109:14 | CompareEQ: ... == ... | test.c:109:9:109:9 | Load: x | != | 0 | 113 | 113 | +| test.c:109:9:109:14 | CompareEQ: ... == ... | test.c:109:9:109:14 | CompareEQ: ... == ... | == | 0 | 109 | 109 | +| test.c:109:9:109:14 | CompareEQ: ... == ... | test.c:109:9:109:14 | CompareEQ: ... == ... | == | 0 | 113 | 113 | | test.c:109:19:109:23 | CompareLT: ... < ... | test.c:109:19:109:19 | Load: y | >= | 0 | 113 | 113 | +| test.c:109:19:109:23 | CompareLT: ... < ... | test.c:109:19:109:23 | CompareLT: ... < ... | == | 0 | 113 | 113 | | test.c:126:7:126:7 | Constant: 1 | test.c:126:7:126:7 | Constant: 1 | != | 0 | 126 | 126 | | test.c:126:7:126:7 | Constant: 1 | test.c:126:7:126:7 | Constant: 1 | != | 0 | 127 | 127 | | test.c:126:7:126:7 | Constant: 1 | test.c:126:7:126:7 | Constant: 1 | != | 0 | 131 | 131 | | test.c:126:7:126:7 | Constant: 1 | test.c:126:7:126:7 | Constant: 1 | != | 0 | 132 | 132 | | test.c:126:7:126:7 | Constant: 1 | test.c:126:7:126:7 | Constant: 1 | != | 0 | 134 | 134 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:5:127:9 | Store: ... = ... | != | 0 | 126 | 126 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:5:127:9 | Store: ... = ... | != | 0 | 127 | 127 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:5:127:9 | Store: ... = ... | != | 0 | 131 | 131 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:5:127:9 | Store: ... = ... | != | 0 | 132 | 132 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:5:127:9 | Store: ... = ... | != | 0 | 134 | 134 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:9:127:9 | Constant: 1 | != | 0 | 126 | 126 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:9:127:9 | Constant: 1 | != | 0 | 127 | 127 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:9:127:9 | Constant: 1 | != | 0 | 131 | 131 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:9:127:9 | Constant: 1 | != | 0 | 132 | 132 | +| test.c:126:7:126:7 | Constant: 1 | test.c:127:9:127:9 | Constant: 1 | != | 0 | 134 | 134 | | test.c:126:12:126:26 | Call: call to test3_condition | test.c:126:12:126:26 | Call: call to test3_condition | != | 0 | 127 | 127 | | test.c:131:7:131:7 | Load: b | test.c:131:7:131:7 | Load: b | != | 0 | 132 | 132 | +| test.c:131:7:131:7 | Load: b | test.c:131:7:131:7 | Phi: b | != | 0 | 132 | 132 | | test.c:137:7:137:7 | Constant: 0 | test.c:137:7:137:7 | Constant: 0 | == | 0 | 142 | 142 | | test.c:146:7:146:8 | LogicalNot: ! ... | test.c:146:7:146:8 | LogicalNot: ! ... | != | 0 | 147 | 147 | +| test.c:146:8:146:8 | Load: x | test.c:145:16:145:16 | InitializeParameter: x | == | 0 | 147 | 147 | | test.c:146:8:146:8 | Load: x | test.c:146:8:146:8 | Load: x | == | 0 | 147 | 147 | +| test.c:152:10:152:10 | Load: x | test.c:151:16:151:16 | InitializeParameter: x | != | 0 | 152 | 152 | | test.c:152:10:152:10 | Load: x | test.c:152:10:152:10 | Load: x | != | 0 | 152 | 152 | +| test.c:152:15:152:15 | Load: y | test.c:151:23:151:23 | InitializeParameter: y | != | 0 | 152 | 152 | | test.c:152:15:152:15 | Load: y | test.c:152:15:152:15 | Load: y | != | 0 | 152 | 152 | +| test.c:156:9:156:19 | CompareEQ: ... == ... | test.c:156:9:156:19 | CompareEQ: ... == ... | != | 0 | 156 | 157 | +| test.c:159:9:159:19 | CompareEQ: ... == ... | test.c:159:9:159:19 | CompareEQ: ... == ... | != | 0 | 159 | 160 | +| test.c:162:9:162:18 | CompareLT: ... < ... | test.c:162:9:162:18 | CompareLT: ... < ... | != | 0 | 162 | 163 | +| test.c:165:9:165:18 | CompareLT: ... < ... | test.c:165:9:165:18 | CompareLT: ... < ... | != | 0 | 165 | 166 | | test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:15 | Call: call to foo | != | 0 | 175 | 175 | | test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:15 | Call: call to foo | == | 0 | 175 | 175 | +| test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:32 | CompareEQ: ... == ... | != | 0 | 175 | 175 | +| test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:32 | CompareEQ: ... == ... | == | 0 | 175 | 175 | +| test.c:181:9:181:9 | Load: x | test.c:180:20:180:20 | InitializeParameter: x | != | 0 | 182 | 182 | +| test.c:181:9:181:9 | Load: x | test.c:180:20:180:20 | InitializeParameter: x | == | 0 | 184 | 184 | | test.c:181:9:181:9 | Load: x | test.c:181:9:181:9 | Load: x | != | 0 | 182 | 182 | | test.c:181:9:181:9 | Load: x | test.c:181:9:181:9 | Load: x | == | 0 | 184 | 184 | | test.cpp:18:8:18:12 | CompareNE: (bool)... | test.cpp:18:8:18:10 | Call: call to get | != | 0 | 19 | 19 | +| test.cpp:18:8:18:12 | CompareNE: (bool)... | test.cpp:18:8:18:12 | CompareNE: (bool)... | != | 0 | 19 | 19 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:7 | Load: x | != | -1 | 34 | 34 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:7 | Load: x | == | -1 | 30 | 30 | | test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:7 | Load: x | == | -1 | 32 | 32 | +| test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:13 | CompareEQ: ... == ... | != | 0 | 30 | 30 | +| test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:13 | CompareEQ: ... == ... | != | 0 | 32 | 32 | +| test.cpp:31:7:31:13 | CompareEQ: ... == ... | test.cpp:31:7:31:13 | CompareEQ: ... == ... | == | 0 | 34 | 34 | | test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | != | 0 | 44 | 44 | | test.cpp:42:13:42:20 | Call: call to getABool | test.cpp:42:13:42:20 | Call: call to getABool | == | 0 | 53 | 53 | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected index 8480a1f86138..4f44591e0b81 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected @@ -1,5 +1,7 @@ | 7 | 0 < x+0 when ... > ... is true | | 7 | 0 >= x+0 when ... > ... is false | +| 7 | ... > ... != 0 when ... > ... is true | +| 7 | ... > ... == 0 when ... > ... is false | | 7 | x < 0+1 when ... > ... is false | | 7 | x < 1 when ... > ... is false | | 7 | x >= 0+1 when ... > ... is true | @@ -10,6 +12,12 @@ | 17 | 1 < y+0 when ... && ... is true | | 17 | 1 < y+0 when ... > ... is true | | 17 | 1 >= y+0 when ... > ... is false | +| 17 | ... < ... != 0 when ... && ... is true | +| 17 | ... < ... != 0 when ... < ... is true | +| 17 | ... < ... == 0 when ... < ... is false | +| 17 | ... > ... != 0 when ... && ... is true | +| 17 | ... > ... != 0 when ... > ... is true | +| 17 | ... > ... == 0 when ... > ... is false | | 17 | x < 0 when ... && ... is true | | 17 | x < 0 when ... < ... is true | | 17 | x < 0+0 when ... && ... is true | @@ -26,24 +34,32 @@ | 18 | call to get == 0 when call to get is false | | 26 | 0 < x+0 when ... > ... is true | | 26 | 0 >= x+0 when ... > ... is false | +| 26 | ... > ... != 0 when ... > ... is true | +| 26 | ... > ... == 0 when ... > ... is false | | 26 | x < 0+1 when ... > ... is false | | 26 | x < 1 when ... > ... is false | | 26 | x >= 0+1 when ... > ... is true | | 26 | x >= 1 when ... > ... is true | | 31 | - ... != x+0 when ... == ... is false | | 31 | - ... == x+0 when ... == ... is true | +| 31 | ... == ... != 0 when ... == ... is true | +| 31 | ... == ... == 0 when ... == ... is false | | 31 | x != -1 when ... == ... is false | | 31 | x != - ...+0 when ... == ... is false | | 31 | x == -1 when ... == ... is true | | 31 | x == - ...+0 when ... == ... is true | | 34 | 10 < j+1 when ... < ... is false | | 34 | 10 >= j+1 when ... < ... is true | +| 34 | ... < ... != 0 when ... < ... is true | +| 34 | ... < ... == 0 when ... < ... is false | | 34 | j < 10 when ... < ... is true | | 34 | j < 10+0 when ... < ... is true | | 34 | j >= 10 when ... < ... is false | | 34 | j >= 10+0 when ... < ... is false | | 42 | 10 < j+1 when ... < ... is false | | 42 | 10 >= j+1 when ... < ... is true | +| 42 | ... < ... != 0 when ... < ... is true | +| 42 | ... < ... == 0 when ... < ... is false | | 42 | call to getABool != 0 when call to getABool is true | | 42 | call to getABool == 0 when call to getABool is false | | 42 | j < 10 when ... < ... is true | @@ -52,12 +68,16 @@ | 42 | j >= 10+0 when ... < ... is false | | 44 | 0 < z+0 when ... > ... is true | | 44 | 0 >= z+0 when ... > ... is false | +| 44 | ... > ... != 0 when ... > ... is true | +| 44 | ... > ... == 0 when ... > ... is false | | 44 | z < 0+1 when ... > ... is false | | 44 | z < 1 when ... > ... is false | | 44 | z >= 0+1 when ... > ... is true | | 44 | z >= 1 when ... > ... is true | | 45 | 0 < y+0 when ... > ... is true | | 45 | 0 >= y+0 when ... > ... is false | +| 45 | ... > ... != 0 when ... > ... is true | +| 45 | ... > ... == 0 when ... > ... is false | | 45 | y < 0+1 when ... > ... is false | | 45 | y < 1 when ... > ... is false | | 45 | y >= 0+1 when ... > ... is true | @@ -68,6 +88,12 @@ | 58 | 0 < y+1 when ... \|\| ... is false | | 58 | 0 == x+0 when ... == ... is true | | 58 | 0 >= y+1 when ... < ... is true | +| 58 | ... < ... != 0 when ... < ... is true | +| 58 | ... < ... == 0 when ... < ... is false | +| 58 | ... < ... == 0 when ... \|\| ... is false | +| 58 | ... == ... != 0 when ... == ... is true | +| 58 | ... == ... == 0 when ... == ... is false | +| 58 | ... == ... == 0 when ... \|\| ... is false | | 58 | x != 0 when ... == ... is false | | 58 | x != 0 when ... \|\| ... is false | | 58 | x != 0+0 when ... == ... is false | @@ -89,6 +115,8 @@ | 74 | i >= 11 when i is Case[11..20] | | 75 | 0 != x+0 when ... == ... is false | | 75 | 0 == x+0 when ... == ... is true | +| 75 | ... == ... != 0 when ... == ... is true | +| 75 | ... == ... == 0 when ... == ... is false | | 75 | x != 0 when ... == ... is false | | 75 | x != 0+0 when ... == ... is false | | 75 | x == 0 when ... == ... is true | @@ -99,6 +127,12 @@ | 85 | 0 == x+0 when ... && ... is true | | 85 | 0 == x+0 when ... == ... is true | | 85 | 0 == y+0 when ... != ... is false | +| 85 | ... != ... != 0 when ... != ... is true | +| 85 | ... != ... != 0 when ... && ... is true | +| 85 | ... != ... == 0 when ... != ... is false | +| 85 | ... == ... != 0 when ... && ... is true | +| 85 | ... == ... != 0 when ... == ... is true | +| 85 | ... == ... == 0 when ... == ... is false | | 85 | x != 0 when ... == ... is false | | 85 | x != 0+0 when ... == ... is false | | 85 | x == 0 when ... && ... is true | @@ -115,18 +149,26 @@ | 93 | c == 0 when c is false | | 94 | 0 != x+0 when ... != ... is true | | 94 | 0 == x+0 when ... != ... is false | +| 94 | ... != ... != 0 when ... != ... is true | +| 94 | ... != ... == 0 when ... != ... is false | | 94 | x != 0 when ... != ... is true | | 94 | x != 0+0 when ... != ... is true | | 94 | x == 0 when ... != ... is false | | 94 | x == 0+0 when ... != ... is false | +| 99 | f != 0 when f is true | +| 99 | f == 0 when f is false | | 102 | 10 < j+1 when ... < ... is false | | 102 | 10 >= j+1 when ... < ... is true | +| 102 | ... < ... != 0 when ... < ... is true | +| 102 | ... < ... == 0 when ... < ... is false | | 102 | j < 10 when ... < ... is true | | 102 | j < 10+0 when ... < ... is true | | 102 | j >= 10 when ... < ... is false | | 102 | j >= 10+0 when ... < ... is false | | 105 | 0.0 != f+0 when ... != ... is true | | 105 | 0.0 == f+0 when ... != ... is false | +| 105 | ... != ... != 0 when ... != ... is true | +| 105 | ... != ... == 0 when ... != ... is false | | 105 | f != 0.0+0 when ... != ... is true | | 105 | f == 0.0+0 when ... != ... is false | | 109 | 0 != x+0 when ... == ... is false | @@ -135,6 +177,12 @@ | 109 | 0 < y+1 when ... \|\| ... is false | | 109 | 0 == x+0 when ... == ... is true | | 109 | 0 >= y+1 when ... < ... is true | +| 109 | ... < ... != 0 when ... < ... is true | +| 109 | ... < ... == 0 when ... < ... is false | +| 109 | ... < ... == 0 when ... \|\| ... is false | +| 109 | ... == ... != 0 when ... == ... is true | +| 109 | ... == ... == 0 when ... == ... is false | +| 109 | ... == ... == 0 when ... \|\| ... is false | | 109 | x != 0 when ... == ... is false | | 109 | x != 0 when ... \|\| ... is false | | 109 | x != 0+0 when ... == ... is false | @@ -149,6 +197,8 @@ | 109 | y >= 0+0 when ... \|\| ... is false | | 111 | 0.0 != i+0 when ... != ... is true | | 111 | 0.0 == i+0 when ... != ... is false | +| 111 | ... != ... != 0 when ... != ... is true | +| 111 | ... != ... == 0 when ... != ... is false | | 111 | i != 0.0+0 when ... != ... is true | | 111 | i == 0.0+0 when ... != ... is false | | 122 | b != 0 when b is true | @@ -166,6 +216,8 @@ | 126 | call to test3_condition == 0 when call to test3_condition is false | | 131 | ... + ... != a+0 when call to __builtin_expect is false | | 131 | ... + ... == a+0 when call to __builtin_expect is true | +| 131 | ... == ... != 0 when call to __builtin_expect is true | +| 131 | ... == ... == 0 when call to __builtin_expect is false | | 131 | a != ... + ...+0 when call to __builtin_expect is false | | 131 | a != b+42 when call to __builtin_expect is false | | 131 | a == ... + ...+0 when call to __builtin_expect is true | @@ -176,6 +228,8 @@ | 131 | b == a+-42 when call to __builtin_expect is true | | 131 | call to __builtin_expect != 0 when call to __builtin_expect is true | | 131 | call to __builtin_expect == 0 when call to __builtin_expect is false | +| 135 | ... != ... != 0 when call to __builtin_expect is true | +| 135 | ... != ... == 0 when call to __builtin_expect is false | | 135 | ... + ... != a+0 when call to __builtin_expect is true | | 135 | ... + ... == a+0 when call to __builtin_expect is false | | 135 | a != ... + ...+0 when call to __builtin_expect is true | @@ -190,6 +244,8 @@ | 137 | 0 == 0 when 0 is false | | 141 | 42 != a+0 when call to __builtin_expect is false | | 141 | 42 == a+0 when call to __builtin_expect is true | +| 141 | ... == ... != 0 when call to __builtin_expect is true | +| 141 | ... == ... == 0 when call to __builtin_expect is false | | 141 | a != 42 when call to __builtin_expect is false | | 141 | a != 42+0 when call to __builtin_expect is false | | 141 | a == 42 when call to __builtin_expect is true | @@ -198,6 +254,8 @@ | 141 | call to __builtin_expect == 0 when call to __builtin_expect is false | | 145 | 42 != a+0 when call to __builtin_expect is true | | 145 | 42 == a+0 when call to __builtin_expect is false | +| 145 | ... != ... != 0 when call to __builtin_expect is true | +| 145 | ... != ... == 0 when call to __builtin_expect is false | | 145 | a != 42 when call to __builtin_expect is true | | 145 | a != 42+0 when call to __builtin_expect is true | | 145 | a == 42 when call to __builtin_expect is false | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected index c520b48f94e4..c41cdfd6063d 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected @@ -99,10 +99,20 @@ binary | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 75 | 77 | | test.c:75:9:75:14 | ... == ... | test.c:75:14:75:14 | 0 | != | test.c:75:9:75:9 | x | 0 | 78 | 79 | | test.c:75:9:75:14 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | != | test.c:85:13:85:13 | 0 | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:13:85:13 | 0 | != | test.c:85:8:85:8 | x | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 75 | 77 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:9 | x | == | test.c:75:14:75:14 | 0 | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:14:75:14 | 0 | == | test.c:75:9:75:9 | x | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:8:85:8 | x | == | test.c:85:13:85:13 | 0 | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:13:85:13 | 0 | == | test.c:85:8:85:8 | x | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:18:85:18 | y | != | test.c:85:23:85:23 | 0 | 0 | 86 | 86 | @@ -174,11 +184,18 @@ binary unary | test.c:7:9:7:13 | ... > ... | test.c:7:9:7:9 | x | < | 1 | 10 | 11 | | test.c:7:9:7:13 | ... > ... | test.c:7:9:7:9 | x | >= | 1 | 7 | 9 | +| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:13 | ... > ... | != | 0 | 7 | 9 | +| test.c:7:9:7:13 | ... > ... | test.c:7:9:7:13 | ... > ... | == | 0 | 10 | 11 | | test.c:17:8:17:12 | ... < ... | test.c:17:8:17:8 | x | < | 0 | 17 | 17 | | test.c:17:8:17:12 | ... < ... | test.c:17:8:17:8 | x | < | 0 | 18 | 18 | +| test.c:17:8:17:12 | ... < ... | test.c:17:8:17:12 | ... < ... | != | 0 | 17 | 17 | +| test.c:17:8:17:12 | ... < ... | test.c:17:8:17:12 | ... < ... | != | 0 | 18 | 18 | | test.c:17:8:17:21 | ... && ... | test.c:17:8:17:8 | x | < | 0 | 18 | 18 | +| test.c:17:8:17:21 | ... && ... | test.c:17:8:17:12 | ... < ... | != | 0 | 18 | 18 | | test.c:17:8:17:21 | ... && ... | test.c:17:17:17:17 | y | >= | 2 | 18 | 18 | +| test.c:17:8:17:21 | ... && ... | test.c:17:17:17:21 | ... > ... | != | 0 | 18 | 18 | | test.c:17:17:17:21 | ... > ... | test.c:17:17:17:17 | y | >= | 2 | 18 | 18 | +| test.c:17:17:17:21 | ... > ... | test.c:17:17:17:21 | ... > ... | != | 0 | 18 | 18 | | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | < | 1 | 2 | 2 | | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | < | 1 | 31 | 34 | | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | < | 1 | 34 | 34 | @@ -193,6 +210,20 @@ unary | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | < | 1 | 58 | 66 | | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | < | 1 | 62 | 62 | | test.c:26:11:26:15 | ... > ... | test.c:26:11:26:11 | x | >= | 1 | 26 | 28 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | != | 0 | 26 | 28 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 2 | 2 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 31 | 34 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 34 | 34 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 39 | 42 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 42 | 42 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 42 | 44 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 45 | 45 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 45 | 47 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 51 | 53 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 56 | 58 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 58 | 58 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 58 | 66 | +| test.c:26:11:26:15 | ... > ... | test.c:26:11:26:15 | ... > ... | == | 0 | 62 | 62 | | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | < | 10 | 34 | 34 | | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | >= | 10 | 2 | 2 | | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | >= | 10 | 39 | 42 | @@ -205,28 +236,72 @@ unary | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | >= | 10 | 58 | 58 | | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | >= | 10 | 58 | 66 | | test.c:34:16:34:21 | ... < ... | test.c:34:16:34:16 | j | >= | 10 | 62 | 62 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | != | 0 | 34 | 34 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 2 | 2 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 39 | 42 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 42 | 42 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 42 | 44 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 45 | 45 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 45 | 47 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 51 | 53 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 56 | 58 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 58 | 58 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 58 | 66 | +| test.c:34:16:34:21 | ... < ... | test.c:34:16:34:21 | ... < ... | == | 0 | 62 | 62 | | test.c:42:16:42:21 | ... < ... | test.c:42:16:42:16 | j | < | 10 | 42 | 42 | | test.c:42:16:42:21 | ... < ... | test.c:42:16:42:16 | j | < | 10 | 42 | 44 | | test.c:42:16:42:21 | ... < ... | test.c:42:16:42:16 | j | < | 10 | 45 | 45 | | test.c:42:16:42:21 | ... < ... | test.c:42:16:42:16 | j | < | 10 | 45 | 47 | | test.c:42:16:42:21 | ... < ... | test.c:42:16:42:16 | j | < | 10 | 51 | 53 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 42 | 42 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 42 | 44 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 45 | 45 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 45 | 47 | +| test.c:42:16:42:21 | ... < ... | test.c:42:16:42:21 | ... < ... | != | 0 | 51 | 53 | | test.c:44:12:44:16 | ... > ... | test.c:44:12:44:12 | z | < | 1 | 42 | 42 | | test.c:44:12:44:16 | ... > ... | test.c:44:12:44:12 | z | < | 1 | 51 | 53 | | test.c:44:12:44:16 | ... > ... | test.c:44:12:44:12 | z | >= | 1 | 45 | 45 | | test.c:44:12:44:16 | ... > ... | test.c:44:12:44:12 | z | >= | 1 | 45 | 47 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | != | 0 | 45 | 45 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | != | 0 | 45 | 47 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | == | 0 | 42 | 42 | +| test.c:44:12:44:16 | ... > ... | test.c:44:12:44:16 | ... > ... | == | 0 | 51 | 53 | | test.c:45:16:45:20 | ... > ... | test.c:45:16:45:16 | y | >= | 1 | 45 | 47 | +| test.c:45:16:45:20 | ... > ... | test.c:45:16:45:20 | ... > ... | != | 0 | 45 | 47 | | test.c:58:9:58:14 | ... == ... | test.c:58:9:58:9 | x | != | 0 | 58 | 58 | | test.c:58:9:58:14 | ... == ... | test.c:58:9:58:9 | x | != | 0 | 62 | 62 | +| test.c:58:9:58:14 | ... == ... | test.c:58:9:58:14 | ... == ... | == | 0 | 58 | 58 | +| test.c:58:9:58:14 | ... == ... | test.c:58:9:58:14 | ... == ... | == | 0 | 62 | 62 | | test.c:58:9:58:23 | ... \|\| ... | test.c:58:9:58:9 | x | != | 0 | 62 | 62 | +| test.c:58:9:58:23 | ... \|\| ... | test.c:58:9:58:14 | ... == ... | == | 0 | 62 | 62 | | test.c:58:9:58:23 | ... \|\| ... | test.c:58:19:58:19 | y | >= | 0 | 62 | 62 | +| test.c:58:9:58:23 | ... \|\| ... | test.c:58:19:58:23 | ... < ... | == | 0 | 62 | 62 | | test.c:58:19:58:23 | ... < ... | test.c:58:19:58:19 | y | >= | 0 | 62 | 62 | +| test.c:58:19:58:23 | ... < ... | test.c:58:19:58:23 | ... < ... | == | 0 | 62 | 62 | | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | != | 0 | 78 | 79 | | test.c:75:9:75:14 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:75:9:75:14 | ... == ... | == | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | != | 0 | 78 | 79 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 75 | 77 | +| test.c:75:9:75:14 | ... == ... | test.c:85:8:85:13 | ... == ... | == | 0 | 78 | 79 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:9 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:75:9:75:14 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 85 | 85 | | test.c:85:8:85:13 | ... == ... | test.c:85:8:85:8 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:13 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 85 | 85 | +| test.c:85:8:85:13 | ... == ... | test.c:85:8:85:13 | ... == ... | != | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:9 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:75:9:75:14 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:8:85:8 | x | == | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:85:8:85:13 | ... == ... | != | 0 | 86 | 86 | | test.c:85:8:85:23 | ... && ... | test.c:85:18:85:18 | y | != | 0 | 86 | 86 | +| test.c:85:8:85:23 | ... && ... | test.c:85:18:85:23 | ... != ... | != | 0 | 86 | 86 | | test.c:85:18:85:23 | ... != ... | test.c:85:18:85:18 | y | != | 0 | 86 | 86 | +| test.c:85:18:85:23 | ... != ... | test.c:85:18:85:23 | ... != ... | != | 0 | 86 | 86 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | != | 0 | 94 | 96 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 70 | 70 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 99 | 102 | @@ -235,24 +310,49 @@ unary | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 109 | 109 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 109 | 117 | | test.c:94:11:94:16 | ... != ... | test.c:94:11:94:11 | x | == | 0 | 113 | 113 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | != | 0 | 94 | 96 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 70 | 70 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 99 | 102 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 102 | 102 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 107 | 109 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 109 | 109 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 109 | 117 | +| test.c:94:11:94:16 | ... != ... | test.c:94:11:94:16 | ... != ... | == | 0 | 113 | 113 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | < | 10 | 102 | 102 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | >= | 10 | 70 | 70 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | >= | 10 | 107 | 109 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | >= | 10 | 109 | 109 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | >= | 10 | 109 | 117 | | test.c:102:16:102:21 | ... < ... | test.c:102:16:102:16 | j | >= | 10 | 113 | 113 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | != | 0 | 102 | 102 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 70 | 70 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 107 | 109 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 109 | 109 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 109 | 117 | +| test.c:102:16:102:21 | ... < ... | test.c:102:16:102:21 | ... < ... | == | 0 | 113 | 113 | | test.c:109:9:109:14 | ... == ... | test.c:109:9:109:9 | x | != | 0 | 109 | 109 | | test.c:109:9:109:14 | ... == ... | test.c:109:9:109:9 | x | != | 0 | 113 | 113 | +| test.c:109:9:109:14 | ... == ... | test.c:109:9:109:14 | ... == ... | == | 0 | 109 | 109 | +| test.c:109:9:109:14 | ... == ... | test.c:109:9:109:14 | ... == ... | == | 0 | 113 | 113 | | test.c:109:9:109:23 | ... \|\| ... | test.c:109:9:109:9 | x | != | 0 | 113 | 113 | +| test.c:109:9:109:23 | ... \|\| ... | test.c:109:9:109:14 | ... == ... | == | 0 | 113 | 113 | | test.c:109:9:109:23 | ... \|\| ... | test.c:109:19:109:19 | y | >= | 0 | 113 | 113 | +| test.c:109:9:109:23 | ... \|\| ... | test.c:109:19:109:23 | ... < ... | == | 0 | 113 | 113 | | test.c:109:19:109:23 | ... < ... | test.c:109:19:109:19 | y | >= | 0 | 113 | 113 | +| test.c:109:19:109:23 | ... < ... | test.c:109:19:109:23 | ... < ... | == | 0 | 113 | 113 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 126 | 126 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 126 | 128 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 131 | 131 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 131 | 132 | | test.c:126:7:126:7 | 1 | test.c:126:7:126:7 | 1 | != | 0 | 134 | 123 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 126 | 126 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 126 | 128 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 131 | 131 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 131 | 132 | +| test.c:126:7:126:7 | 1 | test.c:127:9:127:9 | 1 | != | 0 | 134 | 123 | | test.c:126:7:126:28 | ... && ... | test.c:126:7:126:7 | 1 | != | 0 | 126 | 128 | | test.c:126:7:126:28 | ... && ... | test.c:126:12:126:26 | call to test3_condition | != | 0 | 126 | 128 | +| test.c:126:7:126:28 | ... && ... | test.c:127:9:127:9 | 1 | != | 0 | 126 | 128 | | test.c:126:12:126:26 | call to test3_condition | test.c:126:12:126:26 | call to test3_condition | != | 0 | 126 | 128 | | test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 | | test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 | @@ -269,6 +369,10 @@ unary | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 34 | 34 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | == | -1 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | == | -1 | 31 | 32 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | != | 0 | 30 | 30 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | != | 0 | 31 | 32 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 0 | 30 | 30 | +| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:13 | ... == ... | == | 0 | 34 | 34 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | != | 0 | 43 | 45 | | test.cpp:42:13:42:20 | call to getABool | test.cpp:42:13:42:20 | call to getABool | == | 0 | 53 | 53 | | test.cpp:61:10:61:10 | i | test.cpp:61:10:61:10 | i | == | 0 | 62 | 64 | @@ -278,13 +382,20 @@ unary | test.cpp:74:10:74:10 | i | test.cpp:74:10:74:10 | i | >= | 0 | 75 | 77 | | test.cpp:74:10:74:10 | i | test.cpp:74:10:74:10 | i | >= | 11 | 78 | 79 | | test.cpp:93:6:93:6 | c | test.cpp:93:6:93:6 | c | != | 0 | 93 | 94 | +| test.cpp:99:6:99:6 | f | test.cpp:99:6:99:6 | f | != | 0 | 99 | 100 | +| test.cpp:105:6:105:14 | ... != ... | test.cpp:105:6:105:14 | ... != ... | != | 0 | 105 | 106 | +| test.cpp:111:6:111:14 | ... != ... | test.cpp:111:6:111:14 | ... != ... | != | 0 | 111 | 112 | | test.cpp:122:9:122:9 | b | test.cpp:122:9:122:9 | b | != | 0 | 123 | 125 | | test.cpp:122:9:122:9 | b | test.cpp:122:9:122:9 | b | != | 0 | 125 | 125 | | test.cpp:125:13:125:20 | ! ... | test.cpp:125:13:125:20 | ! ... | != | 0 | 125 | 125 | | test.cpp:125:14:125:17 | call to safe | test.cpp:125:14:125:17 | call to safe | == | 0 | 125 | 125 | | test.cpp:131:6:131:21 | call to __builtin_expect | test.cpp:131:6:131:21 | call to __builtin_expect | != | 0 | 131 | 132 | +| test.cpp:131:6:131:21 | call to __builtin_expect | test.cpp:131:23:131:33 | ... == ... | != | 0 | 131 | 132 | | test.cpp:135:6:135:21 | call to __builtin_expect | test.cpp:135:6:135:21 | call to __builtin_expect | != | 0 | 135 | 136 | +| test.cpp:135:6:135:21 | call to __builtin_expect | test.cpp:135:23:135:33 | ... != ... | != | 0 | 135 | 136 | | test.cpp:141:6:141:21 | call to __builtin_expect | test.cpp:141:6:141:21 | call to __builtin_expect | != | 0 | 141 | 142 | | test.cpp:141:6:141:21 | call to __builtin_expect | test.cpp:141:23:141:23 | a | == | 42 | 141 | 142 | +| test.cpp:141:6:141:21 | call to __builtin_expect | test.cpp:141:23:141:29 | ... == ... | != | 0 | 141 | 142 | | test.cpp:145:6:145:21 | call to __builtin_expect | test.cpp:145:6:145:21 | call to __builtin_expect | != | 0 | 145 | 146 | | test.cpp:145:6:145:21 | call to __builtin_expect | test.cpp:145:23:145:23 | a | != | 42 | 145 | 146 | +| test.cpp:145:6:145:21 | call to __builtin_expect | test.cpp:145:23:145:29 | ... != ... | != | 0 | 145 | 146 | diff --git a/cpp/ql/test/library-tests/dataflow/asExpr/test-indirect.ql b/cpp/ql/test/library-tests/dataflow/asExpr/test-indirect.ql index b7d6761f02ff..dc71a92ee228 100644 --- a/cpp/ql/test/library-tests/dataflow/asExpr/test-indirect.ql +++ b/cpp/ql/test/library-tests/dataflow/asExpr/test-indirect.ql @@ -1,5 +1,5 @@ import cpp -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.dataflow.new.DataFlow::DataFlow bindingset[s] diff --git a/cpp/ql/test/library-tests/dataflow/asExpr/test.ql b/cpp/ql/test/library-tests/dataflow/asExpr/test.ql index d686aad80613..e17962ce5a94 100644 --- a/cpp/ql/test/library-tests/dataflow/asExpr/test.ql +++ b/cpp/ql/test/library-tests/dataflow/asExpr/test.ql @@ -1,5 +1,5 @@ import cpp -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.dataflow.new.DataFlow::DataFlow bindingset[s] diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/guard-condition-regression-test.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/guard-condition-regression-test.ql index 49b650a07937..a21cd910a2ae 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/guard-condition-regression-test.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/guard-condition-regression-test.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import cpp private import semmle.code.cpp.ir.dataflow.DataFlow private import semmle.code.cpp.controlflow.IRGuards diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql index 4b637fda7144..34afffd8e589 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/has-parameter-flow-out.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import cpp module AstTest { diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-number-of-outnodes.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-number-of-outnodes.ql index 95423a1ec7d7..0877b73a12e4 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-number-of-outnodes.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-number-of-outnodes.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import cpp module AstTest { 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 05e1112d5f3a..da05019829fa 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.ql @@ -1,3 +1,3 @@ import TestBase -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon import MakeTest, IRFlowTest>> diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_argument_flow.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_argument_flow.ql index 95f992f39f5a..ef1488d2adcf 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_argument_flow.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_argument_flow.ql @@ -1,6 +1,6 @@ import cpp import semmle.code.cpp.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_parameter_flow.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_parameter_flow.ql index c6ea9c5c96f3..b078c4bff9cf 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_parameter_flow.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test_self_parameter_flow.ql @@ -1,6 +1,6 @@ import cpp import semmle.code.cpp.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.ql index b246f392a8d3..3e5f9165ef81 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.ql +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import cpp module AstTest { diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql index 8ca0df3fa561..7d41597c3b8e 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon import cpp import semmle.code.cpp.security.FlowSources import IRTest::IRFlow::PathGraph diff --git a/cpp/ql/test/library-tests/dataflow/fields/flow.ql b/cpp/ql/test/library-tests/dataflow/fields/flow.ql index 433aa0ad68fb..5bf8302310bc 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/flow.ql +++ b/cpp/ql/test/library-tests/dataflow/fields/flow.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon module AstTest { import ASTConfiguration diff --git a/cpp/ql/test/library-tests/dataflow/models-as-data/interpretElement.ql b/cpp/ql/test/library-tests/dataflow/models-as-data/interpretElement.ql index d8d4d2d282e6..ccf0c3f886dc 100644 --- a/cpp/ql/test/library-tests/dataflow/models-as-data/interpretElement.ql +++ b/cpp/ql/test/library-tests/dataflow/models-as-data/interpretElement.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import testModels module InterpretElementTest implements TestSig { diff --git a/cpp/ql/test/library-tests/dataflow/models-as-data/taint.ql b/cpp/ql/test/library-tests/dataflow/models-as-data/taint.ql index 3b924dbb7226..8c362d78e3e7 100644 --- a/cpp/ql/test/library-tests/dataflow/models-as-data/taint.ql +++ b/cpp/ql/test/library-tests/dataflow/models-as-data/taint.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon import testModels module IRTest { diff --git a/cpp/ql/test/library-tests/dataflow/parameters-without-defs/test.ql b/cpp/ql/test/library-tests/dataflow/parameters-without-defs/test.ql index 13a818d50b2e..d8cce8623ad3 100644 --- a/cpp/ql/test/library-tests/dataflow/parameters-without-defs/test.ql +++ b/cpp/ql/test/library-tests/dataflow/parameters-without-defs/test.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon import semmle.code.cpp.dataflow.new.DataFlow module ParamConfig implements DataFlow::ConfigSig { diff --git a/cpp/ql/test/library-tests/dataflow/smart-pointers-taint/taint.ql b/cpp/ql/test/library-tests/dataflow/smart-pointers-taint/taint.ql index b887539d5888..f8d8a3594884 100644 --- a/cpp/ql/test/library-tests/dataflow/smart-pointers-taint/taint.ql +++ b/cpp/ql/test/library-tests/dataflow/smart-pointers-taint/taint.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon module AstTest { private import semmle.code.cpp.dataflow.TaintTracking diff --git a/cpp/ql/test/library-tests/dataflow/source-sink-tests/local-flow.ql b/cpp/ql/test/library-tests/dataflow/source-sink-tests/local-flow.ql index 15f5f43576a3..6c8d3ca060a2 100644 --- a/cpp/ql/test/library-tests/dataflow/source-sink-tests/local-flow.ql +++ b/cpp/ql/test/library-tests/dataflow/source-sink-tests/local-flow.ql @@ -1,7 +1,7 @@ /** This tests that we are able to detect local flow sources. */ import cpp -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.security.FlowSources module LocalFlowSourceTest implements TestSig { diff --git a/cpp/ql/test/library-tests/dataflow/source-sink-tests/remote-flow.ql b/cpp/ql/test/library-tests/dataflow/source-sink-tests/remote-flow.ql index 45427141fe0f..ff137d8ba964 100644 --- a/cpp/ql/test/library-tests/dataflow/source-sink-tests/remote-flow.ql +++ b/cpp/ql/test/library-tests/dataflow/source-sink-tests/remote-flow.ql @@ -1,7 +1,7 @@ /** This tests that we are able to detect remote flow sources and sinks. */ import cpp -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.security.FlowSources module RemoteFlowSourceTest implements TestSig { diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql index 147730278176..f5f483cdf1b6 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.FlowTestCommon +import utils.test.dataflow.FlowTestCommon module TaintModels { class SetMemberFunction extends TaintFunction { diff --git a/cpp/ql/test/library-tests/ir/modulus-analysis/ModulusAnalysis.ql b/cpp/ql/test/library-tests/ir/modulus-analysis/ModulusAnalysis.ql index 229cc240c9ed..5c822ff964d4 100644 --- a/cpp/ql/test/library-tests/ir/modulus-analysis/ModulusAnalysis.ql +++ b/cpp/ql/test/library-tests/ir/modulus-analysis/ModulusAnalysis.ql @@ -7,7 +7,7 @@ import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.RangeAnalysi import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.RangeAnalysisImpl import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticExprSpecific import semmle.code.cpp.ir.IR as IR -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ModulusAnalysisInstantiated = ModulusAnalysis; diff --git a/cpp/ql/test/library-tests/ir/points_to/points_to.ql b/cpp/ql/test/library-tests/ir/points_to/points_to.ql index e05e4ce8f0ca..5f17d489dc81 100644 --- a/cpp/ql/test/library-tests/ir/points_to/points_to.ql +++ b/cpp/ql/test/library-tests/ir/points_to/points_to.ql @@ -1,5 +1,5 @@ import cpp -private import TestUtilities.InlineExpectationsTest +private import utils.test.InlineExpectationsTest private import semmle.code.cpp.ir.internal.IntegerConstant as Ints private predicate ignoreAllocation(string name) { diff --git a/cpp/ql/test/library-tests/ir/range-analysis/Overflow.ql b/cpp/ql/test/library-tests/ir/range-analysis/Overflow.ql index 40d80f3d7b00..94b94fea7617 100644 --- a/cpp/ql/test/library-tests/ir/range-analysis/Overflow.ql +++ b/cpp/ql/test/library-tests/ir/range-analysis/Overflow.ql @@ -1,6 +1,6 @@ import cpp import semmle.code.cpp.rangeanalysis.new.SimpleRangeAnalysis -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module RangeAnalysisTest implements TestSig { string getARelevantTag() { result = "overflow" } diff --git a/cpp/ql/test/library-tests/ir/range-analysis/RangeAnalysis.ql b/cpp/ql/test/library-tests/ir/range-analysis/RangeAnalysis.ql index b5a86c23d97c..b7413b1d6df6 100644 --- a/cpp/ql/test/library-tests/ir/range-analysis/RangeAnalysis.ql +++ b/cpp/ql/test/library-tests/ir/range-analysis/RangeAnalysis.ql @@ -3,7 +3,7 @@ import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.RangeAnalysi import semmle.code.cpp.rangeanalysis.new.internal.semantic.Semantic import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticExprSpecific import semmle.code.cpp.ir.IR as IR -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module RangeAnalysisTest implements TestSig { string getARelevantTag() { result = "range" } diff --git a/cpp/ql/test/library-tests/ir/sign-analysis/SignAnalysis.ql b/cpp/ql/test/library-tests/ir/sign-analysis/SignAnalysis.ql index cba373a60a12..584fd62c6d90 100644 --- a/cpp/ql/test/library-tests/ir/sign-analysis/SignAnalysis.ql +++ b/cpp/ql/test/library-tests/ir/sign-analysis/SignAnalysis.ql @@ -5,7 +5,7 @@ import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.FloatDelta import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.RangeAnalysisRelativeSpecific import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticExprSpecific import semmle.code.cpp.ir.IR as IR -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SignAnalysisInstantiated = SignAnalysis; diff --git a/cpp/ql/test/library-tests/ir/types/irtypes.ql b/cpp/ql/test/library-tests/ir/types/irtypes.ql index eb69111465b6..6766f037dde9 100644 --- a/cpp/ql/test/library-tests/ir/types/irtypes.ql +++ b/cpp/ql/test/library-tests/ir/types/irtypes.ql @@ -1,6 +1,6 @@ private import cpp private import semmle.code.cpp.ir.implementation.raw.IR -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module IRTypesTest implements TestSig { string getARelevantTag() { result = "irtype" } diff --git a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected index dac8afd3fd31..1edf3b1ae99f 100644 --- a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected +++ b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/MissingCheckScanf.expected @@ -52,6 +52,9 @@ edges | test.cpp:541:39:541:40 | sscanf output argument | test.cpp:549:8:549:8 | e | provenance | | | test.cpp:541:43:541:44 | sscanf output argument | test.cpp:545:8:545:8 | f | provenance | | | test.cpp:541:43:541:44 | sscanf output argument | test.cpp:550:8:550:8 | f | provenance | | +| test.cpp:559:30:559:31 | scanf output argument | test.cpp:561:9:561:9 | i | provenance | | +| test.cpp:567:35:567:36 | scanf output argument | test.cpp:569:9:569:9 | i | provenance | | +| test.cpp:575:30:575:31 | scanf output argument | test.cpp:577:9:577:9 | i | provenance | | nodes | test.cpp:34:15:34:16 | scanf output argument | semmle.label | scanf output argument | | test.cpp:35:7:35:7 | i | semmle.label | i | @@ -154,6 +157,12 @@ nodes | test.cpp:548:8:548:8 | d | semmle.label | d | | test.cpp:549:8:549:8 | e | semmle.label | e | | test.cpp:550:8:550:8 | f | semmle.label | f | +| test.cpp:559:30:559:31 | scanf output argument | semmle.label | scanf output argument | +| test.cpp:561:9:561:9 | i | semmle.label | i | +| test.cpp:567:35:567:36 | scanf output argument | semmle.label | scanf output argument | +| test.cpp:569:9:569:9 | i | semmle.label | i | +| test.cpp:575:30:575:31 | scanf output argument | semmle.label | scanf output argument | +| test.cpp:577:9:577:9 | i | semmle.label | i | subpaths #select | test.cpp:35:7:35:7 | i | test.cpp:34:15:34:16 | scanf output argument | test.cpp:35:7:35:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:34:3:34:7 | call to scanf | call to scanf | @@ -177,3 +186,5 @@ subpaths | test.cpp:484:9:484:9 | i | test.cpp:480:25:480:26 | scanf output argument | test.cpp:484:9:484:9 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:480:13:480:17 | call to scanf | call to scanf | | test.cpp:495:8:495:8 | i | test.cpp:491:25:491:26 | scanf output argument | test.cpp:495:8:495:8 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:491:13:491:17 | call to scanf | call to scanf | | test.cpp:545:8:545:8 | f | test.cpp:541:43:541:44 | sscanf output argument | test.cpp:545:8:545:8 | f | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 3. | test.cpp:541:10:541:15 | call to sscanf | call to sscanf | +| test.cpp:569:9:569:9 | i | test.cpp:567:35:567:36 | scanf output argument | test.cpp:569:9:569:9 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:567:23:567:27 | call to scanf | call to scanf | +| test.cpp:577:9:577:9 | i | test.cpp:575:30:575:31 | scanf output argument | test.cpp:577:9:577:9 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:575:18:575:22 | call to scanf | call to scanf | diff --git a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.cpp b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.cpp index efc37060a554..9cfad40a1480 100644 --- a/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.cpp +++ b/cpp/ql/test/query-tests/Critical/MissingCheckScanf/test.cpp @@ -553,3 +553,27 @@ void switch_cases(const char *data) { break; } } + +void test_scanf_compared_right_away() { + int i; + bool success = scanf("%d", &i) == 1; + if(success) { + use(i); // GOOD + } +} + +void test_scanf_compared_in_conjunct_right(bool b) { + int i; + bool success = b && scanf("%d", &i) == 1; + if(success) { + use(i); // GOOD [FALSE POSITIVE] + } +} + +void test_scanf_compared_in_conjunct_left(bool b) { + int i; + bool success = scanf("%d", &i) == 1 && b; + if(success) { + use(i); // GOOD [FALSE POSITIVE] + } +} diff --git a/cpp/ql/test/query-tests/Critical/SizeCheck/SizeCheck.qlref b/cpp/ql/test/query-tests/Critical/SizeCheck/SizeCheck.qlref index a1ab57f2b750..cfeba67e8360 100644 --- a/cpp/ql/test/query-tests/Critical/SizeCheck/SizeCheck.qlref +++ b/cpp/ql/test/query-tests/Critical/SizeCheck/SizeCheck.qlref @@ -1,2 +1,2 @@ query: Critical/SizeCheck.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.qlref b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.qlref index db270a97f3e2..399ff4f1909f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.qlref +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-022/semmle/tests/TaintedPath.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-022/TaintedPath.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-193/AllocationToInvalidPointer.ql b/cpp/ql/test/query-tests/Security/CWE/CWE-193/AllocationToInvalidPointer.ql index 50baab4bfa7a..e342074efe9d 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-193/AllocationToInvalidPointer.ql +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-193/AllocationToInvalidPointer.ql @@ -1,6 +1,6 @@ import cpp import semmle.code.cpp.security.InvalidPointerDereference.AllocationToInvalidPointer -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.ir.IR import semmle.code.cpp.dataflow.new.DataFlow diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-193/InvalidPointerToDereference.ql b/cpp/ql/test/query-tests/Security/CWE/CWE-193/InvalidPointerToDereference.ql index c4d9be5cb8bd..314a914e1f60 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-193/InvalidPointerToDereference.ql +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-193/InvalidPointerToDereference.ql @@ -1,6 +1,6 @@ import cpp import semmle.code.cpp.security.InvalidPointerDereference.InvalidPointerToDereference -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.cpp.ir.IR import semmle.code.cpp.dataflow.new.DataFlow diff --git a/csharp/documentation/library-coverage/coverage.csv b/csharp/documentation/library-coverage/coverage.csv index 50035b8a0099..af12752f4efd 100644 --- a/csharp/documentation/library-coverage/coverage.csv +++ b/csharp/documentation/library-coverage/coverage.csv @@ -13,7 +13,7 @@ JsonToItemsTaskFactory,,,11,,,,,,,,,,,,,,,,,,,1,10 Microsoft.Android.Build,,1,14,,,,,,,,,,,,,1,,,,,,12,2 Microsoft.Apple.Build,,,7,,,,,,,,,,,,,,,,,,,7, Microsoft.ApplicationBlocks.Data,28,,,,,,,,,,,,28,,,,,,,,,, -Microsoft.AspNetCore.Components,,2,1,,,,,,,,,,,,,,,,2,,,1, +Microsoft.AspNetCore.Components,2,2,2,,,,,,,2,,,,,,,,,2,,,1,1 Microsoft.AspNetCore.Mvc,,,2,,,,,,,,,,,,,,,,,,,,2 Microsoft.AspNetCore.WebUtilities,,,2,,,,,,,,,,,,,,,,,,,2, Microsoft.CSharp,,,2,,,,,,,,,,,,,,,,,,,2, diff --git a/csharp/documentation/library-coverage/coverage.rst b/csharp/documentation/library-coverage/coverage.rst index 77354aa656dd..6ec6761ee58b 100644 --- a/csharp/documentation/library-coverage/coverage.rst +++ b/csharp/documentation/library-coverage/coverage.rst @@ -9,6 +9,6 @@ C# framework & library support Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting` `ServiceStack `_,"``ServiceStack.*``, ``ServiceStack``",,7,194, System,"``System.*``, ``System``",47,10819,54,5 - Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.AspNetCore.Components``, ``Microsoft.AspNetCore.Mvc``, ``Microsoft.AspNetCore.WebUtilities``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.DotNet.PlatformAbstractions``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.JSInterop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.Sdk.WebAssembly``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",59,2073,150,2 - Totals,,106,12899,398,7 + Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.AspNetCore.Components``, ``Microsoft.AspNetCore.Mvc``, ``Microsoft.AspNetCore.WebUtilities``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.DotNet.PlatformAbstractions``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.JSInterop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.Sdk.WebAssembly``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",59,2074,152,4 + Totals,,106,12900,400,9 diff --git a/csharp/ql/lib/change-notes/2024-12-12-add-markupstring-as-html-injection-sink.md b/csharp/ql/lib/change-notes/2024-12-12-add-markupstring-as-html-injection-sink.md new file mode 100644 index 000000000000..032edbb1f102 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-12-12-add-markupstring-as-html-injection-sink.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added the constructor and explicit cast operator of `Microsoft.AspNetCore.Components.MarkupString` as an `html-injection` sink. This will help catch cross-site scripting resulting from using `MarkupString`. diff --git a/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.CompilerServices.model.yml b/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.CompilerServices.model.yml new file mode 100644 index 000000000000..6e99410d98c9 --- /dev/null +++ b/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.CompilerServices.model.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["Microsoft.AspNetCore.Components.CompilerServices", "RuntimeHelpers", False, "TypeCheck", "(T)", "", "Argument[0]", "ReturnValue", "value", "manual"] diff --git a/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.model.yml b/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.model.yml index 13c7168a1d19..8617d8e90f0d 100644 --- a/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.model.yml +++ b/csharp/ql/lib/ext/Microsoft.AspNetCore.Components.model.yml @@ -10,3 +10,9 @@ extensions: extensible: summaryModel data: - ["Microsoft.AspNetCore.Components", "NagivationManager", True, "ToAbsoluteUri", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - addsTo: + pack: codeql/csharp-all + extensible: sinkModel + data: + - ["Microsoft.AspNetCore.Components", "MarkupString", False, "MarkupString", "(System.String)", "", "Argument[0]", "html-injection", "manual"] + - ["Microsoft.AspNetCore.Components", "MarkupString", False, "op_Explicit", "(System.String)", "", "Argument[0]", "html-injection", "manual"] diff --git a/csharp/ql/test/TestUtilities/InlineExpectationsTest.qll b/csharp/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from csharp/ql/test/TestUtilities/InlineExpectationsTest.qll rename to csharp/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/csharp/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/csharp/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from csharp/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to csharp/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/csharp/ql/test/TestUtilities/InlineFlowTest.qll b/csharp/ql/lib/utils/test/InlineFlowTest.qll similarity index 100% rename from csharp/ql/test/TestUtilities/InlineFlowTest.qll rename to csharp/ql/lib/utils/test/InlineFlowTest.qll diff --git a/csharp/ql/test/TestUtilities/InlineMadTest.qll b/csharp/ql/lib/utils/test/InlineMadTest.qll similarity index 100% rename from csharp/ql/test/TestUtilities/InlineMadTest.qll rename to csharp/ql/lib/utils/test/InlineMadTest.qll diff --git a/csharp/ql/test/TestUtilities/PrettyPrintModels.ql b/csharp/ql/lib/utils/test/PrettyPrintModels.ql similarity index 100% rename from csharp/ql/test/TestUtilities/PrettyPrintModels.ql rename to csharp/ql/lib/utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/TestUtilities/ProvenancePathGraph.qll b/csharp/ql/lib/utils/test/ProvenancePathGraph.qll similarity index 100% rename from csharp/ql/test/TestUtilities/ProvenancePathGraph.qll rename to csharp/ql/lib/utils/test/ProvenancePathGraph.qll diff --git a/csharp/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/csharp/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from csharp/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to csharp/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/csharp/ql/test/TestUtilities/inline-tests/PathProblemQuery.qlref b/csharp/ql/test/TestUtilities/inline-tests/PathProblemQuery.qlref deleted file mode 100644 index cbc554598f33..000000000000 --- a/csharp/ql/test/TestUtilities/inline-tests/PathProblemQuery.qlref +++ /dev/null @@ -1,2 +0,0 @@ -query: TestUtilities/inline-tests/queries/PathProblemQuery.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/TestUtilities/inline-tests/ProblemQuery.qlref b/csharp/ql/test/TestUtilities/inline-tests/ProblemQuery.qlref deleted file mode 100644 index d5afc6a690f2..000000000000 --- a/csharp/ql/test/TestUtilities/inline-tests/ProblemQuery.qlref +++ /dev/null @@ -1,2 +0,0 @@ -query: TestUtilities/inline-tests/queries/ProblemQuery.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/experimental/Security Features/CWE-759/HashWithoutSalt.qlref b/csharp/ql/test/experimental/Security Features/CWE-759/HashWithoutSalt.qlref index 6489a3400571..4816eabeacbc 100644 --- a/csharp/ql/test/experimental/Security Features/CWE-759/HashWithoutSalt.qlref +++ b/csharp/ql/test/experimental/Security Features/CWE-759/HashWithoutSalt.qlref @@ -1,2 +1,2 @@ query: experimental/Security Features/CWE-759/HashWithoutSalt.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/library-tests/dataflow/async/Async.ql b/csharp/ql/test/library-tests/dataflow/async/Async.ql index 127a889778c6..fb546d2b4337 100644 --- a/csharp/ql/test/library-tests/dataflow/async/Async.ql +++ b/csharp/ql/test/library-tests/dataflow/async/Async.ql @@ -1,5 +1,5 @@ import csharp -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance class MySink extends DataFlow::ExprNode { MySink() { diff --git a/csharp/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql b/csharp/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql index 89bd8ff456e8..5d63ff124caa 100644 --- a/csharp/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql +++ b/csharp/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql @@ -17,7 +17,7 @@ class StringConstCompareBarrier extends DataFlow::Node { } } -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import PathGraph module FlowConfig implements DataFlow::ConfigSig { diff --git a/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.ql b/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.ql index 944f3888cea0..67553b5cbc9f 100644 --- a/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance module ArrayFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ObjectCreation } diff --git a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.ql b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.ql index f47c9f4e9a40..f5ad52b8daaa 100644 --- a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import ValueFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql index faba0fc8d002..4a60c2be1cf8 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql @@ -4,7 +4,7 @@ import csharp import semmle.code.csharp.dataflow.internal.ExternalFlow -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance import ModelValidation module TaintConfig implements DataFlow::ConfigSig { diff --git a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.ql b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.ql index 9336e1b28be0..9ab95f59caf3 100644 --- a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql b/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql index aff922884ff5..380de97d8b34 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/stored/database/dapper/DatabaseSources.ql @@ -1,6 +1,6 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest module DatabaseConfig implements DataFlow::ConfigSig { diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql b/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql index ad8a40fa0741..032b51da5f6a 100644 --- a/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql +++ b/csharp/ql/test/library-tests/dataflow/flowsources/stored/file/Files.ql @@ -1,6 +1,6 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest module FilesConfig implements DataFlow::ConfigSig { diff --git a/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.ql b/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.ql index ae9da166ec1a..ef61d97718ef 100644 --- a/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.ql +++ b/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.ql @@ -4,7 +4,7 @@ import csharp import Common -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from Flow::PathNode source, Flow::PathNode sink, string s where diff --git a/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.ql b/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.ql index 3ac00ad6b71c..2380a2c8d55b 100644 --- a/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.ql +++ b/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.ql @@ -4,7 +4,7 @@ import csharp import Common -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance module Taint = TaintTracking::Global; diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected index a7c87af0bfe0..e08060fe3436 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected @@ -250,6 +250,8 @@ sink | Dapper;SqlMapper;QuerySingleOrDefaultAsync;(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable);Argument[1];sql-injection;manual | | Dapper;SqlMapper;QuerySingleOrDefaultAsync;(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable);Argument[2];sql-injection;manual | | Dapper;SqlMapper;QuerySingleOrDefaultAsync;(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable);Argument[1];sql-injection;manual | +| Microsoft.AspNetCore.Components;MarkupString;MarkupString;(System.String);Argument[0];html-injection;manual | +| Microsoft.AspNetCore.Components;MarkupString;op_Explicit;(System.String);Argument[0];html-injection;manual | | Microsoft.EntityFrameworkCore;RelationalDatabaseFacadeExtensions;ExecuteSqlRaw;(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Collections.Generic.IEnumerable);Argument[1];sql-injection;manual | | Microsoft.EntityFrameworkCore;RelationalDatabaseFacadeExtensions;ExecuteSqlRaw;(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Object[]);Argument[1];sql-injection;manual | | Microsoft.EntityFrameworkCore;RelationalDatabaseFacadeExtensions;ExecuteSqlRawAsync;(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken);Argument[1];sql-injection;manual | @@ -951,6 +953,7 @@ summary | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeAsynchronousDelegate;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeAsynchronousDelegate;(System.Func);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeSynchronousDelegate;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | +| Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;TypeCheck;(T);Argument[0];ReturnValue;value;manual | | Microsoft.AspNetCore.Components.Forms.Mapping;FormValueMappingContext;set_MapErrorToContainer;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.Forms.Mapping;FormValueMappingContext;set_OnError;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.Forms;EditContext;GetValidationMessages;(System.Linq.Expressions.Expression>);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected index 1d6443748b86..79bc3c9fa8b4 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected @@ -164,6 +164,7 @@ | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeAsynchronousDelegate;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeAsynchronousDelegate;(System.Func);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;InvokeSynchronousDelegate;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | +| Microsoft.AspNetCore.Components.CompilerServices;RuntimeHelpers;TypeCheck;(T);Argument[0];ReturnValue;value;manual | | Microsoft.AspNetCore.Components.Forms.Mapping;FormValueMappingContext;set_MapErrorToContainer;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.Forms.Mapping;FormValueMappingContext;set_OnError;(System.Action);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | | Microsoft.AspNetCore.Components.Forms;EditContext;GetValidationMessages;(System.Linq.Expressions.Expression>);Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | diff --git a/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.ql b/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.ql index 9336e1b28be0..9ab95f59caf3 100644 --- a/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/patterns/PatternFlow.ql b/csharp/ql/test/library-tests/dataflow/patterns/PatternFlow.ql index 9336e1b28be0..9ab95f59caf3 100644 --- a/csharp/ql/test/library-tests/dataflow/patterns/PatternFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/patterns/PatternFlow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest1.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest1.ql index 6ab5dd571c5e..20ab589fd032 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest1.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest1.ql @@ -3,7 +3,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest2.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest2.ql index 6cf8420b7faa..a81df801fe10 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest2.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest2.ql @@ -4,7 +4,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest3.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest3.ql index e5f4bf043ec9..e849ce86ef1c 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest3.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest3.ql @@ -4,7 +4,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest4.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest4.ql index 5111ef4b12bd..2af01bef7c09 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest4.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest4.ql @@ -3,7 +3,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ql index 9db0ca27bbcd..7bf450232d55 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ql @@ -4,7 +4,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest6.ql b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest6.ql index 142e8d9c6462..9a081d385fe2 100644 --- a/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest6.ql +++ b/csharp/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest6.ql @@ -5,7 +5,7 @@ */ import Test -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance from ThreatModel::PathNode source, ThreatModel::PathNode sink where ThreatModel::flowPath(source, sink) diff --git a/csharp/ql/test/library-tests/dataflow/tuples/Tuples.ql b/csharp/ql/test/library-tests/dataflow/tuples/Tuples.ql index 9336e1b28be0..9ab95f59caf3 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/Tuples.ql +++ b/csharp/ql/test/library-tests/dataflow/tuples/Tuples.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/typeflow-dispatch/TypeFlowDispatch.ql b/csharp/ql/test/library-tests/dataflow/typeflow-dispatch/TypeFlowDispatch.ql index 9336e1b28be0..9ab95f59caf3 100644 --- a/csharp/ql/test/library-tests/dataflow/typeflow-dispatch/TypeFlowDispatch.ql +++ b/csharp/ql/test/library-tests/dataflow/typeflow-dispatch/TypeFlowDispatch.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph diff --git a/csharp/ql/test/library-tests/dataflow/types/Types.ql b/csharp/ql/test/library-tests/dataflow/types/Types.ql index be631788642d..92066d19c32b 100644 --- a/csharp/ql/test/library-tests/dataflow/types/Types.ql +++ b/csharp/ql/test/library-tests/dataflow/types/Types.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import PathGraph module TypesConfig implements DataFlow::ConfigSig { diff --git a/csharp/ql/test/library-tests/frameworks/EntityFramework/Dataflow.ql b/csharp/ql/test/library-tests/frameworks/EntityFramework/Dataflow.ql index 10b423d41dcd..297a2dd54c26 100644 --- a/csharp/ql/test/library-tests/frameworks/EntityFramework/Dataflow.ql +++ b/csharp/ql/test/library-tests/frameworks/EntityFramework/Dataflow.ql @@ -3,7 +3,7 @@ */ import csharp -import TestUtilities.ProvenancePathGraph::ShowProvenance +import utils.test.ProvenancePathGraph::ShowProvenance module TaintConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node.asExpr().getValue() = "tainted" } diff --git a/csharp/ql/test/query-tests/Security Features/CWE-020/UntrustedDataToExternalAPI.qlref b/csharp/ql/test/query-tests/Security Features/CWE-020/UntrustedDataToExternalAPI.qlref index 1629c8650f81..22d3fe2ef63c 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-020/UntrustedDataToExternalAPI.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-020/UntrustedDataToExternalAPI.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-020/UntrustedDataToExternalAPI.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath/TaintedPath.qlref b/csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath/TaintedPath.qlref index 4e15db2d2d08..10abc41286cf 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath/TaintedPath.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath/TaintedPath.qlref @@ -1,3 +1,3 @@ query: Security Features/CWE-022/TaintedPath.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-022/ZipSlip/ZipSlip.qlref b/csharp/ql/test/query-tests/Security Features/CWE-022/ZipSlip/ZipSlip.qlref index 7f7fff94e7a9..f8a7ab34e883 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-022/ZipSlip/ZipSlip.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-022/ZipSlip/ZipSlip.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-022/ZipSlip.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.qlref index c876a6691386..366f5105393f 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-078/CommandInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref index 15face9de9c1..89b5b951bdb6 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-079/XSS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSS/XSS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-079/XSS/XSS.qlref index df73539b55cd..493a5fb796e0 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSS/XSS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSS/XSS.qlref @@ -1,4 +1,4 @@ query: Security Features/CWE-079/XSS.ql postprocess: - - TestUtilities/PrettyPrintModels.ql - - TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.qlref index 15face9de9c1..89b5b951bdb6 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/XSSAsp/XSS.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-079/XSS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.qlref index 8608b7dc3e81..56829ee8e8fc 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-089/SqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.qlref index ef040a2867f8..06bd1eedc4f4 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-090/LDAPInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-091/XMLInjection/XMLInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-091/XMLInjection/XMLInjection.qlref index a35c7cfa2df5..e39297fce167 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-091/XMLInjection/XMLInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-091/XMLInjection/XMLInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-091/XMLInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.qlref index 0a90486d1c95..80eedc1b4c7c 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-094/CodeInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-099/ResourceInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-099/ResourceInjection.qlref index 2c7103f64d8d..5292de5ee84f 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-099/ResourceInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-099/ResourceInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-099/ResourceInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-112/MissingXMLValidation.qlref b/csharp/ql/test/query-tests/Security Features/CWE-112/MissingXMLValidation.qlref index 5eef94968aa3..6f71112a01c1 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-112/MissingXMLValidation.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-112/MissingXMLValidation.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-112/MissingXMLValidation.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-114/AssemblyPathInjection/AssemblyPathInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-114/AssemblyPathInjection/AssemblyPathInjection.qlref index ff4df6499c8d..5979609654f9 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-114/AssemblyPathInjection/AssemblyPathInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-114/AssemblyPathInjection/AssemblyPathInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-114/AssemblyPathInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.qlref b/csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.qlref index d4d8a972c11d..a41529bfeb1c 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-117/LogForging.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.qlref b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.qlref index 61d6f67e3a0c..88de17860f9c 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-134/UncontrolledFormatString.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-201/ExposureInTransmittedData/ExposureInTransmittedData.qlref b/csharp/ql/test/query-tests/Security Features/CWE-201/ExposureInTransmittedData/ExposureInTransmittedData.qlref index 5564a9e8e949..9ce9ee5643ef 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-201/ExposureInTransmittedData/ExposureInTransmittedData.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-201/ExposureInTransmittedData/ExposureInTransmittedData.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-201/ExposureInTransmittedData.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-209/ExceptionInformationExposure.qlref b/csharp/ql/test/query-tests/Security Features/CWE-209/ExceptionInformationExposure.qlref index 175f84767e45..e8813fef7a81 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-209/ExceptionInformationExposure.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-209/ExceptionInformationExposure.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-209/ExceptionInformationExposure.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-321/HardcodedSymmetricEncryptionKey/HardcodedSymmetricEncryptionKey.qlref b/csharp/ql/test/query-tests/Security Features/CWE-321/HardcodedSymmetricEncryptionKey/HardcodedSymmetricEncryptionKey.qlref index 9b2ed1c95a16..5ec9c0d849c1 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-321/HardcodedSymmetricEncryptionKey/HardcodedSymmetricEncryptionKey.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-321/HardcodedSymmetricEncryptionKey/HardcodedSymmetricEncryptionKey.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-321/HardcodedEncryptionKey.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-338/InsecureRandomness.qlref b/csharp/ql/test/query-tests/Security Features/CWE-338/InsecureRandomness.qlref index c21167a0d4a9..b2198beb2b45 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-338/InsecureRandomness.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-338/InsecureRandomness.qlref @@ -1,2 +1,2 @@ query: Security Features/InsecureRandomness.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInput/UnsafeDeserializationUntrustedInput.qlref b/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInput/UnsafeDeserializationUntrustedInput.qlref index eacae70c36be..a1ffb72bf108 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInput/UnsafeDeserializationUntrustedInput.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInput/UnsafeDeserializationUntrustedInput.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInputNewtonsoftJson/UnsafeDeserializationUntrustedInput.qlref b/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInputNewtonsoftJson/UnsafeDeserializationUntrustedInput.qlref index eacae70c36be..a1ffb72bf108 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInputNewtonsoftJson/UnsafeDeserializationUntrustedInput.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-502/UnsafeDeserializationUntrustedInputNewtonsoftJson/UnsafeDeserializationUntrustedInput.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.qlref b/csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.qlref index a8908c241def..fdb38b9ffc00 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-601/UrlRedirect/UrlRedirect.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-601/UrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-611/UntrustedDataInsecureXml.qlref b/csharp/ql/test/query-tests/Security Features/CWE-611/UntrustedDataInsecureXml.qlref index 967c6ca922e2..7f685106e250 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-611/UntrustedDataInsecureXml.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-611/UntrustedDataInsecureXml.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-611/UntrustedDataInsecureXml.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-611/UseXmlSecureResolver.qlref b/csharp/ql/test/query-tests/Security Features/CWE-611/UseXmlSecureResolver.qlref index 244e05d7e27c..b11f53079246 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-611/UseXmlSecureResolver.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-611/UseXmlSecureResolver.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-611/UseXmlSecureResolver.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.qlref index 94967d34da39..a0cdca4727ae 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-643/XPathInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoS/ReDoS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoS/ReDoS.qlref index ffa0c552ba64..de8c70102e05 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoS/ReDoS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoS/ReDoS.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-730/ReDoS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoSGlobalTimeout/ReDoS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoSGlobalTimeout/ReDoS.qlref index ffa0c552ba64..de8c70102e05 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoSGlobalTimeout/ReDoS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-730/ReDoSGlobalTimeout/ReDoS.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-730/ReDoS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-730/RegexInjection/RegexInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-730/RegexInjection/RegexInjection.qlref index 2dff84f920fd..bec7fbac79a5 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-730/RegexInjection/RegexInjection.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-730/RegexInjection/RegexInjection.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-730/RegexInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-807/ConditionalBypass.qlref b/csharp/ql/test/query-tests/Security Features/CWE-807/ConditionalBypass.qlref index bb429faf450f..b0c208da3481 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-807/ConditionalBypass.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-807/ConditionalBypass.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-807/ConditionalBypass.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-838/InappropriateEncoding.qlref b/csharp/ql/test/query-tests/Security Features/CWE-838/InappropriateEncoding.qlref index 453e706f9422..d70d82f47195 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-838/InappropriateEncoding.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-838/InappropriateEncoding.qlref @@ -1,2 +1,2 @@ query: Security Features/CWE-838/InappropriateEncoding.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/csharp/ql/test/query-tests/Useless Code/UnusedLabel/UnusedLabel.qlref b/csharp/ql/test/query-tests/Useless Code/UnusedLabel/UnusedLabel.qlref index bbf7012c6eea..ae852d3ce4de 100644 --- a/csharp/ql/test/query-tests/Useless Code/UnusedLabel/UnusedLabel.qlref +++ b/csharp/ql/test/query-tests/Useless Code/UnusedLabel/UnusedLabel.qlref @@ -1,2 +1,2 @@ query: Useless code/UnusedLabel.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/TestUtilities/inline-tests/InlineTests.cs b/csharp/ql/test/utils/inline-tests/InlineTests.cs similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/InlineTests.cs rename to csharp/ql/test/utils/inline-tests/InlineTests.cs diff --git a/csharp/ql/test/TestUtilities/inline-tests/PathProblemQuery.expected b/csharp/ql/test/utils/inline-tests/PathProblemQuery.expected similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/PathProblemQuery.expected rename to csharp/ql/test/utils/inline-tests/PathProblemQuery.expected diff --git a/csharp/ql/test/utils/inline-tests/PathProblemQuery.qlref b/csharp/ql/test/utils/inline-tests/PathProblemQuery.qlref new file mode 100644 index 000000000000..b40ac3723a21 --- /dev/null +++ b/csharp/ql/test/utils/inline-tests/PathProblemQuery.qlref @@ -0,0 +1,2 @@ +query: utils/inline-tests/queries/PathProblemQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/TestUtilities/inline-tests/ProblemQuery.expected b/csharp/ql/test/utils/inline-tests/ProblemQuery.expected similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/ProblemQuery.expected rename to csharp/ql/test/utils/inline-tests/ProblemQuery.expected diff --git a/csharp/ql/test/utils/inline-tests/ProblemQuery.qlref b/csharp/ql/test/utils/inline-tests/ProblemQuery.qlref new file mode 100644 index 000000000000..658cd07e57a9 --- /dev/null +++ b/csharp/ql/test/utils/inline-tests/ProblemQuery.qlref @@ -0,0 +1,2 @@ +query: utils/inline-tests/queries/ProblemQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/csharp/ql/test/TestUtilities/inline-tests/queries/PathProblemQuery.expected b/csharp/ql/test/utils/inline-tests/queries/PathProblemQuery.expected similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/queries/PathProblemQuery.expected rename to csharp/ql/test/utils/inline-tests/queries/PathProblemQuery.expected diff --git a/csharp/ql/test/TestUtilities/inline-tests/queries/PathProblemQuery.ql b/csharp/ql/test/utils/inline-tests/queries/PathProblemQuery.ql similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/queries/PathProblemQuery.ql rename to csharp/ql/test/utils/inline-tests/queries/PathProblemQuery.ql diff --git a/csharp/ql/test/TestUtilities/inline-tests/queries/ProblemQuery.expected b/csharp/ql/test/utils/inline-tests/queries/ProblemQuery.expected similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/queries/ProblemQuery.expected rename to csharp/ql/test/utils/inline-tests/queries/ProblemQuery.expected diff --git a/csharp/ql/test/TestUtilities/inline-tests/queries/ProblemQuery.ql b/csharp/ql/test/utils/inline-tests/queries/ProblemQuery.ql similarity index 100% rename from csharp/ql/test/TestUtilities/inline-tests/queries/ProblemQuery.ql rename to csharp/ql/test/utils/inline-tests/queries/ProblemQuery.ql diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql index bed1f3ec0944..0d9e4cd52d9f 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql @@ -1,6 +1,6 @@ import csharp import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = ContentSensitive::captureFlow(c, _) } diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql index 922588049d26..719eca840f46 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql @@ -1,6 +1,6 @@ import csharp import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureNoFlow(c) } diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql index 55aa379ddb5d..ecd5a8e9e323 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql @@ -1,6 +1,6 @@ import csharp import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureSink(c) } diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql index 790e0754789e..f5f09b153f82 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql @@ -1,6 +1,6 @@ import csharp import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureSource(c) } diff --git a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql index 29cb8f7fb874..93c8520caa1b 100644 --- a/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql +++ b/csharp/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql @@ -1,6 +1,6 @@ import csharp import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureFlow(c) } diff --git a/csharp/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql b/csharp/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql index b82afaf71c0a..782262728794 100644 --- a/csharp/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql +++ b/csharp/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql @@ -1,5 +1,5 @@ import csharp -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest import utils.modelgenerator.internal.CaptureTypeBasedSummaryModels module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/go/documentation/library-coverage/coverage.csv b/go/documentation/library-coverage/coverage.csv index cf5a8b715b0d..fa7497e1d78b 100644 --- a/go/documentation/library-coverage/coverage.csv +++ b/go/documentation/library-coverage/coverage.csv @@ -1,142 +1,142 @@ -package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:log-injection,sink:nosql-injection,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:sql-injection,sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:environment,source:file,source:remote,source:stdin,summary:taint,summary:value -,,,8,,,,,,,,,,,,,,,,,,,,,3,5 -archive/tar,,,5,,,,,,,,,,,,,,,,,,,,,5, -archive/zip,,,6,,,,,,,,,,,,,,,,,,,,,6, -bufio,,,17,,,,,,,,,,,,,,,,,,,,,17, -bytes,,,43,,,,,,,,,,,,,,,,,,,,,43, -clevergo.tech/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,, -compress/bzip2,,,1,,,,,,,,,,,,,,,,,,,,,1, -compress/flate,,,4,,,,,,,,,,,,,,,,,,,,,4, -compress/gzip,,,3,,,,,,,,,,,,,,,,,,,,,3, -compress/lzw,,,1,,,,,,,,,,,,,,,,,,,,,1, -compress/zlib,,,4,,,,,,,,,,,,,,,,,,,,,4, -container/heap,,,5,,,,,,,,,,,,,,,,,,,,,5, -container/list,,,20,,,,,,,,,,,,,,,,,,,,,20, -container/ring,,,5,,,,,,,,,,,,,,,,,,,,,5, -context,,,5,,,,,,,,,,,,,,,,,,,,,5, -crypto,,,10,,,,,,,,,,,,,,,,,,,,,10, -database/sql,30,,11,,,,,,,,,,,,30,,,,,,,,,11, -encoding,,,77,,,,,,,,,,,,,,,,,,,,,77, -errors,,,3,,,,,,,,,,,,,,,,,,,,,3, -expvar,,,6,,,,,,,,,,,,,,,,,,,,,6, -fmt,3,,16,,,,3,,,,,,,,,,,,,,,,,16, -github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,,,,3,,,,,, -github.com/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,, -github.com/Sirupsen/logrus,145,,,,,,145,,,,,,,,,,,,,,,,,, -github.com/antchfx/htmlquery,4,,,,,,,,,,,,,,,,,,4,,,,,, -github.com/antchfx/jsonquery,4,,,,,,,,,,,,,,,,,,4,,,,,, -github.com/antchfx/xmlquery,8,,,,,,,,,,,,,,,,,,8,,,,,, -github.com/antchfx/xpath,4,,,,,,,,,,,,,,,,,,4,,,,,, -github.com/appleboy/gin-jwt,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/astaxie/beego,71,21,21,,,,34,,5,,,,,,30,2,,,,,,21,,21, -github.com/beego/beego,142,42,42,,,,68,,10,,,,,,60,4,,,,,,42,,42, -github.com/caarlos0/env,,5,2,,,,,,,,,,,,,,,,,5,,,,1,1 -github.com/clevergo/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,, -github.com/codeskyblue/go-sh,4,,,4,,,,,,,,,,,,,,,,,,,,, -github.com/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,18, -github.com/couchbaselabs/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,18, -github.com/crankycoder/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -github.com/cristalhq/jwt,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/davecgh/go-spew/spew,9,,,,,,9,,,,,,,,,,,,,,,,,, -github.com/dgrijalva/jwt-go,3,,9,,2,1,,,,,,,,,,,,,,,,,,9, -github.com/elazarl/goproxy,2,2,2,,,,2,,,,,,,,,,,,,,,2,,2, -github.com/emicklei/go-restful,,7,,,,,,,,,,,,,,,,,,,,7,,, -github.com/evanphx/json-patch,,,12,,,,,,,,,,,,,,,,,,,,,12, -github.com/form3tech-oss/jwt-go,2,,,,2,,,,,,,,,,,,,,,,,,,, -github.com/gin-gonic/gin,3,46,2,,,,,,3,,,,,,,,,,,,,46,,2, -github.com/go-chi/chi,,3,,,,,,,,,,,,,,,,,,,,3,,, -github.com/go-chi/jwtauth,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/go-gorm/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,, -github.com/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,4, -github.com/go-kit/kit/auth/jwt,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/go-pg/pg/orm,,,6,,,,,,,,,,,,,,,,,,,,,6, -github.com/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -github.com/go-xorm/xorm,34,,,,,,,,,,,,,,34,,,,,,,,,, -github.com/gobuffalo/envy,,7,,,,,,,,,,,,,,,,,,7,,,,, -github.com/gobwas/ws,,2,,,,,,,,,,,,,,,,,,,,2,,, -github.com/gofiber/fiber,5,,,,,,,,4,,,,,,,,,1,,,,,,, -github.com/gogf/gf-jwt,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/gogf/gf/database/gdb,51,,,,,,,,,,,,,,51,,,,,,,,,, -github.com/going/toolkit/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -github.com/golang-jwt/jwt,3,,11,,2,1,,,,,,,,,,,,,,,,,,11, -github.com/golang/glog,90,,,,,,90,,,,,,,,,,,,,,,,,, -github.com/golang/protobuf/proto,,,4,,,,,,,,,,,,,,,,,,,,,4, -github.com/gorilla/mux,,1,,,,,,,,,,,,,,,,,,,,1,,, -github.com/gorilla/websocket,,3,,,,,,,,,,,,,,,,,,,,3,,, -github.com/hashicorp/go-envparse,,1,,,,,,,,,,,,,,,,,,1,,,,, -github.com/jbowtie/gokogiri/xml,4,,,,,,,,,,,,,,,,,,4,,,,,, -github.com/jbowtie/gokogiri/xpath,1,,,,,,,,,,,,,,,,,,1,,,,,, -github.com/jinzhu/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,, -github.com/jmoiron/sqlx,12,,,,,,,,,,,,,,12,,,,,,,,,, -github.com/joho/godotenv,,4,,,,,,,,,,,,,,,,,,4,,,,, -github.com/json-iterator/go,,,4,,,,,,,,,,,,,,,,,,,,,4, -github.com/kataras/iris/context,6,,,,,,,,6,,,,,,,,,,,,,,,, -github.com/kataras/iris/middleware/jwt,2,,,,2,,,,,,,,,,,,,,,,,,,, -github.com/kataras/iris/server/web/context,6,,,,,,,,6,,,,,,,,,,,,,,,, -github.com/kataras/jwt,5,,,,5,,,,,,,,,,,,,,,,,,,, -github.com/kelseyhightower/envconfig,,6,,,,,,,,,,,,,,,,,,6,,,,, -github.com/labstack/echo,3,12,2,,,,,,2,,,,,,,1,,,,,,12,,2, -github.com/lann/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,, -github.com/lestrrat-go/jwx,2,,,,2,,,,,,,,,,,,,,,,,,,, -github.com/lestrrat-go/libxml2/parser,3,,,,,,,,,,,,,,,,,,3,,,,,, -github.com/lestrrat/go-jwx/jwk,1,,,,1,,,,,,,,,,,,,,,,,,,, -github.com/masterzen/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -github.com/moovweb/gokogiri/xml,4,,,,,,,,,,,,,,,,,,4,,,,,, -github.com/moovweb/gokogiri/xpath,1,,,,,,,,,,,,,,,,,,1,,,,,, -github.com/ory/fosite/token/jwt,2,,,,2,,,,,,,,,,,,,,,,,,,, -github.com/raindog308/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,, -github.com/revel/revel,2,23,10,,,,,,1,,,,,,,1,,,,,,23,,10, -github.com/robfig/revel,2,23,10,,,,,,1,,,,,,,1,,,,,,23,,10, -github.com/rqlite/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,, -github.com/santhosh-tekuri/xpathparser,2,,,,,,,,,,,,,,,,,,2,,,,,, -github.com/sendgrid/sendgrid-go/helpers/mail,,,1,,,,,,,,,,,,,,,,,,,,,1, -github.com/sirupsen/logrus,145,,,,,,145,,,,,,,,,,,,,,,,,, -github.com/spf13/afero,34,,,,,,,,34,,,,,,,,,,,,,,,, -github.com/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,4, -github.com/uptrace/bun,63,,,,,,,,,,,,,,63,,,,,,,,,, -github.com/valyala/fasthttp,35,50,5,,,,,,8,,,,17,8,,2,,,,,,50,,5, -go.mongodb.org/mongo-driver/mongo,14,,,,,,,14,,,,,,,,,,,,,,,,, -go.uber.org/zap,33,,11,,,,33,,,,,,,,,,,,,,,,,11, -golang.org/x/crypto/ssh,4,,,4,,,,,,,,,,,,,,,,,,,,, -golang.org/x/net/context,,,5,,,,,,,,,,,,,,,,,,,,,5, -golang.org/x/net/html,,,16,,,,,,,,,,,,,,,,,,,,,16, -golang.org/x/net/websocket,,2,,,,,,,,,,,,,,,,,,,,2,,, -google.golang.org/protobuf/internal/encoding/text,,,1,,,,,,,,,,,,,,,,,,,,,1, -google.golang.org/protobuf/internal/impl,,,2,,,,,,,,,,,,,,,,,,,,,2, -google.golang.org/protobuf/proto,,,8,,,,,,,,,,,,,,,,,,,,,8, -google.golang.org/protobuf/reflect/protoreflect,,,1,,,,,,,,,,,,,,,,,,,,,1, -gopkg.in/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,, -gopkg.in/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,18, -gopkg.in/glog,90,,,,,,90,,,,,,,,,,,,,,,,,, -gopkg.in/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,4, -gopkg.in/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -gopkg.in/macaron,1,12,1,,,,,,,,,,,,,,,1,,,,12,,1, -gopkg.in/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,4, -gopkg.in/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -gopkg.in/yaml,,,9,,,,,,,,,,,,,,,,,,,,,9, -gorm.io/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,, -html,,,8,,,,,,,,,,,,,,,,,,,,,8, -io,5,4,34,,,,,,5,,,,,,,,,,,,4,,,34, -k8s.io/api/core,,,10,,,,,,,,,,,,,,,,,,,,,10, -k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,,,,,,,,,,,,,,,47, -k8s.io/klog,90,,,,,,90,,,,,,,,,,,,,,,,,, -launchpad.net/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,, -log,20,,3,,,,20,,,,,,,,,,,,,,,,,3, -math/big,,,1,,,,,,,,,,,,,,,,,,,,,1, -mime,,,14,,,,,,,,,,,,,,,,,,,,,14, -net,2,16,100,,,,,,1,,,,,,,,1,,,,,16,,100, -nhooyr.io/websocket,,2,,,,,,,,,,,,,,,,,,,,2,,, -os,29,11,6,3,,,,,26,,,,,,,,,,,7,3,,1,6, -path,,,18,,,,,,,,,,,,,,,,,,,,,18, -reflect,,,37,,,,,,,,,,,,,,,,,,,,,37, -regexp,10,,20,,,,,,,3,3,4,,,,,,,,,,,,20, -slices,,,17,,,,,,,,,,,,,,,,,,,,,,17 -sort,,,1,,,,,,,,,,,,,,,,,,,,,1, -strconv,,,9,,,,,,,,,,,,,,,,,,,,,9, -strings,,,34,,,,,,,,,,,,,,,,,,,,,34, -sync,,,34,,,,,,,,,,,,,,,,,,,,,34, -syscall,5,2,8,5,,,,,,,,,,,,,,,,2,,,,8, -text/scanner,,,3,,,,,,,,,,,,,,,,,,,,,3, -text/tabwriter,,,1,,,,,,,,,,,,,,,,,,,,,1, -text/template,,,6,,,,,,,,,,,,,,,,,,,,,6, -xorm.io/xorm,34,,,,,,,,,,,,,,34,,,,,,,,,, +package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:log-injection,sink:nosql-injection,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:sql-injection,sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:commandargs,source:environment,source:file,source:remote,source:stdin,summary:taint,summary:value +,,,8,,,,,,,,,,,,,,,,,,,,,,3,5 +archive/tar,,,5,,,,,,,,,,,,,,,,,,,,,,5, +archive/zip,,,6,,,,,,,,,,,,,,,,,,,,,,6, +bufio,,,17,,,,,,,,,,,,,,,,,,,,,,17, +bytes,,,43,,,,,,,,,,,,,,,,,,,,,,43, +clevergo.tech/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,,, +compress/bzip2,,,1,,,,,,,,,,,,,,,,,,,,,,1, +compress/flate,,,4,,,,,,,,,,,,,,,,,,,,,,4, +compress/gzip,,,3,,,,,,,,,,,,,,,,,,,,,,3, +compress/lzw,,,1,,,,,,,,,,,,,,,,,,,,,,1, +compress/zlib,,,4,,,,,,,,,,,,,,,,,,,,,,4, +container/heap,,,5,,,,,,,,,,,,,,,,,,,,,,5, +container/list,,,20,,,,,,,,,,,,,,,,,,,,,,20, +container/ring,,,5,,,,,,,,,,,,,,,,,,,,,,5, +context,,,5,,,,,,,,,,,,,,,,,,,,,,5, +crypto,,,10,,,,,,,,,,,,,,,,,,,,,,10, +database/sql,30,,11,,,,,,,,,,,,30,,,,,,,,,,11, +encoding,,,77,,,,,,,,,,,,,,,,,,,,,,77, +errors,,,3,,,,,,,,,,,,,,,,,,,,,,3, +expvar,,,6,,,,,,,,,,,,,,,,,,,,,,6, +fmt,3,,16,,,,3,,,,,,,,,,,,,,,,,,16, +github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,,,,3,,,,,,, +github.com/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,, +github.com/Sirupsen/logrus,145,,,,,,145,,,,,,,,,,,,,,,,,,, +github.com/antchfx/htmlquery,4,,,,,,,,,,,,,,,,,,4,,,,,,, +github.com/antchfx/jsonquery,4,,,,,,,,,,,,,,,,,,4,,,,,,, +github.com/antchfx/xmlquery,8,,,,,,,,,,,,,,,,,,8,,,,,,, +github.com/antchfx/xpath,4,,,,,,,,,,,,,,,,,,4,,,,,,, +github.com/appleboy/gin-jwt,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/astaxie/beego,71,21,21,,,,34,,5,,,,,,30,2,,,,,,,21,,21, +github.com/beego/beego,142,42,42,,,,68,,10,,,,,,60,4,,,,,,,42,,42, +github.com/caarlos0/env,,5,2,,,,,,,,,,,,,,,,,,5,,,,1,1 +github.com/clevergo/clevergo,1,,,,,,,,,,,,,,,,,1,,,,,,,, +github.com/codeskyblue/go-sh,4,,,4,,,,,,,,,,,,,,,,,,,,,, +github.com/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,18, +github.com/couchbaselabs/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,18, +github.com/crankycoder/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +github.com/cristalhq/jwt,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/davecgh/go-spew/spew,9,,,,,,9,,,,,,,,,,,,,,,,,,, +github.com/dgrijalva/jwt-go,3,,9,,2,1,,,,,,,,,,,,,,,,,,,9, +github.com/elazarl/goproxy,2,2,2,,,,2,,,,,,,,,,,,,,,,2,,2, +github.com/emicklei/go-restful,,7,,,,,,,,,,,,,,,,,,,,,7,,, +github.com/evanphx/json-patch,,,12,,,,,,,,,,,,,,,,,,,,,,12, +github.com/form3tech-oss/jwt-go,2,,,,2,,,,,,,,,,,,,,,,,,,,, +github.com/gin-gonic/gin,3,46,2,,,,,,3,,,,,,,,,,,,,,46,,2, +github.com/go-chi/chi,,3,,,,,,,,,,,,,,,,,,,,,3,,, +github.com/go-chi/jwtauth,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/go-gorm/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,,, +github.com/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,,4, +github.com/go-kit/kit/auth/jwt,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/go-pg/pg/orm,,,6,,,,,,,,,,,,,,,,,,,,,,6, +github.com/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +github.com/go-xorm/xorm,34,,,,,,,,,,,,,,34,,,,,,,,,,, +github.com/gobuffalo/envy,,7,,,,,,,,,,,,,,,,,,,7,,,,, +github.com/gobwas/ws,,2,,,,,,,,,,,,,,,,,,,,,2,,, +github.com/gofiber/fiber,5,,,,,,,,4,,,,,,,,,1,,,,,,,, +github.com/gogf/gf-jwt,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/gogf/gf/database/gdb,51,,,,,,,,,,,,,,51,,,,,,,,,,, +github.com/going/toolkit/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +github.com/golang-jwt/jwt,3,,11,,2,1,,,,,,,,,,,,,,,,,,,11, +github.com/golang/glog,90,,,,,,90,,,,,,,,,,,,,,,,,,, +github.com/golang/protobuf/proto,,,4,,,,,,,,,,,,,,,,,,,,,,4, +github.com/gorilla/mux,,1,,,,,,,,,,,,,,,,,,,,,1,,, +github.com/gorilla/websocket,,3,,,,,,,,,,,,,,,,,,,,,3,,, +github.com/hashicorp/go-envparse,,1,,,,,,,,,,,,,,,,,,,1,,,,, +github.com/jbowtie/gokogiri/xml,4,,,,,,,,,,,,,,,,,,4,,,,,,, +github.com/jbowtie/gokogiri/xpath,1,,,,,,,,,,,,,,,,,,1,,,,,,, +github.com/jinzhu/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,,, +github.com/jmoiron/sqlx,12,,,,,,,,,,,,,,12,,,,,,,,,,, +github.com/joho/godotenv,,4,,,,,,,,,,,,,,,,,,,4,,,,, +github.com/json-iterator/go,,,4,,,,,,,,,,,,,,,,,,,,,,4, +github.com/kataras/iris/context,6,,,,,,,,6,,,,,,,,,,,,,,,,, +github.com/kataras/iris/middleware/jwt,2,,,,2,,,,,,,,,,,,,,,,,,,,, +github.com/kataras/iris/server/web/context,6,,,,,,,,6,,,,,,,,,,,,,,,,, +github.com/kataras/jwt,5,,,,5,,,,,,,,,,,,,,,,,,,,, +github.com/kelseyhightower/envconfig,,6,,,,,,,,,,,,,,,,,,,6,,,,, +github.com/labstack/echo,3,12,2,,,,,,2,,,,,,,1,,,,,,,12,,2, +github.com/lann/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,, +github.com/lestrrat-go/jwx,2,,,,2,,,,,,,,,,,,,,,,,,,,, +github.com/lestrrat-go/libxml2/parser,3,,,,,,,,,,,,,,,,,,3,,,,,,, +github.com/lestrrat/go-jwx/jwk,1,,,,1,,,,,,,,,,,,,,,,,,,,, +github.com/masterzen/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +github.com/moovweb/gokogiri/xml,4,,,,,,,,,,,,,,,,,,4,,,,,,, +github.com/moovweb/gokogiri/xpath,1,,,,,,,,,,,,,,,,,,1,,,,,,, +github.com/ory/fosite/token/jwt,2,,,,2,,,,,,,,,,,,,,,,,,,,, +github.com/raindog308/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,,, +github.com/revel/revel,2,23,10,,,,,,1,,,,,,,1,,,,,,,23,,10, +github.com/robfig/revel,2,23,10,,,,,,1,,,,,,,1,,,,,,,23,,10, +github.com/rqlite/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,,, +github.com/santhosh-tekuri/xpathparser,2,,,,,,,,,,,,,,,,,,2,,,,,,, +github.com/sendgrid/sendgrid-go/helpers/mail,,,1,,,,,,,,,,,,,,,,,,,,,,1, +github.com/sirupsen/logrus,145,,,,,,145,,,,,,,,,,,,,,,,,,, +github.com/spf13/afero,34,,,,,,,,34,,,,,,,,,,,,,,,,, +github.com/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,,4, +github.com/uptrace/bun,63,,,,,,,,,,,,,,63,,,,,,,,,,, +github.com/valyala/fasthttp,35,50,5,,,,,,8,,,,17,8,,2,,,,,,,50,,5, +go.mongodb.org/mongo-driver/mongo,14,,,,,,,14,,,,,,,,,,,,,,,,,, +go.uber.org/zap,33,,11,,,,33,,,,,,,,,,,,,,,,,,11, +golang.org/x/crypto/ssh,4,,,4,,,,,,,,,,,,,,,,,,,,,, +golang.org/x/net/context,,,5,,,,,,,,,,,,,,,,,,,,,,5, +golang.org/x/net/html,,,16,,,,,,,,,,,,,,,,,,,,,,16, +golang.org/x/net/websocket,,2,,,,,,,,,,,,,,,,,,,,,2,,, +google.golang.org/protobuf/internal/encoding/text,,,1,,,,,,,,,,,,,,,,,,,,,,1, +google.golang.org/protobuf/internal/impl,,,2,,,,,,,,,,,,,,,,,,,,,,2, +google.golang.org/protobuf/proto,,,8,,,,,,,,,,,,,,,,,,,,,,8, +google.golang.org/protobuf/reflect/protoreflect,,,1,,,,,,,,,,,,,,,,,,,,,,1, +gopkg.in/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,, +gopkg.in/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,18, +gopkg.in/glog,90,,,,,,90,,,,,,,,,,,,,,,,,,, +gopkg.in/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,,4, +gopkg.in/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +gopkg.in/macaron,1,12,1,,,,,,,,,,,,,,,1,,,,,12,,1, +gopkg.in/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,,,,,,4, +gopkg.in/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +gopkg.in/yaml,,,9,,,,,,,,,,,,,,,,,,,,,,9, +gorm.io/gorm,13,,,,,,,,,,,,,,13,,,,,,,,,,, +html,,,8,,,,,,,,,,,,,,,,,,,,,,8, +io,5,4,34,,,,,,5,,,,,,,,,,,,,4,,,34, +k8s.io/api/core,,,10,,,,,,,,,,,,,,,,,,,,,,10, +k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,,,,,,,,,,,,,,,,47, +k8s.io/klog,90,,,,,,90,,,,,,,,,,,,,,,,,,, +launchpad.net/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,, +log,20,,3,,,,20,,,,,,,,,,,,,,,,,,3, +math/big,,,1,,,,,,,,,,,,,,,,,,,,,,1, +mime,,,14,,,,,,,,,,,,,,,,,,,,,,14, +net,2,16,100,,,,,,1,,,,,,,,1,,,,,,16,,100, +nhooyr.io/websocket,,2,,,,,,,,,,,,,,,,,,,,,2,,, +os,29,12,6,3,,,,,26,,,,,,,,,,,1,7,3,,1,6, +path,,,18,,,,,,,,,,,,,,,,,,,,,,18, +reflect,,,37,,,,,,,,,,,,,,,,,,,,,,37, +regexp,10,,20,,,,,,,3,3,4,,,,,,,,,,,,,20, +slices,,,17,,,,,,,,,,,,,,,,,,,,,,,17 +sort,,,1,,,,,,,,,,,,,,,,,,,,,,1, +strconv,,,9,,,,,,,,,,,,,,,,,,,,,,9, +strings,,,34,,,,,,,,,,,,,,,,,,,,,,34, +sync,,,34,,,,,,,,,,,,,,,,,,,,,,34, +syscall,5,2,8,5,,,,,,,,,,,,,,,,,2,,,,8, +text/scanner,,,3,,,,,,,,,,,,,,,,,,,,,,3, +text/tabwriter,,,1,,,,,,,,,,,,,,,,,,,,,,1, +text/template,,,6,,,,,,,,,,,,,,,,,,,,,,6, +xorm.io/xorm,34,,,,,,,,,,,,,,34,,,,,,,,,,, diff --git a/go/documentation/library-coverage/coverage.rst b/go/documentation/library-coverage/coverage.rst index 48f24355a333..480e9cbd947b 100644 --- a/go/documentation/library-coverage/coverage.rst +++ b/go/documentation/library-coverage/coverage.rst @@ -26,7 +26,7 @@ Go framework & library support `Macaron `_,``gopkg.in/macaron*``,12,1,1 `Revel `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4 `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, - `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",33,604,104 + `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",34,604,104 `XPath `_,``github.com/antchfx/xpath*``,,,4 `appleboy/gin-jwt `_,``github.com/appleboy/gin-jwt*``,,,1 `beego `_,"``github.com/astaxie/beego*``, ``github.com/beego/beego*``",63,63,213 @@ -61,5 +61,5 @@ Go framework & library support `yaml `_,``gopkg.in/yaml*``,,9, `zap `_,``go.uber.org/zap*``,,11,33 Others,"``github.com/Masterminds/squirrel``, ``github.com/caarlos0/env``, ``github.com/go-gorm/gorm``, ``github.com/go-xorm/xorm``, ``github.com/gobuffalo/envy``, ``github.com/gogf/gf/database/gdb``, ``github.com/hashicorp/go-envparse``, ``github.com/jinzhu/gorm``, ``github.com/jmoiron/sqlx``, ``github.com/joho/godotenv``, ``github.com/kelseyhightower/envconfig``, ``github.com/lann/squirrel``, ``github.com/raindog308/gorqlite``, ``github.com/rqlite/gorqlite``, ``github.com/uptrace/bun``, ``go.mongodb.org/mongo-driver/mongo``, ``gopkg.in/Masterminds/squirrel``, ``gorm.io/gorm``, ``xorm.io/xorm``",23,2,391 - Totals,,307,928,1532 + Totals,,308,928,1532 diff --git a/go/ql/test/TestUtilities/InlineExpectationsTest.qll b/go/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from go/ql/test/TestUtilities/InlineExpectationsTest.qll rename to go/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/go/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/go/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from go/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to go/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/go/ql/test/TestUtilities/InlineFlowTest.qll b/go/ql/lib/utils/test/InlineFlowTest.qll similarity index 100% rename from go/ql/test/TestUtilities/InlineFlowTest.qll rename to go/ql/lib/utils/test/InlineFlowTest.qll diff --git a/go/ql/test/TestUtilities/PrettyPrintModels.ql b/go/ql/lib/utils/test/PrettyPrintModels.ql similarity index 100% rename from go/ql/test/TestUtilities/PrettyPrintModels.ql rename to go/ql/lib/utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/go/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from go/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to go/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/go/ql/test/experimental/CWE-090/LDAPInjection.qlref b/go/ql/test/experimental/CWE-090/LDAPInjection.qlref index 29b7e84b3e53..7049e09a7265 100644 --- a/go/ql/test/experimental/CWE-090/LDAPInjection.qlref +++ b/go/ql/test/experimental/CWE-090/LDAPInjection.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-090/LDAPInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-203/Timing.qlref b/go/ql/test/experimental/CWE-203/Timing.qlref index 56320c60159a..7306096e724e 100644 --- a/go/ql/test/experimental/CWE-203/Timing.qlref +++ b/go/ql/test/experimental/CWE-203/Timing.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-203/Timing.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-287/ImproperLdapAuth.qlref b/go/ql/test/experimental/CWE-287/ImproperLdapAuth.qlref index f1df35af25ac..35ca7800cc8a 100644 --- a/go/ql/test/experimental/CWE-287/ImproperLdapAuth.qlref +++ b/go/ql/test/experimental/CWE-287/ImproperLdapAuth.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-287/ImproperLdapAuth.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-369/DivideByZero.qlref b/go/ql/test/experimental/CWE-369/DivideByZero.qlref index 2b80b2b07927..80eca2d32193 100644 --- a/go/ql/test/experimental/CWE-369/DivideByZero.qlref +++ b/go/ql/test/experimental/CWE-369/DivideByZero.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-369/DivideByZero.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql index 9c34f9ff8bd9..ec22f6579513 100644 --- a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.DecompressionBombs::DecompressionBomb module TestDecompressionBombs implements TestSig { diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref index 14dd362265e9..93d41075d5f3 100644 --- a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-522-DecompressionBombs/DecompressionBombs.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-74/DsnInjection.qlref b/go/ql/test/experimental/CWE-74/DsnInjection.qlref index cda315f86b6b..f8e0117d7351 100644 --- a/go/ql/test/experimental/CWE-74/DsnInjection.qlref +++ b/go/ql/test/experimental/CWE-74/DsnInjection.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-74/DsnInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-74/DsnInjectionLocal.qlref b/go/ql/test/experimental/CWE-74/DsnInjectionLocal.qlref index 6c8e953e642b..f2d6116c7f1e 100644 --- a/go/ql/test/experimental/CWE-74/DsnInjectionLocal.qlref +++ b/go/ql/test/experimental/CWE-74/DsnInjectionLocal.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-74/DsnInjectionLocal.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.qlref b/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.qlref index dbc0b4b5d00d..c425b9a445b7 100644 --- a/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.qlref +++ b/go/ql/test/experimental/CWE-79/HTMLTemplateEscapingPassthrough.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-79/HTMLTemplateEscapingPassthrough.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/CWE-918/SSRF.qlref b/go/ql/test/experimental/CWE-918/SSRF.qlref index 44a7b5a2cc29..7cba541836f7 100644 --- a/go/ql/test/experimental/CWE-918/SSRF.qlref +++ b/go/ql/test/experimental/CWE-918/SSRF.qlref @@ -1,2 +1,2 @@ query: experimental/CWE-918/SSRF.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/experimental/frameworks/CleverGo/HeaderWrite.ql b/go/ql/test/experimental/frameworks/CleverGo/HeaderWrite.ql index 6a1420db6d6e..b34343008b50 100644 --- a/go/ql/test/experimental/frameworks/CleverGo/HeaderWrite.ql +++ b/go/ql/test/experimental/frameworks/CleverGo/HeaderWrite.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.CleverGo module HttpHeaderWriteTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/CleverGo/HttpRedirect.ql b/go/ql/test/experimental/frameworks/CleverGo/HttpRedirect.ql index a0a8ce0a2427..20062ad73586 100644 --- a/go/ql/test/experimental/frameworks/CleverGo/HttpRedirect.ql +++ b/go/ql/test/experimental/frameworks/CleverGo/HttpRedirect.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.CleverGo module HttpRedirectTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql b/go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql index b34f1ec23be0..8842edcada11 100644 --- a/go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql +++ b/go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.CleverGo module HttpResponseBodyTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/CleverGo/RemoteSources.ql b/go/ql/test/experimental/frameworks/CleverGo/RemoteSources.ql index f99fc2b280dc..3c7cb4f7f106 100644 --- a/go/ql/test/experimental/frameworks/CleverGo/RemoteSources.ql +++ b/go/ql/test/experimental/frameworks/CleverGo/RemoteSources.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.CleverGo module RemoteFlowSourceTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/CleverGo/TaintTracking.ql b/go/ql/test/experimental/frameworks/CleverGo/TaintTracking.ql index e45dfbb2ecf9..a45162fa6c99 100644 --- a/go/ql/test/experimental/frameworks/CleverGo/TaintTracking.ql +++ b/go/ql/test/experimental/frameworks/CleverGo/TaintTracking.ql @@ -2,5 +2,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import experimental.frameworks.CleverGo -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/experimental/frameworks/Fiber/HeaderWrite.ql b/go/ql/test/experimental/frameworks/Fiber/HeaderWrite.ql index 70494910554e..8ea18121f0ae 100644 --- a/go/ql/test/experimental/frameworks/Fiber/HeaderWrite.ql +++ b/go/ql/test/experimental/frameworks/Fiber/HeaderWrite.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.Fiber module HttpHeaderWriteTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/Fiber/Redirect.ql b/go/ql/test/experimental/frameworks/Fiber/Redirect.ql index 1f609ea3959d..ace56e3e0c8e 100644 --- a/go/ql/test/experimental/frameworks/Fiber/Redirect.ql +++ b/go/ql/test/experimental/frameworks/Fiber/Redirect.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.Fiber module HttpRedirectTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/Fiber/RemoteFlowSources.ql b/go/ql/test/experimental/frameworks/Fiber/RemoteFlowSources.ql index b537c7292367..e6d40fdd2cfe 100644 --- a/go/ql/test/experimental/frameworks/Fiber/RemoteFlowSources.ql +++ b/go/ql/test/experimental/frameworks/Fiber/RemoteFlowSources.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.Fiber module RemoteFlowSourceTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/Fiber/ResponseBody.ql b/go/ql/test/experimental/frameworks/Fiber/ResponseBody.ql index 574f514b343d..8ef63f48f64b 100644 --- a/go/ql/test/experimental/frameworks/Fiber/ResponseBody.ql +++ b/go/ql/test/experimental/frameworks/Fiber/ResponseBody.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import experimental.frameworks.Fiber module HttpResponseBodyTest implements TestSig { diff --git a/go/ql/test/experimental/frameworks/Fiber/TaintTracking.ql b/go/ql/test/experimental/frameworks/Fiber/TaintTracking.ql index ad23bf13e92a..356b2ea87558 100644 --- a/go/ql/test/experimental/frameworks/Fiber/TaintTracking.ql +++ b/go/ql/test/experimental/frameworks/Fiber/TaintTracking.ql @@ -2,5 +2,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import experimental.frameworks.Fiber -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/Function/isVariadic.ql b/go/ql/test/library-tests/semmle/go/Function/isVariadic.ql index 9a75a5f01362..711f535c7931 100644 --- a/go/ql/test/library-tests/semmle/go/Function/isVariadic.ql +++ b/go/ql/test/library-tests/semmle/go/Function/isVariadic.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FunctionIsVariadicTest implements TestSig { string getARelevantTag() { result = "isVariadic" } diff --git a/go/ql/test/library-tests/semmle/go/Types/ImplementsComparable.ql b/go/ql/test/library-tests/semmle/go/Types/ImplementsComparable.ql index 048352a3ee0e..9afa5505801e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/ImplementsComparable.ql +++ b/go/ql/test/library-tests/semmle/go/Types/ImplementsComparable.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ImplementsComparableTest implements TestSig { string getARelevantTag() { result = "implementsComparable" } diff --git a/go/ql/test/library-tests/semmle/go/Types/SignatureType_isVariadic.ql b/go/ql/test/library-tests/semmle/go/Types/SignatureType_isVariadic.ql index e6b96ce608e1..6a4b42700232 100644 --- a/go/ql/test/library-tests/semmle/go/Types/SignatureType_isVariadic.ql +++ b/go/ql/test/library-tests/semmle/go/Types/SignatureType_isVariadic.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SignatureTypeIsVariadicTest implements TestSig { string getARelevantTag() { result = "isVariadic" } diff --git a/go/ql/test/library-tests/semmle/go/aliases/DataflowFields/test.ql b/go/ql/test/library-tests/semmle/go/aliases/DataflowFields/test.ql index 1b27b27d6dc2..946f7d3ab85c 100644 --- a/go/ql/test/library-tests/semmle/go/aliases/DataflowFields/test.ql +++ b/go/ql/test/library-tests/semmle/go/aliases/DataflowFields/test.ql @@ -1,3 +1,3 @@ import go -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls/flow.ql b/go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls/flow.ql index 1b27b27d6dc2..946f7d3ab85c 100644 --- a/go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls/flow.ql +++ b/go/ql/test/library-tests/semmle/go/aliases/InterfaceImpls/flow.ql @@ -1,3 +1,3 @@ import go -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/concepts/HTTP/Handler.ql b/go/ql/test/library-tests/semmle/go/concepts/HTTP/Handler.ql index 6b9822714045..6695162b954a 100644 --- a/go/ql/test/library-tests/semmle/go/concepts/HTTP/Handler.ql +++ b/go/ql/test/library-tests/semmle/go/concepts/HTTP/Handler.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HttpHandler implements TestSig { string getARelevantTag() { result = "handler" } diff --git a/go/ql/test/library-tests/semmle/go/concepts/LoggerCall/LoggerCall.ql b/go/ql/test/library-tests/semmle/go/concepts/LoggerCall/LoggerCall.ql index a231fe6795f1..b15d129039eb 100644 --- a/go/ql/test/library-tests/semmle/go/concepts/LoggerCall/LoggerCall.ql +++ b/go/ql/test/library-tests/semmle/go/concepts/LoggerCall/LoggerCall.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module LoggerTest implements TestSig { string getARelevantTag() { result = "logger" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/Flows.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ArrayConversion/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ChannelField/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/ChannelField/test.ql index c0e29f8b086e..1ca662a6e2ae 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ChannelField/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ChannelField/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Flow = DataFlow::Global; diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_false.ql index 3915c20b92bc..24ad16a00675 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_false.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_true.ql index 2db01e3a76f5..20702a237ceb 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_false.ql index 9cff9e92009f..90a277cb944d 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_false.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_true.ql index 79220e979c08..f9e5566438f7 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_I2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql index e4d35a2d1830..c98607c88f51 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql index 18e461357890..0fa7372c504c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI1_subtypes_true.ql index 6e84bbe2ffbf..4b34a2e99ab2 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI2_subtypes_true.ql index 63a829d1ac4e..2eb869023409 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_PImplEmbedI2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_false.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_false.ql index c5754d1ded77..a154ca95a3db 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_false.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_false.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_true.ql index 92c895b61a33..45740e13afe2 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_S1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql index f401e958315d..3536fed2a259 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql index 0d7169c93cf7..6daadc65db48 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP1_subtypes_true.ql index 35c780f603d0..b9d4b72c7268 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP2_subtypes_true.ql index 6b5cad78d8bc..dfbe91185342 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedP2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP1_subtypes_true.ql index 344dc37e41a4..edc94546a06a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP2_subtypes_true.ql index a7c2e497f556..7370b73839ea 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrP2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS1_subtypes_true.ql index cf847c781bcc..39a5759f248b 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS2_subtypes_true.ql index 0c7b05dd3ff8..d40fe60ff112 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedPtrS2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql index f58fd32770a9..e103f7f631a7 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql index db9d98e06d28..a461b2da08dd 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql index c4e8afd1fbf4..aac7a180ae87 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql index b8ebb68ecdb8..25c3b7959dcd 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedI2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql index 10e9fb96d4c8..429d3a527d59 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS1_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql index 403b6238b4f3..e55fdf59a222 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SImplEmbedS2_subtypes_true.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql index f4beb7ea28df..e5d80402faa1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_I1.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_P1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_P1.ql index 3022e13ff749..cdabb83a7362 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_P1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_P1.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql index 49113c53ed7a..a159d1ae5ed1 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/ql_S1.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import MakeTest module Config implements DataFlow::ConfigSig { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowVarArgs/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowVarArgs/Flows.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowVarArgs/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowVarArgs/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql index 2b719551ae0c..6cada9dda631 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/completetest.ql @@ -6,7 +6,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { sourceNode(src, "qltest") } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql index efd5f0d5bb38..a5dedbeacf47 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/completetest.ql @@ -6,7 +6,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { sourceNode(source, "qltest") } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/GenericFunctionsAndTypes/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/GenericFunctionsAndTypes/Flows.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/GenericFunctionsAndTypes/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/GenericFunctionsAndTypes/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/Flows.ql index 47c4d85bea95..171aee868248 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/GlobalVariableSideEffects/Flows.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest string getArgString(DataFlow::Node src, DataFlow::Node sink) { exists(src) and diff --git a/go/ql/test/library-tests/semmle/go/dataflow/GuardingFunctions/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/GuardingFunctions/test.ql index 8d8d8c130062..64055d7a3489 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/GuardingFunctions/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/GuardingFunctions/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest predicate isBad(DataFlow::Node g, Expr e, boolean branch) { g.(DataFlow::CallNode).getTarget().getName() = "isBad" and diff --git a/go/ql/test/library-tests/semmle/go/dataflow/HiddenNodes/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/HiddenNodes/test.ql index c723327e0b1f..e67e1a5644ae 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/HiddenNodes/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/HiddenNodes/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import codeql.dataflow.test.ProvenancePathGraph module Flow = TaintTracking::Global; diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ListOfConstantsSanitizerGuards/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/ListOfConstantsSanitizerGuards/test.ql index 3169b9e35c07..6e08be9ca917 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ListOfConstantsSanitizerGuards/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/ListOfConstantsSanitizerGuards/test.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/DataFlowConfig.ql b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/DataFlowConfig.ql index 2ccd28c3b60b..978b8a8a98f2 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/DataFlowConfig.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/PromotedFields/DataFlowConfig.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import ValueFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/PromotedMethods/DataFlowConfig.ql b/go/ql/test/library-tests/semmle/go/dataflow/PromotedMethods/DataFlowConfig.ql index c331ccf530d1..fa8367236db3 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/PromotedMethods/DataFlowConfig.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/PromotedMethods/DataFlowConfig.ql @@ -1,8 +1,8 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest -import TestUtilities.InlineFlowTest +import utils.test.InlineExpectationsTest +import utils.test.InlineFlowTest module ValueFlow = DataFlow::Global; 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 index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/SliceExpressions/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/Switch/DataFlow.ql b/go/ql/test/library-tests/semmle/go/dataflow/Switch/DataFlow.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/Switch/DataFlow.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/Switch/DataFlow.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/TypeAssertions/DataFlow.ql b/go/ql/test/library-tests/semmle/go/dataflow/TypeAssertions/DataFlow.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/TypeAssertions/DataFlow.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/TypeAssertions/DataFlow.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/VarArgs/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/VarArgs/Flows.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/VarArgs/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/VarArgs/Flows.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ql index 0f0b9dbe22de..873143a6f81c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithExternalFlow/Flows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/Flows.ql index 22da81845c0e..884e67cfb063 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/Flows.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/VarArgsWithFunctionModels/Flows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest class SummaryModelTest extends DataFlow::FunctionModel { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/commandargs/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/commandargs/test.ql index eb7ba46508e7..924c655bf655 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/commandargs/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/commandargs/test.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql index eb7ba46508e7..924c655bf655 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/environment/test.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql index eb7ba46508e7..924c655bf655 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/file/test.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/source.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/source.ql index eb7ba46508e7..924c655bf655 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/source.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/source.ql @@ -1,6 +1,6 @@ import go import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/test.ql b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/test.ql index 5cdebdbc6c93..21c6011abf73 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/test.ql +++ b/go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/stdin/test.ql @@ -2,7 +2,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import experimental.frameworks.CleverGo -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Afero/Query.ql b/go/ql/test/library-tests/semmle/go/frameworks/Afero/Query.ql index 9dc570773f54..87ac0330e994 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Afero/Query.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Afero/Query.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FileSystemAccessTest implements TestSig { string getARelevantTag() { result = ["FileSystemAccess", "succ", "pred"] } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/AwsLambda/test.ql b/go/ql/test/library-tests/semmle/go/frameworks/AwsLambda/test.ql index 7f1f4dd507b3..6dc2ec686f57 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/AwsLambda/test.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/AwsLambda/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Beego/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.qlref index a90879489725..78ce25b1921f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Beego/TaintedPath.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/TaintedPath.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.qlref b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.qlref index a971ca30ce5c..b6916bd2cd46 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-089/SqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Chi/ReflectedXss.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Chi/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Chi/ReflectedXss.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Chi/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/CouchbaseV1/test.ql b/go/ql/test/library-tests/semmle/go/frameworks/CouchbaseV1/test.ql index 2c07f1919a68..da91c22b2dd4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/CouchbaseV1/test.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/CouchbaseV1/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.go.security.SqlInjection module SqlInjectionTest implements TestSig { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.qlref index 9e216d2b698c..867dd7665618 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Echo/OpenRedirect.qlref @@ -1,2 +1,2 @@ query: Security/CWE-601/OpenUrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Echo/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Echo/TaintedPath.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Echo/TaintedPath.qlref index a90879489725..78ce25b1921f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Echo/TaintedPath.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Echo/TaintedPath.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/TaintedPath.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/ElazarlGoproxy/test.ql b/go/ql/test/library-tests/semmle/go/frameworks/ElazarlGoproxy/test.ql index 3a07461319ca..a2713304a5d1 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/ElazarlGoproxy/test.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/ElazarlGoproxy/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module RemoteFlowSourceTest implements TestSig { string getARelevantTag() { result = "remoteflowsource" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/EvanphxJsonPatch/TaintFlows.ql b/go/ql/test/library-tests/semmle/go/frameworks/EvanphxJsonPatch/TaintFlows.ql index d812e814e3a8..05b36ee6ff6e 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/EvanphxJsonPatch/TaintFlows.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/EvanphxJsonPatch/TaintFlows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/AdditionalTaintSteps.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/AdditionalTaintSteps.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/AdditionalTaintSteps.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/AdditionalTaintSteps.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/EscapeFunction.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/EscapeFunction.ql index 58dc162eeb89..5c623417dd44 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/EscapeFunction.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/EscapeFunction.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpTest implements TestSig { string getARelevantTag() { result = "Sanitizer" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/FileSystemAccess.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/FileSystemAccess.ql index 294d180da966..bce6d70999f0 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/FileSystemAccess.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/FileSystemAccess.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpFileSystemAccessTest implements TestSig { string getARelevantTag() { result = "FileSystemAccess" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/OpenRedirect.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/OpenRedirect.ql index 96420b12236d..397ceb5c9f85 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/OpenRedirect.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/OpenRedirect.ql @@ -1,6 +1,6 @@ import go import semmle.go.security.OpenUrlRedirectCustomizations -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpTest implements TestSig { string getARelevantTag() { result = "OpenRedirect" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/RemoteFlowSources.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/RemoteFlowSources.ql index 60b62f2bbf48..1adbb0d2f64c 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/RemoteFlowSources.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/RemoteFlowSources.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpTest implements TestSig { string getARelevantTag() { result = "RemoteFlowSource" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/SSRF.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/SSRF.ql index 04d7162d77fa..2b43216d6dd0 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/SSRF.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/SSRF.ql @@ -1,6 +1,6 @@ import go import semmle.go.security.RequestForgery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpTest implements TestSig { string getARelevantTag() { result = "SsrfSink" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/Xss.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/Xss.ql index 3040f32036b5..b7ea0ebd8f72 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/Xss.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/Xss.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FasthttpTest implements TestSig { string getARelevantTag() { result = "XssSink" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Fiber/Query.ql b/go/ql/test/library-tests/semmle/go/frameworks/Fiber/Query.ql index 5a6ba8d33687..bd11df4db16f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Fiber/Query.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Fiber/Query.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FileSystemAccessTest implements TestSig { string getARelevantTag() { result = "FileSystemAccess" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Gin/TaintedPath.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Gin/TaintedPath.qlref index fffd4b2e8bf5..6eb2e94892f2 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Gin/TaintedPath.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Gin/TaintedPath.qlref @@ -1,4 +1,4 @@ query: Security/CWE-022/TaintedPath.ql postprocess: - - TestUtilities/PrettyPrintModels.ql - - TestUtilities/InlineExpectationsTestQuery.ql + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/GoKit/RemoteFlowSources.ql b/go/ql/test/library-tests/semmle/go/frameworks/GoKit/RemoteFlowSources.ql index bafda6822cae..cc77baf9be3a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/GoKit/RemoteFlowSources.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/GoKit/RemoteFlowSources.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module RemoteFlowSourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.ql b/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.ql index 5275d86e1239..954aff43ad34 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/GoMicro/gomicro.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module GoMicroTest implements TestSig { string getARelevantTag() { result = ["serverRequest", "clientRequest"] } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Iris/Query.ql b/go/ql/test/library-tests/semmle/go/frameworks/Iris/Query.ql index 5a6ba8d33687..bd11df4db16f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Iris/Query.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Iris/Query.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FileSystemAccessTest implements TestSig { string getARelevantTag() { result = "FileSystemAccess" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApiCoreV1/TaintFlowsInline.ql b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApiCoreV1/TaintFlowsInline.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApiCoreV1/TaintFlowsInline.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApiCoreV1/TaintFlowsInline.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApimachineryPkgRuntime/TaintFlowsInline.ql b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApimachineryPkgRuntime/TaintFlowsInline.ql index 1b64b928c3ff..31483a02004a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApimachineryPkgRuntime/TaintFlowsInline.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoApimachineryPkgRuntime/TaintFlowsInline.ql @@ -1,5 +1,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoClientGo/SecretInterfaceSource.ql b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoClientGo/SecretInterfaceSource.ql index 7455675a5bc4..786b01d6a462 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/K8sIoClientGo/SecretInterfaceSource.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/K8sIoClientGo/SecretInterfaceSource.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module K8sIoApimachineryPkgRuntimeTest implements TestSig { string getARelevantTag() { result = "KsIoClientGo" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql index bca82f92fdb8..cde8cc6ea2d6 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module RemoteFlowSourceTest implements TestSig { string getARelevantTag() { result = "RemoteFlowSource" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/NoSQL/Query.ql b/go/ql/test/library-tests/semmle/go/frameworks/NoSQL/Query.ql index 782c59d96ecd..db8f145d70c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/NoSQL/Query.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/NoSQL/Query.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module NoSqlQueryTest implements TestSig { string getARelevantTag() { result = "nosqlquery" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/TaintFlows.ql b/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/TaintFlows.ql index 49d2678fd426..b74bb088291a 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/TaintFlows.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Protobuf/TaintFlows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/OpenRedirect.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Revel/OpenRedirect.qlref index 9e216d2b698c..867dd7665618 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/OpenRedirect.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/OpenRedirect.qlref @@ -1,2 +1,2 @@ query: Security/CWE-601/OpenUrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.qlref index a90879489725..78ce25b1921f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/TaintedPath.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/TaintedPath.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Revel/test.ql b/go/ql/test/library-tests/semmle/go/frameworks/Revel/test.ql index 6a12f0ebe7cd..2ac3c51c93d1 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Revel/test.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Revel/test.ql @@ -1,5 +1,5 @@ import go -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest class Sink extends DataFlow::Node { Sink() { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql index eeb43a82fadd..0d56af8659c4 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlTest implements TestSig { string getARelevantTag() { result = "query" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Spew/TaintFlows.ql b/go/ql/test/library-tests/semmle/go/frameworks/Spew/TaintFlows.ql index a663c7a70f49..d507cfaab1b9 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Spew/TaintFlows.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Spew/TaintFlows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/test.ql b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/test.ql index 880b74c09531..3c939a9ccefd 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/test.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/test.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FileSystemAccessTest implements TestSig { string getARelevantTag() { result = "fsaccess" } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.qlref b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.qlref index dc5864844ccf..061679da228d 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.qlref @@ -1,2 +1,2 @@ query: Security/CWE-918/RequestForgery.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.qlref b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.qlref b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.qlref index a971ca30ce5c..b6916bd2cd46 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.qlref +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-089/SqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Yaml/tests.ql b/go/ql/test/library-tests/semmle/go/frameworks/Yaml/tests.ql index 82087630b33a..c47d1fee2fa8 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Yaml/tests.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Yaml/tests.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest predicate isYamlFunction(Function f) { f.hasQualifiedName(package("gopkg.in/yaml", ""), _) diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Zap/TaintFlows.ql b/go/ql/test/library-tests/semmle/go/frameworks/Zap/TaintFlows.ql index a1d71b1134f1..91b543f041c8 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Zap/TaintFlows.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/Zap/TaintFlows.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql b/go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql index 91a53fae3350..c18b117edc4d 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql +++ b/go/ql/test/library-tests/semmle/go/frameworks/gqlgen/gqlgen.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ResolveParameterTest implements TestSig { string getARelevantTag() { result = "resolverParameter" } diff --git a/go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/UnhandledCloseWritableHandle.qlref b/go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/UnhandledCloseWritableHandle.qlref index 579e4344e89f..82300c2182c8 100644 --- a/go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/UnhandledCloseWritableHandle.qlref +++ b/go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/UnhandledCloseWritableHandle.qlref @@ -1,2 +1,2 @@ query: InconsistentCode/UnhandledCloseWritableHandle.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/IncompleteHostnameRegexp.qlref b/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/IncompleteHostnameRegexp.qlref index fdf18ea380ad..88d20f52eeed 100644 --- a/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/IncompleteHostnameRegexp.qlref +++ b/go/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegexp/IncompleteHostnameRegexp.qlref @@ -1,2 +1,2 @@ query: Security/CWE-020/IncompleteHostnameRegexp.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-022/TaintedPath.qlref b/go/ql/test/query-tests/Security/CWE-022/TaintedPath.qlref index a90879489725..78ce25b1921f 100644 --- a/go/ql/test/query-tests/Security/CWE-022/TaintedPath.qlref +++ b/go/ql/test/query-tests/Security/CWE-022/TaintedPath.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/TaintedPath.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-022/UnsafeUnzipSymlink.qlref b/go/ql/test/query-tests/Security/CWE-022/UnsafeUnzipSymlink.qlref index 01c3e4f968ab..a40aa6194e10 100644 --- a/go/ql/test/query-tests/Security/CWE-022/UnsafeUnzipSymlink.qlref +++ b/go/ql/test/query-tests/Security/CWE-022/UnsafeUnzipSymlink.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/UnsafeUnzipSymlink.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-022/ZipSlip.qlref b/go/ql/test/query-tests/Security/CWE-022/ZipSlip.qlref index 5601b5782c2e..da30bbaf10df 100644 --- a/go/ql/test/query-tests/Security/CWE-022/ZipSlip.qlref +++ b/go/ql/test/query-tests/Security/CWE-022/ZipSlip.qlref @@ -1,2 +1,2 @@ query: Security/CWE-022/ZipSlip.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.qlref b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.qlref index 1b0ce561de7e..2b07372975ff 100644 --- a/go/ql/test/query-tests/Security/CWE-078/CommandInjection.qlref +++ b/go/ql/test/query-tests/Security/CWE-078/CommandInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-078/CommandInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-078/StoredCommand.qlref b/go/ql/test/query-tests/Security/CWE-078/StoredCommand.qlref index 16b314cb23b5..92c41892880b 100644 --- a/go/ql/test/query-tests/Security/CWE-078/StoredCommand.qlref +++ b/go/ql/test/query-tests/Security/CWE-078/StoredCommand.qlref @@ -1,2 +1,2 @@ query: Security/CWE-078/StoredCommand.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.qlref b/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.qlref index 4757f25a8a60..754513d72bb3 100644 --- a/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.qlref +++ b/go/ql/test/query-tests/Security/CWE-079/ReflectedXss.qlref @@ -1,2 +1,2 @@ query: Security/CWE-079/ReflectedXss.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.qlref b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.qlref index a971ca30ce5c..b6916bd2cd46 100644 --- a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.qlref +++ b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-089/SqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-089/StringBreak.qlref b/go/ql/test/query-tests/Security/CWE-089/StringBreak.qlref index 3bfb34269848..45a8c4191347 100644 --- a/go/ql/test/query-tests/Security/CWE-089/StringBreak.qlref +++ b/go/ql/test/query-tests/Security/CWE-089/StringBreak.qlref @@ -1,2 +1,2 @@ query: Security/CWE-089/StringBreak.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-117/LogInjectionTest.ql b/go/ql/test/query-tests/Security/CWE-117/LogInjectionTest.ql index 07c183d20f57..7c5ac3864b95 100644 --- a/go/ql/test/query-tests/Security/CWE-117/LogInjectionTest.ql +++ b/go/ql/test/query-tests/Security/CWE-117/LogInjectionTest.ql @@ -1,6 +1,6 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.go.security.LogInjection import TaintFlowTest diff --git a/go/ql/test/query-tests/Security/CWE-190/AllocationSizeOverflow.qlref b/go/ql/test/query-tests/Security/CWE-190/AllocationSizeOverflow.qlref index 35320510b628..f6da9bc1c36d 100644 --- a/go/ql/test/query-tests/Security/CWE-190/AllocationSizeOverflow.qlref +++ b/go/ql/test/query-tests/Security/CWE-190/AllocationSizeOverflow.qlref @@ -1,2 +1,2 @@ query: Security/CWE-190/AllocationSizeOverflow.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-312/CleartextLogging.qlref b/go/ql/test/query-tests/Security/CWE-312/CleartextLogging.qlref index 6319a0708c48..b540e0ddc002 100644 --- a/go/ql/test/query-tests/Security/CWE-312/CleartextLogging.qlref +++ b/go/ql/test/query-tests/Security/CWE-312/CleartextLogging.qlref @@ -1,2 +1,2 @@ query: Security/CWE-312/CleartextLogging.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.qlref b/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.qlref index 12fc777377dd..0349f62f26fa 100644 --- a/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.qlref +++ b/go/ql/test/query-tests/Security/CWE-327/UnsafeTLS.qlref @@ -1,2 +1,2 @@ query: Security/CWE-327/InsecureTLS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.qlref b/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.qlref index af948f98da4b..b30e6ede8ceb 100644 --- a/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.qlref +++ b/go/ql/test/query-tests/Security/CWE-338/InsecureRandomness/InsecureRandomness.qlref @@ -1,2 +1,2 @@ query: Security/CWE-338/InsecureRandomness.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.qlref b/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.qlref index 28df7a8b2011..404fe618edc8 100644 --- a/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.qlref +++ b/go/ql/test/query-tests/Security/CWE-347/MissingJwtSignatureCheck.qlref @@ -1,2 +1,2 @@ query: Security/CWE-347/MissingJwtSignatureCheck.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.qlref b/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.qlref index fc0e3cc7ccd2..fddee377510d 100644 --- a/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.qlref +++ b/go/ql/test/query-tests/Security/CWE-601/BadRedirectCheck/BadRedirectCheck.qlref @@ -1,2 +1,2 @@ query: Security/CWE-601/BadRedirectCheck.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.qlref b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.qlref index 9e216d2b698c..867dd7665618 100644 --- a/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.qlref +++ b/go/ql/test/query-tests/Security/CWE-601/OpenUrlRedirect/OpenUrlRedirect.qlref @@ -1,2 +1,2 @@ query: Security/CWE-601/OpenUrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-640/EmailInjection.qlref b/go/ql/test/query-tests/Security/CWE-640/EmailInjection.qlref index 9edc26ac25a0..c3b6cac31133 100644 --- a/go/ql/test/query-tests/Security/CWE-640/EmailInjection.qlref +++ b/go/ql/test/query-tests/Security/CWE-640/EmailInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-640/EmailInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-643/XPathInjection.qlref b/go/ql/test/query-tests/Security/CWE-643/XPathInjection.qlref index 578c6c53e9e7..e6a07d4a6886 100644 --- a/go/ql/test/query-tests/Security/CWE-643/XPathInjection.qlref +++ b/go/ql/test/query-tests/Security/CWE-643/XPathInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-643/XPathInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql index b99b51702a2e..9c9a00e825a6 100644 --- a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql +++ b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql @@ -1,7 +1,7 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.go.security.IncorrectIntegerConversionLib module TestIncorrectIntegerConversion implements TestSig { diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql index 60b3f945e07a..de10220d7e35 100644 --- a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql @@ -2,5 +2,5 @@ import go import semmle.go.dataflow.ExternalFlow import ModelValidation import semmle.go.security.UncontrolledAllocationSize -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import FlowTest diff --git a/go/ql/test/query-tests/Security/CWE-918/RequestForgery.qlref b/go/ql/test/query-tests/Security/CWE-918/RequestForgery.qlref index dc5864844ccf..061679da228d 100644 --- a/go/ql/test/query-tests/Security/CWE-918/RequestForgery.qlref +++ b/go/ql/test/query-tests/Security/CWE-918/RequestForgery.qlref @@ -1,2 +1,2 @@ query: Security/CWE-918/RequestForgery.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql index fe412adce903..d6f9212b0317 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql +++ b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.code.java.dataflow.ExternalFlow module Config implements DataFlow::ConfigSig { diff --git a/java/ql/test/TestUtilities/InlineExpectationsTest.qll b/java/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from java/ql/test/TestUtilities/InlineExpectationsTest.qll rename to java/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/java/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/java/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from java/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to java/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/TestUtilities/InlineFlowTest.qll b/java/ql/lib/utils/test/InlineFlowTest.qll similarity index 100% rename from java/ql/test/TestUtilities/InlineFlowTest.qll rename to java/ql/lib/utils/test/InlineFlowTest.qll diff --git a/java/ql/test/TestUtilities/InlineMadTest.qll b/java/ql/lib/utils/test/InlineMadTest.qll similarity index 100% rename from java/ql/test/TestUtilities/InlineMadTest.qll rename to java/ql/lib/utils/test/InlineMadTest.qll diff --git a/java/ql/test/TestUtilities/PrettyPrintModels.ql b/java/ql/lib/utils/test/PrettyPrintModels.ql similarity index 100% rename from java/ql/test/TestUtilities/PrettyPrintModels.ql rename to java/ql/lib/utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/java/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from java/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to java/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/java/ql/src/utils/flowtestcasegenerator/testHeader.qlfrag b/java/ql/src/utils/flowtestcasegenerator/testHeader.qlfrag index aca87429a3ac..d9dafb0e7846 100644 --- a/java/ql/src/utils/flowtestcasegenerator/testHeader.qlfrag +++ b/java/ql/src/utils/flowtestcasegenerator/testHeader.qlfrag @@ -1,3 +1,3 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql b/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql +++ b/java/ql/test-kotlin1/library-tests/dataflow/summaries/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test-kotlin2/library-tests/dataflow/summaries/test.ql b/java/ql/test-kotlin2/library-tests/dataflow/summaries/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test-kotlin2/library-tests/dataflow/summaries/test.ql +++ b/java/ql/test-kotlin2/library-tests/dataflow/summaries/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/experimental/query-tests/security/CWE-020/Log4jInjectionTest.qlref b/java/ql/test/experimental/query-tests/security/CWE-020/Log4jInjectionTest.qlref index 3ba0d235fc67..ea158af1e3ab 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-020/Log4jInjectionTest.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-020/Log4jInjectionTest.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-020/Log4jJndiInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-022/TaintedPath.ql b/java/ql/test/experimental/query-tests/security/CWE-022/TaintedPath.ql index 36efd8724cc4..b9bd00cab97d 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-022/TaintedPath.ql +++ b/java/ql/test/experimental/query-tests/security/CWE-022/TaintedPath.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.TaintedPathQuery import TaintFlowTestArgString diff --git a/java/ql/test/experimental/query-tests/security/CWE-073/FilePathInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-073/FilePathInjection.qlref index cf88c001c7e1..e0dc75098eb2 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-073/FilePathInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-073/FilePathInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-073/FilePathInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.qlref b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.qlref index cfeb215d626e..24bd62c5a2e6 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-078/CommandInjectionRuntimeExecLocal.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-078/CommandInjectionRuntimeExecLocal.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-078/ExecTainted.qlref b/java/ql/test/experimental/query-tests/security/CWE-078/ExecTainted.qlref index 8451f6226fc5..ddd01d295395 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-078/ExecTainted.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-078/ExecTainted.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-078/ExecTainted.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisAnnotationSqlInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisAnnotationSqlInjection.qlref index d41f3c1efde0..44302277a796 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisAnnotationSqlInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisAnnotationSqlInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-089/MyBatisAnnotationSqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisMapperXmlSqlInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisMapperXmlSqlInjection.qlref index c1c43afdfcff..19e95a85de4c 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisMapperXmlSqlInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-089/src/main/MyBatisMapperXmlSqlInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-089/MyBatisMapperXmlSqlInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref index 52a4e4c6bea9..00de86522031 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-094/BeanShellInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref index dd4bb6704a3a..d5b2db58b53a 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-094/JShellInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref index f7d16eb709b3..e00d8a116585 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JythonInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/JythonInjection.qlref index 90ec9f034f18..7448a79394ec 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JythonInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JythonInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-094/JythonInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/ScriptInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/ScriptInjection.qlref index c4905e1422e4..8bd566cf4fda 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/ScriptInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-094/ScriptInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-094/ScriptInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-1004/SensitiveCookieNotHttpOnly.qlref b/java/ql/test/experimental/query-tests/security/CWE-1004/SensitiveCookieNotHttpOnly.qlref index d4b20a8f0cda..9c7ce3d63299 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-1004/SensitiveCookieNotHttpOnly.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-1004/SensitiveCookieNotHttpOnly.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-200/InsecureWebResourceResponse.qlref b/java/ql/test/experimental/query-tests/security/CWE-200/InsecureWebResourceResponse.qlref index 29bde4fa4162..09049772ede7 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-200/InsecureWebResourceResponse.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-200/InsecureWebResourceResponse.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-200/InsecureWebResourceResponse.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-200/SensitiveAndroidFileLeak.qlref b/java/ql/test/experimental/query-tests/security/CWE-200/SensitiveAndroidFileLeak.qlref index b10404345cb5..a98eeb219143 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-200/SensitiveAndroidFileLeak.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-200/SensitiveAndroidFileLeak.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-200/SensitiveAndroidFileLeak.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-208/NotConstantTimeCheckOnSignature/Test.qlref b/java/ql/test/experimental/query-tests/security/CWE-208/NotConstantTimeCheckOnSignature/Test.qlref index d2863ce22d56..7a83f56cbd6c 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-208/NotConstantTimeCheckOnSignature/Test.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-208/NotConstantTimeCheckOnSignature/Test.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-208/PossibleTimingAttackAgainstSignature.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstSignagure/Test.qlref b/java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstSignagure/Test.qlref index b436a54c5502..f8275271b6bb 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstSignagure/Test.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-208/TimingAttackAgainstSignagure/Test.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-208/TimingAttackAgainstSignature.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-299/DisabledRevocationChecking.qlref b/java/ql/test/experimental/query-tests/security/CWE-299/DisabledRevocationChecking.qlref index 4c454db5f7f3..cc9089b49519 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-299/DisabledRevocationChecking.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-299/DisabledRevocationChecking.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-299/DisabledRevocationChecking.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.qlref b/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.qlref index b00ac77d17e8..f29bf9a7836a 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-327/UnsafeTlsVersion.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-346/UnvalidatedCors.qlref b/java/ql/test/experimental/query-tests/security/CWE-346/UnvalidatedCors.qlref index 1a5ca2ac8acd..90fde66959b1 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-346/UnvalidatedCors.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-346/UnvalidatedCors.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-346/UnvalidatedCors.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-347/Auth0NoVerifier.qlref b/java/ql/test/experimental/query-tests/security/CWE-347/Auth0NoVerifier.qlref index 14b020f24cd3..0cd8baf6d341 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-347/Auth0NoVerifier.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-347/Auth0NoVerifier.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-347/Auth0NoVerifier.ql -postprocess: TestUtilities/PrettyPrintModels.ql \ No newline at end of file +postprocess: utils/test/PrettyPrintModels.ql \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.qlref b/java/ql/test/experimental/query-tests/security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.qlref index 1876787a65e2..8ca6ac71c9a6 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref index 9f74a8f854e5..15b579b57eab 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-352/JsonpInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-400/LocalThreadResourceAbuse.qlref b/java/ql/test/experimental/query-tests/security/CWE-400/LocalThreadResourceAbuse.qlref index 7d8f79b538bf..12c247f1f3ba 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-400/LocalThreadResourceAbuse.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-400/LocalThreadResourceAbuse.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-400/LocalThreadResourceAbuse.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-400/ThreadResourceAbuse.qlref b/java/ql/test/experimental/query-tests/security/CWE-400/ThreadResourceAbuse.qlref index 391f2358ea0e..caf6f8da85ba 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-400/ThreadResourceAbuse.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-400/ThreadResourceAbuse.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-400/ThreadResourceAbuse.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-470/LoadClassNoSignatureCheck.qlref b/java/ql/test/experimental/query-tests/security/CWE-470/LoadClassNoSignatureCheck.qlref index f12675808ba2..5feabdb8becd 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-470/LoadClassNoSignatureCheck.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-470/LoadClassNoSignatureCheck.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-470/LoadClassNoSignatureCheck.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-470/UnsafeReflection.qlref b/java/ql/test/experimental/query-tests/security/CWE-470/UnsafeReflection.qlref index 7d018a21278c..28822316a908 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-470/UnsafeReflection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-470/UnsafeReflection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-470/UnsafeReflection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeDeserializationRmi.qlref b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeDeserializationRmi.qlref index 554ae928f15d..f9691113cfaa 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeDeserializationRmi.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeDeserializationRmi.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-502/UnsafeDeserializationRmi.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-522-DecompressionBombs/test.ql b/java/ql/test/experimental/query-tests/security/CWE-522-DecompressionBombs/test.ql index 77b1ced45132..388546202c83 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-522-DecompressionBombs/test.ql +++ b/java/ql/test/experimental/query-tests/security/CWE-522-DecompressionBombs/test.ql @@ -1,6 +1,6 @@ import java import experimental.semmle.code.java.security.DecompressionBombQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTestArgString string getArgString(DataFlow::Node src, DataFlow::Node sink) { diff --git a/java/ql/test/experimental/query-tests/security/CWE-598/SensitiveGetQuery.qlref b/java/ql/test/experimental/query-tests/security/CWE-598/SensitiveGetQuery.qlref index 792fe5d5d03d..53c2523e0411 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-598/SensitiveGetQuery.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-598/SensitiveGetQuery.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-600/UncaughtServletException.qlref b/java/ql/test/experimental/query-tests/security/CWE-600/UncaughtServletException.qlref index f1fd52acf7d1..14466d983a7e 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-600/UncaughtServletException.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-600/UncaughtServletException.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-600/UncaughtServletException.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-601/SpringUrlRedirect.qlref b/java/ql/test/experimental/query-tests/security/CWE-601/SpringUrlRedirect.qlref index 3042754d472f..3c1c8a42a95b 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-601/SpringUrlRedirect.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-601/SpringUrlRedirect.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-601/SpringUrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-625/PermissiveDotRegex.qlref b/java/ql/test/experimental/query-tests/security/CWE-625/PermissiveDotRegex.qlref index 3c2e294d0fe1..67382a5e297e 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-625/PermissiveDotRegex.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-625/PermissiveDotRegex.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-625/PermissiveDotRegex.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-652/XQueryInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-652/XQueryInjection.qlref index 144ddadbc85e..df94ae95807d 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-652/XQueryInjection.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-652/XQueryInjection.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-652/XQueryInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-755/NFEAndroidDoS.qlref b/java/ql/test/experimental/query-tests/security/CWE-755/NFEAndroidDoS.qlref index 98cebb7e10f7..17bd71ea68af 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-755/NFEAndroidDoS.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-755/NFEAndroidDoS.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-759/HashWithoutSalt.qlref b/java/ql/test/experimental/query-tests/security/CWE-759/HashWithoutSalt.qlref index 7e6fc4567369..b2f767ca66ac 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-759/HashWithoutSalt.qlref +++ b/java/ql/test/experimental/query-tests/security/CWE-759/HashWithoutSalt.qlref @@ -1,2 +1,2 @@ query: experimental/Security/CWE/CWE-759/HashWithoutSalt.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/ext/TestModels/test.ql b/java/ql/test/ext/TestModels/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/ext/TestModels/test.ql +++ b/java/ql/test/ext/TestModels/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/callback-dispatch/test.ql b/java/ql/test/library-tests/dataflow/callback-dispatch/test.ql index a95352f7f722..c8b66590f019 100644 --- a/java/ql/test/library-tests/dataflow/callback-dispatch/test.ql +++ b/java/ql/test/library-tests/dataflow/callback-dispatch/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") } diff --git a/java/ql/test/library-tests/dataflow/callctx/test.ql b/java/ql/test/library-tests/dataflow/callctx/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/dataflow/callctx/test.ql +++ b/java/ql/test/library-tests/dataflow/callctx/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/capture/inlinetest.ql b/java/ql/test/library-tests/dataflow/capture/inlinetest.ql index 8a82c0c18009..e64b8bfececb 100644 --- a/java/ql/test/library-tests/dataflow/capture/inlinetest.ql +++ b/java/ql/test/library-tests/dataflow/capture/inlinetest.ql @@ -1,3 +1,3 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/collections/containerflow.ql b/java/ql/test/library-tests/dataflow/collections/containerflow.ql index de5ff146faef..029108b6257c 100644 --- a/java/ql/test/library-tests/dataflow/collections/containerflow.ql +++ b/java/ql/test/library-tests/dataflow/collections/containerflow.ql @@ -1,5 +1,5 @@ import java import semmle.code.java.dataflow.DataFlow -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql b/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql index 9ef1e3867d2d..65d97cae7994 100644 --- a/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql +++ b/java/ql/test/library-tests/dataflow/entrypoint-types/EntryPointTypesTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest class TestRemoteFlowSource extends RemoteFlowSource { TestRemoteFlowSource() { this.asParameter().hasName("source") } diff --git a/java/ql/test/library-tests/dataflow/field-value/test.ql b/java/ql/test/library-tests/dataflow/field-value/test.ql index 4c364e8df700..848974224060 100644 --- a/java/ql/test/library-tests/dataflow/field-value/test.ql +++ b/java/ql/test/library-tests/dataflow/field-value/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module FieldValueConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof DataFlow::FieldValueNode } diff --git a/java/ql/test/library-tests/dataflow/flowfeature/flow.ql b/java/ql/test/library-tests/dataflow/flowfeature/flow.ql index 9b2fc4ed36b0..7c41d610141c 100644 --- a/java/ql/test/library-tests/dataflow/flowfeature/flow.ql +++ b/java/ql/test/library-tests/dataflow/flowfeature/flow.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module Base { predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") } diff --git a/java/ql/test/library-tests/dataflow/fluent-methods/flow.ql b/java/ql/test/library-tests/dataflow/fluent-methods/flow.ql index cb5151e62426..3b6e9062581f 100644 --- a/java/ql/test/library-tests/dataflow/fluent-methods/flow.ql +++ b/java/ql/test/library-tests/dataflow/fluent-methods/flow.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSteps -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/implicit-read/test.ql b/java/ql/test/library-tests/dataflow/implicit-read/test.ql index 4b07984456ba..78cc3b5c7f25 100644 --- a/java/ql/test/library-tests/dataflow/implicit-read/test.ql +++ b/java/ql/test/library-tests/dataflow/implicit-read/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { DefaultFlowConfig::isSource(source) } diff --git a/java/ql/test/library-tests/dataflow/range-analysis-inline/range.ql b/java/ql/test/library-tests/dataflow/range-analysis-inline/range.ql index b0fcc1710d44..735bbe525706 100644 --- a/java/ql/test/library-tests/dataflow/range-analysis-inline/range.ql +++ b/java/ql/test/library-tests/dataflow/range-analysis-inline/range.ql @@ -5,7 +5,7 @@ import java import semmle.code.java.dataflow.RangeAnalysis -private import TestUtilities.InlineExpectationsTest as IET +private import utils.test.InlineExpectationsTest as IET module RangeTest implements IET::TestSig { string getARelevantTag() { result = "bound" } diff --git a/java/ql/test/library-tests/dataflow/state/test.ql b/java/ql/test/library-tests/dataflow/state/test.ql index 4107c2392a38..9a3b21af8cb0 100644 --- a/java/ql/test/library-tests/dataflow/state/test.ql +++ b/java/ql/test/library-tests/dataflow/state/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import DataFlow predicate src(Node n, string s) { diff --git a/java/ql/test/library-tests/dataflow/stream-collect/test.ql b/java/ql/test/library-tests/dataflow/stream-collect/test.ql index 8a82c0c18009..e64b8bfececb 100644 --- a/java/ql/test/library-tests/dataflow/stream-collect/test.ql +++ b/java/ql/test/library-tests/dataflow/stream-collect/test.ql @@ -1,3 +1,3 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/stream-read/test.ql b/java/ql/test/library-tests/dataflow/stream-read/test.ql index 8a82c0c18009..e64b8bfececb 100644 --- a/java/ql/test/library-tests/dataflow/stream-read/test.ql +++ b/java/ql/test/library-tests/dataflow/stream-read/test.ql @@ -1,3 +1,3 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/subpaths/flow.ql b/java/ql/test/library-tests/dataflow/subpaths/flow.ql index 8a82c0c18009..e64b8bfececb 100644 --- a/java/ql/test/library-tests/dataflow/subpaths/flow.ql +++ b/java/ql/test/library-tests/dataflow/subpaths/flow.ql @@ -1,3 +1,3 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/synth-global/test.ql b/java/ql/test/library-tests/dataflow/synth-global/test.ql index 50f1a17a4f9f..841eee98e319 100644 --- a/java/ql/test/library-tests/dataflow/synth-global/test.ql +++ b/java/ql/test/library-tests/dataflow/synth-global/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.ExternalFlow -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ModelValidation import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/taint-format/test.ql b/java/ql/test/library-tests/dataflow/taint-format/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/dataflow/taint-format/test.ql +++ b/java/ql/test/library-tests/dataflow/taint-format/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/taint-gson/dataFlow.ql b/java/ql/test/library-tests/dataflow/taint-gson/dataFlow.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/dataflow/taint-gson/dataFlow.ql +++ b/java/ql/test/library-tests/dataflow/taint-gson/dataFlow.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/taint-jackson/dataFlow.ql b/java/ql/test/library-tests/dataflow/taint-jackson/dataFlow.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/dataflow/taint-jackson/dataFlow.ql +++ b/java/ql/test/library-tests/dataflow/taint-jackson/dataFlow.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/dataflow/taintsources/local.ql b/java/ql/test/library-tests/dataflow/taintsources/local.ql index d4a08d836bb6..bcbdcc56e1a0 100644 --- a/java/ql/test/library-tests/dataflow/taintsources/local.ql +++ b/java/ql/test/library-tests/dataflow/taintsources/local.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest predicate isTestSink(DataFlow::Node n) { exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) diff --git a/java/ql/test/library-tests/dataflow/taintsources/remote.ql b/java/ql/test/library-tests/dataflow/taintsources/remote.ql index ce466f6c6474..7382236b48b0 100644 --- a/java/ql/test/library-tests/dataflow/taintsources/remote.ql +++ b/java/ql/test/library-tests/dataflow/taintsources/remote.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest predicate isTestSink(DataFlow::Node n) { exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) diff --git a/java/ql/test/library-tests/dataflow/taintsources/reversedns.ql b/java/ql/test/library-tests/dataflow/taintsources/reversedns.ql index 8ec5acab5e54..b1868b9ea69f 100644 --- a/java/ql/test/library-tests/dataflow/taintsources/reversedns.ql +++ b/java/ql/test/library-tests/dataflow/taintsources/reversedns.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest predicate isTestSink(DataFlow::Node n) { exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) diff --git a/java/ql/test/library-tests/dataflow/typeflow-dispatch/test.ql b/java/ql/test/library-tests/dataflow/typeflow-dispatch/test.ql index 8a82c0c18009..e64b8bfececb 100644 --- a/java/ql/test/library-tests/dataflow/typeflow-dispatch/test.ql +++ b/java/ql/test/library-tests/dataflow/typeflow-dispatch/test.ql @@ -1,3 +1,3 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs.ql index f94cd30df047..9ab5b6c67402 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.frameworks.JaxWS import semmle.code.java.security.XSS -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module JaxRsTest implements TestSig { string getARelevantTag() { diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql index 348956f24982..7deea8dbb4ec 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.ql index 8ccc69dc8c20..75eb4aae926c 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.frameworks.JaxWS -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module JaxWsEndpointTest implements TestSig { string getARelevantTag() { result = ["JaxWsEndpoint", "JaxWsEndpointRemoteMethod"] } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/UrlRedirect.qlref b/java/ql/test/library-tests/frameworks/JaxWs/UrlRedirect.qlref index 7a16f869e57b..933c3569eed8 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/UrlRedirect.qlref +++ b/java/ql/test/library-tests/frameworks/JaxWs/UrlRedirect.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-601/UrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/library-tests/frameworks/android/asynctask/test.ql b/java/ql/test/library-tests/frameworks/android/asynctask/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/android/asynctask/test.ql +++ b/java/ql/test/library-tests/frameworks/android/asynctask/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/content-provider-summaries/test.ql b/java/ql/test/library-tests/frameworks/android/content-provider-summaries/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/android/content-provider-summaries/test.ql +++ b/java/ql/test/library-tests/frameworks/android/content-provider-summaries/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/content-provider/test.ql b/java/ql/test/library-tests/frameworks/android/content-provider/test.ql index b83f43911bd3..f298a35b2de0 100644 --- a/java/ql/test/library-tests/frameworks/android/content-provider/test.ql +++ b/java/ql/test/library-tests/frameworks/android/content-provider/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module ProviderTaintFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/android/external-storage/test.ql b/java/ql/test/library-tests/frameworks/android/external-storage/test.ql index 042f7b303900..92c32658c8d3 100644 --- a/java/ql/test/library-tests/frameworks/android/external-storage/test.ql +++ b/java/ql/test/library-tests/frameworks/android/external-storage/test.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/android/flow-steps/test.ql b/java/ql/test/library-tests/frameworks/android/flow-steps/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/android/flow-steps/test.ql +++ b/java/ql/test/library-tests/frameworks/android/flow-steps/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/intent/test.ql b/java/ql/test/library-tests/frameworks/android/intent/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/android/intent/test.ql +++ b/java/ql/test/library-tests/frameworks/android/intent/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/notification/test.ql b/java/ql/test/library-tests/frameworks/android/notification/test.ql index b99687c21e2c..ebb2ade6fc11 100644 --- a/java/ql/test/library-tests/frameworks/android/notification/test.ql +++ b/java/ql/test/library-tests/frameworks/android/notification/test.ql @@ -1,5 +1,5 @@ import java import semmle.code.java.frameworks.android.Intent -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/slice/test.ql b/java/ql/test/library-tests/frameworks/android/slice/test.ql index a8b467d1ba0b..56f500a9cd2e 100644 --- a/java/ql/test/library-tests/frameworks/android/slice/test.ql +++ b/java/ql/test/library-tests/frameworks/android/slice/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.TaintTracking -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.dataflow.FlowSources module SliceValueFlowConfig implements DataFlow::ConfigSig { diff --git a/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql b/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql index 96d9523b2a5c..d9534c1d64a1 100644 --- a/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql +++ b/java/ql/test/library-tests/frameworks/android/sources/OnActivityResultSourceTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module SourceValueFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql index 0bb9282809f5..5ca38c7e29b1 100644 --- a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql +++ b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql @@ -2,7 +2,7 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.QueryInjection -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql b/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql index 8c295c6f00cd..ccdb96980092 100644 --- a/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql +++ b/java/ql/test/library-tests/frameworks/android/taint-database/sinks.ql @@ -2,7 +2,7 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.QueryInjection -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/java/ql/test/library-tests/frameworks/android/uri/test.ql b/java/ql/test/library-tests/frameworks/android/uri/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/android/uri/test.ql +++ b/java/ql/test/library-tests/frameworks/android/uri/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/android/widget/test.ql b/java/ql/test/library-tests/frameworks/android/widget/test.ql index d3c2cda98c5c..14c2dad2ac50 100644 --- a/java/ql/test/library-tests/frameworks/android/widget/test.ql +++ b/java/ql/test/library-tests/frameworks/android/widget/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/apache-ant/test.ql b/java/ql/test/library-tests/frameworks/apache-ant/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/apache-ant/test.ql +++ b/java/ql/test/library-tests/frameworks/apache-ant/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/apache-collections/test.ql b/java/ql/test/library-tests/frameworks/apache-collections/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/apache-collections/test.ql +++ b/java/ql/test/library-tests/frameworks/apache-collections/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/apache-commons-compress/test.ql b/java/ql/test/library-tests/frameworks/apache-commons-compress/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-compress/test.ql +++ b/java/ql/test/library-tests/frameworks/apache-commons-compress/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.ql b/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.ql +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/flow.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/apache-http/flow.ql b/java/ql/test/library-tests/frameworks/apache-http/flow.ql index b2f5b2d023b2..e8f2911a4732 100644 --- a/java/ql/test/library-tests/frameworks/apache-http/flow.ql +++ b/java/ql/test/library-tests/frameworks/apache-http/flow.ql @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.XSS import semmle.code.java.security.UrlRedirect -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { diff --git a/java/ql/test/library-tests/frameworks/gson/test.ql b/java/ql/test/library-tests/frameworks/gson/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/gson/test.ql +++ b/java/ql/test/library-tests/frameworks/gson/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/guava/generated/cache/test.ql b/java/ql/test/library-tests/frameworks/guava/generated/cache/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/guava/generated/cache/test.ql +++ b/java/ql/test/library-tests/frameworks/guava/generated/cache/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/guava/generated/collect/test.ql b/java/ql/test/library-tests/frameworks/guava/generated/collect/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/guava/generated/collect/test.ql +++ b/java/ql/test/library-tests/frameworks/guava/generated/collect/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/guava/handwritten/flow.ql b/java/ql/test/library-tests/frameworks/guava/handwritten/flow.ql index bb4592b0dba0..da4d7cea0cb3 100644 --- a/java/ql/test/library-tests/frameworks/guava/handwritten/flow.ql +++ b/java/ql/test/library-tests/frameworks/guava/handwritten/flow.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module TaintFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") } diff --git a/java/ql/test/library-tests/frameworks/hudson/test.ql b/java/ql/test/library-tests/frameworks/hudson/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/hudson/test.ql +++ b/java/ql/test/library-tests/frameworks/hudson/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/jackson/test.ql b/java/ql/test/library-tests/frameworks/jackson/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/jackson/test.ql +++ b/java/ql/test/library-tests/frameworks/jackson/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/javax-json/test.ql b/java/ql/test/library-tests/frameworks/javax-json/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/javax-json/test.ql +++ b/java/ql/test/library-tests/frameworks/javax-json/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/jdk/java.io/test.ql b/java/ql/test/library-tests/frameworks/jdk/java.io/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/jdk/java.io/test.ql +++ b/java/ql/test/library-tests/frameworks/jdk/java.io/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/jdk/java.net/test.ql b/java/ql/test/library-tests/frameworks/jdk/java.net/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/jdk/java.net/test.ql +++ b/java/ql/test/library-tests/frameworks/jdk/java.net/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/jdk/java.nio.file/test.ql b/java/ql/test/library-tests/frameworks/jdk/java.nio.file/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/jdk/java.nio.file/test.ql +++ b/java/ql/test/library-tests/frameworks/jdk/java.nio.file/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/jms/FlowTest.ql b/java/ql/test/library-tests/frameworks/jms/FlowTest.ql index b63aedbf9845..a85ee5f4eb40 100644 --- a/java/ql/test/library-tests/frameworks/jms/FlowTest.ql +++ b/java/ql/test/library-tests/frameworks/jms/FlowTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/jms/RemoteSourcesTest.ql b/java/ql/test/library-tests/frameworks/jms/RemoteSourcesTest.ql index 78b1dda532ef..4d5ebef78e3f 100644 --- a/java/ql/test/library-tests/frameworks/jms/RemoteSourcesTest.ql +++ b/java/ql/test/library-tests/frameworks/jms/RemoteSourcesTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module JmsRemoteSourcesTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/java/ql/test/library-tests/frameworks/json-java/test.ql b/java/ql/test/library-tests/frameworks/json-java/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/json-java/test.ql +++ b/java/ql/test/library-tests/frameworks/json-java/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/lastaflute/test.ql b/java/ql/test/library-tests/frameworks/lastaflute/test.ql index a62fdf67dfcf..2115fe3aa923 100644 --- a/java/ql/test/library-tests/frameworks/lastaflute/test.ql +++ b/java/ql/test/library-tests/frameworks/lastaflute/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n instanceof RemoteFlowSource } diff --git a/java/ql/test/library-tests/frameworks/netty/generated/test.ql b/java/ql/test/library-tests/frameworks/netty/generated/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/netty/generated/test.ql +++ b/java/ql/test/library-tests/frameworks/netty/generated/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/netty/manual/test.ql b/java/ql/test/library-tests/frameworks/netty/manual/test.ql index a4142390e85a..cc3a19db38fe 100644 --- a/java/ql/test/library-tests/frameworks/netty/manual/test.ql +++ b/java/ql/test/library-tests/frameworks/netty/manual/test.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { diff --git a/java/ql/test/library-tests/frameworks/okhttp/test.ql b/java/ql/test/library-tests/frameworks/okhttp/test.ql index 8c988c1f0da6..6ed0d6205753 100644 --- a/java/ql/test/library-tests/frameworks/okhttp/test.ql +++ b/java/ql/test/library-tests/frameworks/okhttp/test.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.ExternalFlow -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module OkHttpFlowConfig implements DataFlow::ConfigSig { predicate isSource = DefaultFlowConfig::isSource/1; diff --git a/java/ql/test/library-tests/frameworks/play/test.ql b/java/ql/test/library-tests/frameworks/play/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/play/test.ql +++ b/java/ql/test/library-tests/frameworks/play/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql b/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql index 0fdb21094387..412973f8b9f3 100644 --- a/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql +++ b/java/ql/test/library-tests/frameworks/rabbitmq/FlowTest.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/rabbitmq/SourceTest.ql b/java/ql/test/library-tests/frameworks/rabbitmq/SourceTest.ql index bc46ba9518b0..b1ef4b264a2c 100644 --- a/java/ql/test/library-tests/frameworks/rabbitmq/SourceTest.ql +++ b/java/ql/test/library-tests/frameworks/rabbitmq/SourceTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SourceTest implements TestSig { string getARelevantTag() { result = "source" } diff --git a/java/ql/test/library-tests/frameworks/ratpack/flow.ql b/java/ql/test/library-tests/frameworks/ratpack/flow.ql index 2d5b5b2e4716..948332b33da9 100644 --- a/java/ql/test/library-tests/frameworks/ratpack/flow.ql +++ b/java/ql/test/library-tests/frameworks/ratpack/flow.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { diff --git a/java/ql/test/library-tests/frameworks/retrofit/test.ql b/java/ql/test/library-tests/frameworks/retrofit/test.ql index e7f90fc2c0b6..a1ae00a06a7a 100644 --- a/java/ql/test/library-tests/frameworks/retrofit/test.ql +++ b/java/ql/test/library-tests/frameworks/retrofit/test.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.ExternalFlow -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module FlowConfig implements DataFlow::ConfigSig { predicate isSource = DefaultFlowConfig::isSource/1; diff --git a/java/ql/test/library-tests/frameworks/spring/beans/test.ql b/java/ql/test/library-tests/frameworks/spring/beans/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/beans/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/beans/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/cache/test.ql b/java/ql/test/library-tests/frameworks/spring/cache/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/cache/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/cache/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/context/flow.ql b/java/ql/test/library-tests/frameworks/spring/context/flow.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/context/flow.ql +++ b/java/ql/test/library-tests/frameworks/spring/context/flow.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/controller/test.ql b/java/ql/test/library-tests/frameworks/spring/controller/test.ql index e85137dcd57a..f48d9f51b4f5 100644 --- a/java/ql/test/library-tests/frameworks/spring/controller/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/controller/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module ValueFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } diff --git a/java/ql/test/library-tests/frameworks/spring/data/test.ql b/java/ql/test/library-tests/frameworks/spring/data/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/data/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/data/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/http/flow.ql b/java/ql/test/library-tests/frameworks/spring/http/flow.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/http/flow.ql +++ b/java/ql/test/library-tests/frameworks/spring/http/flow.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/ui/test.ql b/java/ql/test/library-tests/frameworks/spring/ui/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/ui/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/ui/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/util/test.ql b/java/ql/test/library-tests/frameworks/spring/util/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/util/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/util/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/validation/test.ql b/java/ql/test/library-tests/frameworks/spring/validation/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/validation/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/validation/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql b/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/test.ql b/java/ql/test/library-tests/frameworks/spring/webutil/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/spring/webutil/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/webutil/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/stapler/test.ql b/java/ql/test/library-tests/frameworks/stapler/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/stapler/test.ql +++ b/java/ql/test/library-tests/frameworks/stapler/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/stream/test.ql b/java/ql/test/library-tests/frameworks/stream/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/stream/test.ql +++ b/java/ql/test/library-tests/frameworks/stream/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/frameworks/thymeleaf/test.ql b/java/ql/test/library-tests/frameworks/thymeleaf/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/frameworks/thymeleaf/test.ql +++ b/java/ql/test/library-tests/frameworks/thymeleaf/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/logging/test.ql b/java/ql/test/library-tests/logging/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/logging/test.ql +++ b/java/ql/test/library-tests/logging/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/neutrals/neutralsinks/NeutralSinksTest.ql b/java/ql/test/library-tests/neutrals/neutralsinks/NeutralSinksTest.ql index ac56b93e642d..20ccf9e731ad 100644 --- a/java/ql/test/library-tests/neutrals/neutralsinks/NeutralSinksTest.ql +++ b/java/ql/test/library-tests/neutrals/neutralsinks/NeutralSinksTest.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.ExternalFlow import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl diff --git a/java/ql/test/library-tests/optional/test.ql b/java/ql/test/library-tests/optional/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/optional/test.ql +++ b/java/ql/test/library-tests/optional/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/paths/test.ql b/java/ql/test/library-tests/paths/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/paths/test.ql +++ b/java/ql/test/library-tests/paths/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/pathsanitizer/test.ql b/java/ql/test/library-tests/pathsanitizer/test.ql index 0a20ad012b90..4ee3fb421687 100644 --- a/java/ql/test/library-tests/pathsanitizer/test.ql +++ b/java/ql/test/library-tests/pathsanitizer/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.PathSanitizer -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest module PathSanitizerConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { DefaultFlowConfig::isSource(source) } diff --git a/java/ql/test/library-tests/regex/test.ql b/java/ql/test/library-tests/regex/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/regex/test.ql +++ b/java/ql/test/library-tests/regex/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/scanner/test.ql b/java/ql/test/library-tests/scanner/test.ql index a8287d6c5f1a..de0d4722737b 100644 --- a/java/ql/test/library-tests/scanner/test.ql +++ b/java/ql/test/library-tests/scanner/test.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/java/ql/test/library-tests/xml/XMLTest.ql b/java/ql/test/library-tests/xml/XMLTest.ql index 40c5481e3e38..70a29de94ab5 100644 --- a/java/ql/test/library-tests/xml/XMLTest.ql +++ b/java/ql/test/library-tests/xml/XMLTest.ql @@ -1,5 +1,5 @@ import semmle.code.xml.XML -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module XmlTest implements TestSig { string getARelevantTag() { result = "hasXmlResult" } diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql index 25e5bf1df875..3e7fbdb31312 100644 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.TaintedPathQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/ZipSlip.qlref b/java/ql/test/query-tests/security/CWE-022/semmle/tests/ZipSlip.qlref index 0e8a785d2ff6..eee3728e935a 100644 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/ZipSlip.qlref +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/ZipSlip.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-022/ZipSlip.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql index 26a6012d7fb0..45dab6606fa1 100644 --- a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql +++ b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.PartialPathTraversalQuery class TestRemoteSource extends RemoteFlowSource { diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql b/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql index 242bf9c3f54f..03b588555b56 100644 --- a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.JndiInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasJndiInjectionTest implements TestSig { string getARelevantTag() { result = "hasJndiInjection" } diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql b/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql index 4d5200477d84..72c003246bc2 100644 --- a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql @@ -2,7 +2,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.XsltInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasXsltInjectionTest implements TestSig { string getARelevantTag() { result = "hasXsltInjection" } diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref b/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref index 2ab35baf1bdf..856b97bf0fed 100644 --- a/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref +++ b/java/ql/test/query-tests/security/CWE-078/ExecTainted.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-078/ExecTainted.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-078/ExecTaintedEnvironment.ql b/java/ql/test/query-tests/security/CWE-078/ExecTaintedEnvironment.ql index cdce227670a3..c9a4a630c603 100644 --- a/java/ql/test/query-tests/security/CWE-078/ExecTaintedEnvironment.ql +++ b/java/ql/test/query-tests/security/CWE-078/ExecTaintedEnvironment.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.TaintedEnvironmentVariableQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest private class TestSource extends RemoteFlowSource { TestSource() { this.asExpr().(MethodCall).getMethod().hasName("source") } diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql index 5e901c83498a..271488ffb1f0 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.XssQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module XssTest implements TestSig { string getARelevantTag() { result = "xss" } diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref index 0f5da65438c2..dc9ae162efbc 100644 --- a/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref +++ b/java/ql/test/query-tests/security/CWE-089/semmle/examples/SqlTainted.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-089/SqlTainted.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-089/semmle/examples/springjdbc.ql b/java/ql/test/query-tests/security/CWE-089/semmle/examples/springjdbc.ql index 28c359d9f6ad..09745c9e8576 100644 --- a/java/ql/test/query-tests/security/CWE-089/semmle/examples/springjdbc.ql +++ b/java/ql/test/query-tests/security/CWE-089/semmle/examples/springjdbc.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.SqlInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private class SourceMethodSource extends RemoteFlowSource { SourceMethodSource() { this.asExpr().(MethodCall).getMethod().hasName("source") } diff --git a/java/ql/test/query-tests/security/CWE-090/LdapInjection.qlref b/java/ql/test/query-tests/security/CWE-090/LdapInjection.qlref index 9a19b8357831..53b04e4c00fa 100644 --- a/java/ql/test/query-tests/security/CWE-090/LdapInjection.qlref +++ b/java/ql/test/query-tests/security/CWE-090/LdapInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-090/LdapInjection.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-094/ApkInstallationTest.ql b/java/ql/test/query-tests/security/CWE-094/ApkInstallationTest.ql index b10e291d376e..a4efceebc189 100644 --- a/java/ql/test/query-tests/security/CWE-094/ApkInstallationTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/ApkInstallationTest.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.ArbitraryApkInstallationQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasApkInstallationTest implements TestSig { string getARelevantTag() { result = "hasApkInstallation" } diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql index bc39280407eb..26f32638d918 100644 --- a/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql @@ -2,7 +2,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.GroovyInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasGroovyInjectionTest implements TestSig { string getARelevantTag() { result = "hasGroovyInjection" } diff --git a/java/ql/test/query-tests/security/CWE-094/InsecureBeanValidation.qlref b/java/ql/test/query-tests/security/CWE-094/InsecureBeanValidation.qlref index c7dca883295d..73254e55f938 100644 --- a/java/ql/test/query-tests/security/CWE-094/InsecureBeanValidation.qlref +++ b/java/ql/test/query-tests/security/CWE-094/InsecureBeanValidation.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-094/InsecureBeanValidation.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql index 07f1573b0398..0515c0fc75da 100644 --- a/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.JexlInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module JexlInjectionTest implements TestSig { string getARelevantTag() { result = "hasJexlInjection" } diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql index f75992500772..08dc091898c8 100644 --- a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql @@ -2,7 +2,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.MvelInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasMvelInjectionTest implements TestSig { string getARelevantTag() { result = "hasMvelInjection" } diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql index a017c96f60b3..727229e989d3 100644 --- a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql @@ -2,7 +2,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.SpelInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasSpelInjectionTest implements TestSig { string getARelevantTag() { result = "hasSpelInjection" } diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql index 4c37e8a5f011..809175bcd376 100644 --- a/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.TemplateInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module TemplateInjectionTest implements TestSig { string getARelevantTag() { result = "hasTemplateInjection" } diff --git a/java/ql/test/query-tests/security/CWE-113/semmle/tests/ResponseSplitting.qlref b/java/ql/test/query-tests/security/CWE-113/semmle/tests/ResponseSplitting.qlref index 9526ebd9e6f8..897d985e9d45 100644 --- a/java/ql/test/query-tests/security/CWE-113/semmle/tests/ResponseSplitting.qlref +++ b/java/ql/test/query-tests/security/CWE-113/semmle/tests/ResponseSplitting.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-113/ResponseSplitting.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-117/LogInjectionTest.ql b/java/ql/test/query-tests/security/CWE-117/LogInjectionTest.ql index 0ad00b64d239..4a295d8e8fac 100644 --- a/java/ql/test/query-tests/security/CWE-117/LogInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-117/LogInjectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.LogInjectionQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest private class TestSource extends RemoteFlowSource { TestSource() { this.asExpr().(MethodCall).getMethod().hasName("source") } diff --git a/java/ql/test/query-tests/security/CWE-1204/StaticInitializationVectorTest.ql b/java/ql/test/query-tests/security/CWE-1204/StaticInitializationVectorTest.ql index 2ccb8fa7c527..5996cccdd4f4 100644 --- a/java/ql/test/query-tests/security/CWE-1204/StaticInitializationVectorTest.ql +++ b/java/ql/test/query-tests/security/CWE-1204/StaticInitializationVectorTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.StaticInitializationVectorQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module StaticInitializationVectorTest implements TestSig { string getARelevantTag() { result = "staticInitializationVector" } diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref index 0eb110eba0b7..fc09d33596a9 100644 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstruction.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionCodeSpecified.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionCodeSpecified.qlref index 2c8eaeec8f9f..4cff7c39aa64 100644 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionCodeSpecified.qlref +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayConstructionCodeSpecified.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref index f9b9d57f750a..4dd969c54763 100644 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndex.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexCodeSpecified.qlref b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexCodeSpecified.qlref index 347983ccc5fc..b267f488b341 100644 --- a/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexCodeSpecified.qlref +++ b/java/ql/test/query-tests/security/CWE-129/semmle/tests/ImproperValidationOfArrayIndexCodeSpecified.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.qlref b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.qlref index 99111d31f08e..6309a7eb502b 100644 --- a/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.qlref +++ b/java/ql/test/query-tests/security/CWE-134/semmle/tests/ExternallyControlledFormatString.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-134/ExternallyControlledFormatString.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref index 4504b714143c..938a60cfc017 100644 --- a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticTainted.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-190/ArithmeticTainted.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.qlref index cac4d514447f..c6d57c735107 100644 --- a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.qlref +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-190/ArithmeticUncontrolled.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticWithExtremeValues.qlref b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticWithExtremeValues.qlref index c0b9d91f242b..0eaecb369412 100644 --- a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticWithExtremeValues.qlref +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticWithExtremeValues.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveNotification/test.ql b/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveNotification/test.ql index 919298a56b81..e6a433b62420 100644 --- a/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveNotification/test.ql +++ b/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveNotification/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.SensitiveUiQuery diff --git a/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveTextView/test.ql b/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveTextView/test.ql index 49ccd889b858..da2a5bea823b 100644 --- a/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveTextView/test.ql +++ b/java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveTextView/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.SensitiveUiQuery diff --git a/java/ql/test/query-tests/security/CWE-200/semmle/tests/TempDirLocalInformationDisclosure/TempDirLocalInformationDisclosure.qlref b/java/ql/test/query-tests/security/CWE-200/semmle/tests/TempDirLocalInformationDisclosure/TempDirLocalInformationDisclosure.qlref index 2464f01c5039..b7836c96d600 100644 --- a/java/ql/test/query-tests/security/CWE-200/semmle/tests/TempDirLocalInformationDisclosure/TempDirLocalInformationDisclosure.qlref +++ b/java/ql/test/query-tests/security/CWE-200/semmle/tests/TempDirLocalInformationDisclosure/TempDirLocalInformationDisclosure.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-200/TempDirLocalInformationDisclosure.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql index 86feb7843ce1..f2f820743d1c 100644 --- a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql +++ b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.IntentUriPermissionManipulationQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-273/UnsafeCertTrustTest.ql b/java/ql/test/query-tests/security/CWE-273/UnsafeCertTrustTest.ql index e896e272aa40..7e620b8d3dae 100644 --- a/java/ql/test/query-tests/security/CWE-273/UnsafeCertTrustTest.ql +++ b/java/ql/test/query-tests/security/CWE-273/UnsafeCertTrustTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.UnsafeCertTrustQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module UnsafeCertTrustTest implements TestSig { string getARelevantTag() { result = "hasUnsafeCertTrust" } diff --git a/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test1/InsecureKeys.ql b/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test1/InsecureKeys.ql index eec3b62dfc2a..928e15a4af41 100644 --- a/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test1/InsecureKeys.ql +++ b/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test1/InsecureKeys.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.AndroidLocalAuthQuery diff --git a/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test2/InsecureKeys.ql b/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test2/InsecureKeys.ql index eec3b62dfc2a..928e15a4af41 100644 --- a/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test2/InsecureKeys.ql +++ b/java/ql/test/query-tests/security/CWE-287/InsecureKeys/Test2/InsecureKeys.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.AndroidLocalAuthQuery diff --git a/java/ql/test/query-tests/security/CWE-287/InsecureLocalAuth/InsecureLocalAuth.ql b/java/ql/test/query-tests/security/CWE-287/InsecureLocalAuth/InsecureLocalAuth.ql index 36becaff7553..3849a6f150f9 100644 --- a/java/ql/test/query-tests/security/CWE-287/InsecureLocalAuth/InsecureLocalAuth.ql +++ b/java/ql/test/query-tests/security/CWE-287/InsecureLocalAuth/InsecureLocalAuth.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.AndroidLocalAuthQuery diff --git a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test1/test.ql b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test1/test.ql index 1a6c3a9d0c08..3eb3c1abd19b 100644 --- a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test1/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test1/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.AndroidCertificatePinningQuery module Test implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/test.ql b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/test.ql index 1a6c3a9d0c08..3eb3c1abd19b 100644 --- a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test2/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.AndroidCertificatePinningQuery module Test implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test3/test.ql b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test3/test.ql index 1a6c3a9d0c08..3eb3c1abd19b 100644 --- a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test3/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test3/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.AndroidCertificatePinningQuery module Test implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test4/test.ql b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test4/test.ql index 1a6c3a9d0c08..3eb3c1abd19b 100644 --- a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test4/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test4/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.AndroidCertificatePinningQuery module Test implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test5/test.ql b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test5/test.ql index 1a6c3a9d0c08..3eb3c1abd19b 100644 --- a/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test5/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test5/test.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.AndroidCertificatePinningQuery module Test implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql index 70d242e7ebb8..ceb39ffcbc14 100644 --- a/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql +++ b/java/ql/test/query-tests/security/CWE-295/ImproperWebVeiwCertificateValidation/test.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.AndroidWebViewCertificateValidationQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module WebViewTest implements TestSig { string getARelevantTag() { result = "hasResult" } diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql index 11a59f51feb8..1c0ffc49eba4 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.InsecureTrustManagerQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module InsecureTrustManagerTest implements TestSig { string getARelevantTag() { result = "hasValueFlow" } diff --git a/java/ql/test/query-tests/security/CWE-297/InsecureJavaMailTest.ql b/java/ql/test/query-tests/security/CWE-297/InsecureJavaMailTest.ql index 9dc1dbe121af..be4a8d5d7738 100644 --- a/java/ql/test/query-tests/security/CWE-297/InsecureJavaMailTest.ql +++ b/java/ql/test/query-tests/security/CWE-297/InsecureJavaMailTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.Mail -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module InsecureJavaMailTest implements TestSig { string getARelevantTag() { result = "hasInsecureJavaMail" } diff --git a/java/ql/test/query-tests/security/CWE-297/UnsafeHostnameVerification.qlref b/java/ql/test/query-tests/security/CWE-297/UnsafeHostnameVerification.qlref index b4e013c8de7d..5c82af8f3f7c 100644 --- a/java/ql/test/query-tests/security/CWE-297/UnsafeHostnameVerification.qlref +++ b/java/ql/test/query-tests/security/CWE-297/UnsafeHostnameVerification.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-297/UnsafeHostnameVerification.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref index b05c8153ebe6..ee69b6e12ca9 100644 --- a/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-319/HttpsUrls.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidDatabaseTest.ql b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidDatabaseTest.ql index 60df4bd39ab7..2c43ab78202d 100644 --- a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidDatabaseTest.ql +++ b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidDatabaseTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.CleartextStorageAndroidDatabaseQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module CleartextStorageAndroidDatabaseTest implements TestSig { string getARelevantTag() { result = "hasCleartextStorageAndroidDatabase" } diff --git a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidFilesystemTest.ql b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidFilesystemTest.ql index 7b7380ccedfc..56dc7d7893a4 100644 --- a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidFilesystemTest.ql +++ b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageAndroidFilesystemTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.CleartextStorageAndroidFilesystemQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module CleartextStorageAndroidFilesystemTest implements TestSig { string getARelevantTag() { result = "hasCleartextStorageAndroidFilesystem" } diff --git a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.ql b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.ql index d7a714bc7f26..e383270c256c 100644 --- a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.ql +++ b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.CleartextStorageSharedPrefsQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module CleartextStorageSharedPrefsTest implements TestSig { string getARelevantTag() { result = "hasCleartextStorageSharedPrefs" } diff --git a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql index 642495eebaa3..441faa888e34 100644 --- a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql +++ b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.InsufficientKeySizeQuery module InsufficientKeySizeTest implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-327/semmle/tests/BrokenCryptoAlgorithm.qlref b/java/ql/test/query-tests/security/CWE-327/semmle/tests/BrokenCryptoAlgorithm.qlref index 8b22820e0911..32cbef3d0fbb 100644 --- a/java/ql/test/query-tests/security/CWE-327/semmle/tests/BrokenCryptoAlgorithm.qlref +++ b/java/ql/test/query-tests/security/CWE-327/semmle/tests/BrokenCryptoAlgorithm.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql index a2b6f329ae80..a9e8cbb2dc4d 100644 --- a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql +++ b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.InsecureRandomnessQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module WeakRandomTest implements TestSig { string getARelevantTag() { result = "hasWeakRandomFlow" } diff --git a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql index 3d9a18fc1a89..4ce6116e27f2 100644 --- a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql +++ b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.MissingJWTSignatureCheckQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasMissingJwtSignatureCheckTest implements TestSig { string getARelevantTag() { result = "hasMissingJwtSignatureCheck" } diff --git a/java/ql/test/query-tests/security/CWE-352/SpringCsrfProtectionTest.ql b/java/ql/test/query-tests/security/CWE-352/SpringCsrfProtectionTest.ql index adf7bfb9862a..067ce1cc952f 100644 --- a/java/ql/test/query-tests/security/CWE-352/SpringCsrfProtectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-352/SpringCsrfProtectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.SpringCsrfProtection -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SpringCsrfProtectionTest implements TestSig { string getARelevantTag() { result = "hasSpringCsrfProtectionDisabled" } diff --git a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql index ae1258a66c5f..ded8a8d69798 100644 --- a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql +++ b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.UnsafeContentUriResolutionQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionInPreferenceActivityTest.ql b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionInPreferenceActivityTest.ql index c1878d4976d3..0deb6934ea30 100644 --- a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionInPreferenceActivityTest.ql +++ b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionInPreferenceActivityTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.FragmentInjection -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module FragmentInjectionInPreferenceActivityTest implements TestSig { string getARelevantTag() { result = "hasPreferenceFragmentInjection" } diff --git a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql index a1cff04f4c63..665d750ee204 100644 --- a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql @@ -1,4 +1,4 @@ import java import semmle.code.java.security.FragmentInjectionQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-489/debuggable-attribute/DebuggableAttributeEnabledTest.ql b/java/ql/test/query-tests/security/CWE-489/debuggable-attribute/DebuggableAttributeEnabledTest.ql index 79a762ea2094..de2a5feb7229 100644 --- a/java/ql/test/query-tests/security/CWE-489/debuggable-attribute/DebuggableAttributeEnabledTest.ql +++ b/java/ql/test/query-tests/security/CWE-489/debuggable-attribute/DebuggableAttributeEnabledTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.xml.AndroidManifest -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module DebuggableAttributeEnabledTest implements TestSig { string getARelevantTag() { result = "hasDebuggableAttributeEnabled" } diff --git a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql index 99ac3d4e03cf..f0b9cf08f820 100644 --- a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql +++ b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.WebviewDebuggingEnabledQuery import ValueFlowTest diff --git a/java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.ql b/java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.ql index 26a9b4a73085..79099f674f47 100644 --- a/java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.ql +++ b/java/ql/test/query-tests/security/CWE-501/TrustBoundaryViolations.ql @@ -1,4 +1,4 @@ import java import semmle.code.java.security.TrustBoundaryViolationQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql index 686238259855..f4570b64ef81 100644 --- a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql +++ b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.UnsafeDeserializationQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module UnsafeDeserializationTest implements TestSig { string getARelevantTag() { result = "unsafeDeserialization" } diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql index c0384899d569..d3e99009eeec 100644 --- a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql +++ b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.InsecureBasicAuthQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasInsecureBasicAuthTest implements TestSig { string getARelevantTag() { result = "hasInsecureBasicAuth" } diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql index f75550f51127..7c75f5192ed3 100644 --- a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql +++ b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.InsecureLdapAuthQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module InsecureLdapAuthenticationTest implements TestSig { string getARelevantTag() { result = "hasInsecureLdapAuth" } diff --git a/java/ql/test/query-tests/security/CWE-524/SensitiveKeyboardCache.ql b/java/ql/test/query-tests/security/CWE-524/SensitiveKeyboardCache.ql index caa50f9fa755..5c7eda42196d 100644 --- a/java/ql/test/query-tests/security/CWE-524/SensitiveKeyboardCache.ql +++ b/java/ql/test/query-tests/security/CWE-524/SensitiveKeyboardCache.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.SensitiveKeyboardCacheQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SensitiveKeyboardCacheTest implements TestSig { string getARelevantTag() { result = "hasResult" } diff --git a/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.ql b/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.ql index 389cff934a91..659d7e6c77e4 100644 --- a/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.ql +++ b/java/ql/test/query-tests/security/CWE-532/SensitiveLogInfo.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.SensitiveLoggingQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql index 34841885bc34..f7240bf0c303 100644 --- a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql +++ b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.UrlForwardQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-601/semmle/tests/UrlRedirect.qlref b/java/ql/test/query-tests/security/CWE-601/semmle/tests/UrlRedirect.qlref index 7a16f869e57b..933c3569eed8 100644 --- a/java/ql/test/query-tests/security/CWE-601/semmle/tests/UrlRedirect.qlref +++ b/java/ql/test/query-tests/security/CWE-601/semmle/tests/UrlRedirect.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-601/UrlRedirect.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-611/XXE.ql b/java/ql/test/query-tests/security/CWE-611/XXE.ql index ed12823a6bba..21483d8f658d 100644 --- a/java/ql/test/query-tests/security/CWE-611/XXE.ql +++ b/java/ql/test/query-tests/security/CWE-611/XXE.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.XxeRemoteQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql index 3f39a4752bb9..3c7110d8011f 100644 --- a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql @@ -1,7 +1,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.XPathInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasXPathInjectionTest implements TestSig { string getARelevantTag() { result = "hasXPathInjection" } diff --git a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref index f272248e402c..f06664e19d4b 100644 --- a/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref +++ b/java/ql/test/query-tests/security/CWE-681/semmle/tests/NumericCastTainted.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-681/NumericCastTainted.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql b/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql index 45dea80e72b5..d8c1a790e70a 100644 --- a/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql +++ b/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.regexp.PolynomialReDoSQuery module HasPolyRedos implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-730/ReDoS.ql b/java/ql/test/query-tests/security/CWE-730/ReDoS.ql index 4011946318e1..98674d09df5e 100644 --- a/java/ql/test/query-tests/security/CWE-730/ReDoS.ql +++ b/java/ql/test/query-tests/security/CWE-730/ReDoS.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.code.java.regex.RegexTreeView::RegexTreeView as TreeView import codeql.regex.nfa.ExponentialBackTracking::Make as ExponentialBackTracking import semmle.code.java.regex.regex diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql b/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql index afc621e0767c..cba14c212e98 100644 --- a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.regexp.RegexInjectionQuery module RegexInjectionTest implements TestSig { diff --git a/java/ql/test/query-tests/security/CWE-749/UnsafeAndroidAccessTest.ql b/java/ql/test/query-tests/security/CWE-749/UnsafeAndroidAccessTest.ql index 99fba4e91722..19770b172e44 100644 --- a/java/ql/test/query-tests/security/CWE-749/UnsafeAndroidAccessTest.ql +++ b/java/ql/test/query-tests/security/CWE-749/UnsafeAndroidAccessTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.UnsafeAndroidAccessQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module UnsafeAndroidAccessTest implements TestSig { string getARelevantTag() { result = "hasUnsafeAndroidAccess" } diff --git a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql index 16e5c219aa9e..b91765e6b7cc 100644 --- a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql +++ b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql @@ -1,4 +1,4 @@ import java -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import semmle.code.java.security.RsaWithoutOaepQuery import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsApiCall.ql b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsApiCall.ql index 2b2290fad106..7ba8c42115d8 100644 --- a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsApiCall.ql +++ b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsApiCall.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.HardcodedCredentialsApiCallQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HardcodedCredentialsApiCallTest implements TestSig { string getARelevantTag() { result = "HardcodedCredentialsApiCall" } diff --git a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsComparison.ql b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsComparison.ql index 106989848283..e03660c1e134 100644 --- a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsComparison.ql +++ b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsComparison.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.HardcodedCredentialsComparison -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HardcodedCredentialsComparisonTest implements TestSig { string getARelevantTag() { result = "HardcodedCredentialsComparison" } diff --git a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsSourceCall.ql b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsSourceCall.ql index ab941d80a4ed..dd2350f3fca5 100644 --- a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsSourceCall.ql +++ b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedCredentialsSourceCall.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.HardcodedCredentialsSourceCallQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HardcodedCredentialsSourceCallTest implements TestSig { string getARelevantTag() { result = "HardcodedCredentialsSourceCall" } diff --git a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedPasswordField.ql b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedPasswordField.ql index f734ca356aca..59a78e5301ff 100644 --- a/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedPasswordField.ql +++ b/java/ql/test/query-tests/security/CWE-798/semmle/tests/HardcodedPasswordField.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.HardcodedPasswordField -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HardcodedPasswordFieldTest implements TestSig { string getARelevantTag() { result = "HardcodedPasswordField" } diff --git a/java/ql/test/query-tests/security/CWE-807/semmle/tests/ConditionalBypassTest.ql b/java/ql/test/query-tests/security/CWE-807/semmle/tests/ConditionalBypassTest.ql index e77ea5ad228e..15f42216679a 100644 --- a/java/ql/test/query-tests/security/CWE-807/semmle/tests/ConditionalBypassTest.ql +++ b/java/ql/test/query-tests/security/CWE-807/semmle/tests/ConditionalBypassTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.ConditionalBypassQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ConditionalBypassTest implements TestSig { string getARelevantTag() { result = "hasConditionalBypassTest" } diff --git a/java/ql/test/query-tests/security/CWE-807/semmle/tests/TaintedPermissionsCheck.qlref b/java/ql/test/query-tests/security/CWE-807/semmle/tests/TaintedPermissionsCheck.qlref index d12490a40e1f..8c69ea7e9942 100644 --- a/java/ql/test/query-tests/security/CWE-807/semmle/tests/TaintedPermissionsCheck.qlref +++ b/java/ql/test/query-tests/security/CWE-807/semmle/tests/TaintedPermissionsCheck.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-807/TaintedPermissionsCheck.ql -postprocess: TestUtilities/PrettyPrintModels.ql +postprocess: utils/test/PrettyPrintModels.ql diff --git a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql index 52dd8ad34175..5957bdf5fa28 100644 --- a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql +++ b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.OgnlInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module OgnlInjectionTest implements TestSig { string getARelevantTag() { result = "hasOgnlInjection" } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql b/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql index 41dbaad7d05e..971a9532bd6f 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.RequestForgeryConfig -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasFlowTest implements TestSig { string getARelevantTag() { result = "SSRF" } diff --git a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql index baba5cac1035..67da4ee9b297 100644 --- a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql +++ b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.ImproperIntentVerificationQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module HasFlowTest implements TestSig { string getARelevantTag() { result = "hasResult" } diff --git a/java/ql/test/query-tests/security/CWE-926/ImplicitlyExportedAndroidComponentTest.ql b/java/ql/test/query-tests/security/CWE-926/ImplicitlyExportedAndroidComponentTest.ql index 934fc5c899b0..aefddf1e7f6e 100644 --- a/java/ql/test/query-tests/security/CWE-926/ImplicitlyExportedAndroidComponentTest.ql +++ b/java/ql/test/query-tests/security/CWE-926/ImplicitlyExportedAndroidComponentTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.ImplicitlyExportedAndroidComponent -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ImplicitlyExportedAndroidComponentTest implements TestSig { string getARelevantTag() { result = "hasImplicitExport" } diff --git a/java/ql/test/query-tests/security/CWE-926/incomplete_provider_permissions/ContentProviderIncompletePermissionsTest.ql b/java/ql/test/query-tests/security/CWE-926/incomplete_provider_permissions/ContentProviderIncompletePermissionsTest.ql index c7ce16660e11..37bbd60a3ba3 100644 --- a/java/ql/test/query-tests/security/CWE-926/incomplete_provider_permissions/ContentProviderIncompletePermissionsTest.ql +++ b/java/ql/test/query-tests/security/CWE-926/incomplete_provider_permissions/ContentProviderIncompletePermissionsTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.xml.AndroidManifest -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ContentProviderIncompletePermissionsTest implements TestSig { string getARelevantTag() { result = "hasIncompletePermissions" } diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql index e43b90f8ee86..b474a32b52c7 100644 --- a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql +++ b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql @@ -1,6 +1,6 @@ import java import semmle.code.java.security.ImplicitPendingIntentsQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module ImplicitPendingIntentsTest implements TestSig { string getARelevantTag() { result = "hasImplicitPendingIntent" } diff --git a/java/ql/test/query-tests/security/CWE-927/SensitiveCommunication.ql b/java/ql/test/query-tests/security/CWE-927/SensitiveCommunication.ql index 87d685d1da9e..ce523ad4170a 100644 --- a/java/ql/test/query-tests/security/CWE-927/SensitiveCommunication.ql +++ b/java/ql/test/query-tests/security/CWE-927/SensitiveCommunication.ql @@ -1,4 +1,4 @@ import java import semmle.code.java.security.AndroidSensitiveCommunicationQuery -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-927/SensitiveResultReceiver.ql b/java/ql/test/query-tests/security/CWE-927/SensitiveResultReceiver.ql index 70ce64ff97c7..0f7b6ed0554b 100644 --- a/java/ql/test/query-tests/security/CWE-927/SensitiveResultReceiver.ql +++ b/java/ql/test/query-tests/security/CWE-927/SensitiveResultReceiver.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.code.java.security.SensitiveResultReceiverQuery class TestSource extends RemoteFlowSource { diff --git a/java/ql/test/query-tests/security/CWE-940/AndroidIntentRedirectionTest.qlref b/java/ql/test/query-tests/security/CWE-940/AndroidIntentRedirectionTest.qlref index e6061ac902a2..26dc9ea016ec 100644 --- a/java/ql/test/query-tests/security/CWE-940/AndroidIntentRedirectionTest.qlref +++ b/java/ql/test/query-tests/security/CWE-940/AndroidIntentRedirectionTest.qlref @@ -1,2 +1,2 @@ query: Security/CWE/CWE-940/AndroidIntentRedirection.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql index d1ff7a20edd9..8dd23714fb79 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureContentSummaryModels.ql @@ -1,6 +1,6 @@ import java import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = ContentSensitive::captureFlow(c, _) } diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql index cdc2dfcaa459..f9ac9d8da366 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureNeutralModels.ql @@ -1,6 +1,6 @@ import java import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureNoFlow(c) } diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql index 1acde2ade49d..a7d3126df570 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSinkModels.ql @@ -1,6 +1,6 @@ import java import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureSink(c) } diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql index 7596f4f8cc14..d8ac4d9d6034 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSourceModels.ql @@ -1,6 +1,6 @@ import java import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureSource(c) } diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql index c9e5050fc1fc..482dce0ab28e 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.ql @@ -1,6 +1,6 @@ import java import utils.modelgenerator.internal.CaptureModels -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest module InlineMadTestConfig implements InlineMadTestConfigSig { string getCapturedModel(Callable c) { result = captureFlow(c) } diff --git a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql index 2bf4e08d2c17..5bf71e7e3ecf 100644 --- a/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql +++ b/java/ql/test/utils/modelgenerator/typebasedflow/CaptureTypeBasedSummaryModels.ql @@ -1,5 +1,5 @@ import java -import TestUtilities.InlineMadTest +import utils.test.InlineMadTest import utils.modelgenerator.internal.CaptureTypeBasedSummaryModels module InlineMadTestConfig implements InlineMadTestConfigSig { diff --git a/javascript/ql/test/testUtilities/ConsistencyChecking.qll b/javascript/ql/lib/utils/test/ConsistencyChecking.qll similarity index 100% rename from javascript/ql/test/testUtilities/ConsistencyChecking.qll rename to javascript/ql/lib/utils/test/ConsistencyChecking.qll diff --git a/javascript/ql/test/testUtilities/InlineExpectationsTest.qll b/javascript/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from javascript/ql/test/testUtilities/InlineExpectationsTest.qll rename to javascript/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/javascript/ql/test/testUtilities/InlineExpectationsTestQuery.ql b/javascript/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from javascript/ql/test/testUtilities/InlineExpectationsTestQuery.ql rename to javascript/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/javascript/ql/test/testUtilities/internal/InlineExpectationsTestImpl.qll b/javascript/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from javascript/ql/test/testUtilities/internal/InlineExpectationsTestImpl.qll rename to javascript/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/javascript/ql/test/library-tests/EndpointNaming/EndpointNaming.ql b/javascript/ql/test/library-tests/EndpointNaming/EndpointNaming.ql index 631fdf4b0b13..1a18d7888608 100644 --- a/javascript/ql/test/library-tests/EndpointNaming/EndpointNaming.ql +++ b/javascript/ql/test/library-tests/EndpointNaming/EndpointNaming.ql @@ -2,7 +2,7 @@ import javascript import semmle.javascript.RestrictedLocations import semmle.javascript.Lines import semmle.javascript.endpoints.EndpointNaming as EndpointNaming -import testUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import EndpointNaming::Debug private predicate isIgnored(DataFlow::FunctionNode function) { diff --git a/javascript/ql/test/library-tests/Generators/DataFlow.ql b/javascript/ql/test/library-tests/Generators/DataFlow.ql index 023c60ff8533..8097cf6063a8 100644 --- a/javascript/ql/test/library-tests/Generators/DataFlow.ql +++ b/javascript/ql/test/library-tests/Generators/DataFlow.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking class GeneratorFlowConfig extends DataFlow::Configuration { GeneratorFlowConfig() { this = "GeneratorFlowConfig" } diff --git a/javascript/ql/test/library-tests/Routing/test.ql b/javascript/ql/test/library-tests/Routing/test.ql index b427f710894a..f28456a86ead 100644 --- a/javascript/ql/test/library-tests/Routing/test.ql +++ b/javascript/ql/test/library-tests/Routing/test.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking API::Node testInstance() { result = API::moduleImport("@example/test").getInstance() } diff --git a/javascript/ql/test/library-tests/Security/heuristics/HeuristicSource.ql b/javascript/ql/test/library-tests/Security/heuristics/HeuristicSource.ql index 72d94707e6bf..af68a747833d 100644 --- a/javascript/ql/test/library-tests/Security/heuristics/HeuristicSource.ql +++ b/javascript/ql/test/library-tests/Security/heuristics/HeuristicSource.ql @@ -1,6 +1,6 @@ import javascript private import semmle.javascript.heuristics.AdditionalSources -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking class Taint extends TaintTracking::Configuration { Taint() { this = "Taint" } diff --git a/javascript/ql/test/library-tests/frameworks/Nest/Consistency.ql b/javascript/ql/test/library-tests/frameworks/Nest/Consistency.ql index e96cbc4b70f7..45180e70a5f5 100644 --- a/javascript/ql/test/library-tests/frameworks/Nest/Consistency.ql +++ b/javascript/ql/test/library-tests/frameworks/Nest/Consistency.ql @@ -1,3 +1,3 @@ -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.ReflectedXssQuery as ReflectedXss import semmle.javascript.security.dataflow.ServerSideUrlRedirectQuery as ServerSideUrlRedirect diff --git a/javascript/ql/test/library-tests/frameworks/Vuex/test.ql b/javascript/ql/test/library-tests/frameworks/Vuex/test.ql index 55464dcf72cf..2a3b4d4270b4 100644 --- a/javascript/ql/test/library-tests/frameworks/Vuex/test.ql +++ b/javascript/ql/test/library-tests/frameworks/Vuex/test.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking class BasicTaint extends TaintTracking::Configuration { BasicTaint() { this = "BasicTaint" } diff --git a/javascript/ql/test/library-tests/frameworks/data/test.ql b/javascript/ql/test/library-tests/frameworks/data/test.ql index cca38c286429..c26e59cd5fee 100644 --- a/javascript/ql/test/library-tests/frameworks/data/test.ql +++ b/javascript/ql/test/library-tests/frameworks/data/test.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels class TypeModelFromCodeQL extends ModelInput::TypeModel { diff --git a/javascript/ql/test/library-tests/threat-models/sources/TestSources.ql b/javascript/ql/test/library-tests/threat-models/sources/TestSources.ql index 3dc112c487ec..38a2d20696f8 100644 --- a/javascript/ql/test/library-tests/threat-models/sources/TestSources.ql +++ b/javascript/ql/test/library-tests/threat-models/sources/TestSources.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest class TestSourcesConfiguration extends TaintTracking::Configuration { TestSourcesConfiguration() { this = "TestSources" } diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/Consistency.ql index d5230981801c..e73494a1cd2b 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/Consistency.ql @@ -1,3 +1,3 @@ import javascript import semmle.javascript.security.dataflow.TaintedPathQuery -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking diff --git a/javascript/ql/test/query-tests/Security/CWE-073/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-073/Consistency.ql index 17260e5daa08..b873bdf9d3e8 100644 --- a/javascript/ql/test/query-tests/Security/CWE-073/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-073/Consistency.ql @@ -1,3 +1,3 @@ import javascript import semmle.javascript.security.dataflow.TemplateObjectInjectionQuery -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking diff --git a/javascript/ql/test/query-tests/Security/CWE-078/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-078/Consistency.ql index c48af1a7971d..809ac986edc5 100644 --- a/javascript/ql/test/query-tests/Security/CWE-078/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-078/Consistency.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.CommandInjectionQuery as CommandInjection import semmle.javascript.security.dataflow.IndirectCommandInjectionQuery as IndirectCommandInjection import semmle.javascript.security.dataflow.ShellCommandInjectionFromEnvironmentQuery as ShellCommandInjectionFromEnvironment diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/ConsistencyDomBasedXss.ql b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/ConsistencyDomBasedXss.ql index 639a895263a0..f2ed63384947 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/ConsistencyDomBasedXss.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/ConsistencyDomBasedXss.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.DomBasedXssQuery as DomXss diff --git a/javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss/ConsistencyExceptionXss.ql b/javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss/ConsistencyExceptionXss.ql index 5b40a626e4ab..f70cc2b0a767 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss/ConsistencyExceptionXss.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss/ConsistencyExceptionXss.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.ExceptionXssQuery as ExceptionXss diff --git a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ConsistencyReflectedXss.ql b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ConsistencyReflectedXss.ql index 3200271daa60..f79f85c593d7 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ConsistencyReflectedXss.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/ReflectedXss/ConsistencyReflectedXss.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.ReflectedXssQuery as ReflectedXss diff --git a/javascript/ql/test/query-tests/Security/CWE-079/StoredXss/ConsistencyStoredXss.ql b/javascript/ql/test/query-tests/Security/CWE-079/StoredXss/ConsistencyStoredXss.ql index c75dbb17b71c..9fe83ca3c4c7 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/StoredXss/ConsistencyStoredXss.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/StoredXss/ConsistencyStoredXss.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.StoredXssQuery as StoredXss diff --git a/javascript/ql/test/query-tests/Security/CWE-079/UnsafeHtmlConstruction/ConsistencyUnsafeHtmlConstruction.ql b/javascript/ql/test/query-tests/Security/CWE-079/UnsafeHtmlConstruction/ConsistencyUnsafeHtmlConstruction.ql index f09744a4d6ca..5270467483c0 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/UnsafeHtmlConstruction/ConsistencyUnsafeHtmlConstruction.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/UnsafeHtmlConstruction/ConsistencyUnsafeHtmlConstruction.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.UnsafeHtmlConstructionQuery as UnsafeHtmlConstruction diff --git a/javascript/ql/test/query-tests/Security/CWE-079/UnsafeJQueryPlugin/ConsistencyUnsafeJQueryPlugin.ql b/javascript/ql/test/query-tests/Security/CWE-079/UnsafeJQueryPlugin/ConsistencyUnsafeJQueryPlugin.ql index b77df2a8d670..9fcb24877418 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/UnsafeJQueryPlugin/ConsistencyUnsafeJQueryPlugin.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/UnsafeJQueryPlugin/ConsistencyUnsafeJQueryPlugin.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.UnsafeJQueryPluginQuery as UnsafeJqueryPlugin diff --git a/javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/ConsistencyXssThroughDom.ql b/javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/ConsistencyXssThroughDom.ql index 75416d5a0dc2..c2d1847ae9f1 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/ConsistencyXssThroughDom.ql +++ b/javascript/ql/test/query-tests/Security/CWE-079/XssThroughDom/ConsistencyXssThroughDom.ql @@ -1,3 +1,3 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.XssThroughDomQuery as ThroughDomXss diff --git a/javascript/ql/test/query-tests/Security/CWE-089/untyped/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-089/untyped/Consistency.ql index bd24059f31c3..c34ac544920a 100644 --- a/javascript/ql/test/query-tests/Security/CWE-089/untyped/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-089/untyped/Consistency.ql @@ -1,4 +1,4 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.SqlInjectionQuery as SqlInjection import semmle.javascript.security.dataflow.NosqlInjectionQuery as NosqlInjection diff --git a/javascript/ql/test/query-tests/Security/CWE-502/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-502/Consistency.ql index 410d56326ef7..8658a31e95b1 100644 --- a/javascript/ql/test/query-tests/Security/CWE-502/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-502/Consistency.ql @@ -1,3 +1,3 @@ import javascript import semmle.javascript.security.dataflow.UnsafeDeserializationQuery -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking diff --git a/javascript/ql/test/query-tests/Security/CWE-611/Xxe.qlref b/javascript/ql/test/query-tests/Security/CWE-611/Xxe.qlref index 38e346c1a8b2..9473e8620152 100644 --- a/javascript/ql/test/query-tests/Security/CWE-611/Xxe.qlref +++ b/javascript/ql/test/query-tests/Security/CWE-611/Xxe.qlref @@ -1,2 +1,2 @@ query: Security/CWE-611/Xxe.ql -postprocess: testUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/javascript/ql/test/query-tests/Security/CWE-770/ResourceExhaustion/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-770/ResourceExhaustion/Consistency.ql index 5742c3e1fea7..db615e52d1e6 100644 --- a/javascript/ql/test/query-tests/Security/CWE-770/ResourceExhaustion/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-770/ResourceExhaustion/Consistency.ql @@ -1,3 +1,3 @@ import javascript import semmle.javascript.security.dataflow.ResourceExhaustionQuery -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking diff --git a/javascript/ql/test/query-tests/Security/CWE-915/PrototypePollutingAssignment/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-915/PrototypePollutingAssignment/Consistency.ql index 7a440ac58bba..f4aa73f75d91 100644 --- a/javascript/ql/test/query-tests/Security/CWE-915/PrototypePollutingAssignment/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-915/PrototypePollutingAssignment/Consistency.ql @@ -1,5 +1,5 @@ import javascript -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking import semmle.javascript.security.dataflow.PrototypePollutingAssignmentQuery class Config extends ConsistencyConfiguration, Configuration { diff --git a/javascript/ql/test/query-tests/Security/CWE-918/Consistency.ql b/javascript/ql/test/query-tests/Security/CWE-918/Consistency.ql index 7950d897e8fa..3856890bc630 100644 --- a/javascript/ql/test/query-tests/Security/CWE-918/Consistency.ql +++ b/javascript/ql/test/query-tests/Security/CWE-918/Consistency.ql @@ -1,7 +1,7 @@ import javascript import semmle.javascript.security.dataflow.RequestForgeryQuery as RequestForgery import semmle.javascript.security.dataflow.ClientSideRequestForgeryQuery as ClientSideRequestForgery -import testUtilities.ConsistencyChecking +import utils.test.ConsistencyChecking query predicate resultInWrongFile(DataFlow::Node node) { exists(DataFlow::Configuration cfg, string filePattern | diff --git a/misc/bazel/pkg.bzl b/misc/bazel/pkg.bzl index d455e99c7493..d8f69c5f748a 100644 --- a/misc/bazel/pkg.bzl +++ b/misc/bazel/pkg.bzl @@ -3,6 +3,7 @@ Wrappers and helpers around `rules_pkg` to build codeql packs. """ load("@bazel_skylib//lib:paths.bzl", "paths") +load("@bazel_skylib//rules:native_binary.bzl", "native_test") load("@rules_pkg//pkg:install.bzl", "pkg_install") load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", _strip_prefix = "strip_prefix") load("@rules_pkg//pkg:pkg.bzl", "pkg_zip") @@ -351,25 +352,42 @@ def _codeql_pack_install(name, srcs, install_dest = None, build_file_label = Non visibility = ["//visibility:private"], ) build_file_label = internal("build-file") - + data = [ + internal("script"), + internal("zip-manifest"), + Label("//misc/ripunzip"), + ] + ([build_file_label] if build_file_label else []) + args = [ + "--pkg-install-script=$(rlocationpath %s)" % internal("script"), + "--ripunzip=$(rlocationpath %s)" % Label("//misc/ripunzip"), + "--zip-manifest=$(rlocationpath %s)" % internal("zip-manifest"), + ] + ([ + "--build-file=$(rlocationpath %s)" % build_file_label, + ] if build_file_label else []) + ( + ["--destdir", "\"%s\"" % install_dest] if install_dest else [] + ) py_binary( name = name, srcs = [Label("//misc/bazel/internal:install.py")], main = Label("//misc/bazel/internal:install.py"), - data = [ - internal("script"), - internal("zip-manifest"), - Label("//misc/ripunzip"), - ] + ([build_file_label] if build_file_label else []), deps = ["@rules_python//python/runfiles"], - args = [ - "--pkg-install-script=$(rlocationpath %s)" % internal("script"), - "--ripunzip=$(rlocationpath %s)" % Label("//misc/ripunzip"), - "--zip-manifest=$(rlocationpath %s)" % internal("zip-manifest"), - ] + ([ - "--build-file=$(rlocationpath %s)" % build_file_label, - ] if build_file_label else []) + - (["--destdir", "\"%s\"" % install_dest] if install_dest else []), + data = data, + args = args, + ) + + # this hack is meant to be an optimization when using install for tests, where + # the install step is skipped if nothing changed. If the installation directory + # is somehow messed up, `bazel run` can be used to force install + native_test( + name = internal("as", "test"), + src = name, + tags = [ + "manual", # avoid having this picked up by `...`, `:all` or `:*` + "local", # make sure installation does not run sandboxed + ], + data = data, + args = args, + size = "small", ) def codeql_pack_group(name, srcs, visibility = None, skip_installer = False, prefix = "", install_dest = None, build_file_label = None, compression_level = 6): diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll b/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll index 76cd0a378229..787aaaeee8ca 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll @@ -55,7 +55,7 @@ string prettyNode(DataFlow::Node node) { * INTERNAL: Do not use. * * Gets the pretty-printed version of the DataFlow::Node `node`, that is suitable for use - * with `TestUtilities.InlineExpectationsTest` (that is, no spaces unless required). + * with `utils.test.InlineExpectationsTest` (that is, no spaces unless required). */ bindingset[node] string prettyNodeForInlineTest(DataFlow::Node node) { diff --git a/python/ql/test/TestUtilities/InlineExpectationsTest.qll b/python/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from python/ql/test/TestUtilities/InlineExpectationsTest.qll rename to python/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/python/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/python/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from python/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to python/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/python/ql/test/TestUtilities/VerifyApiGraphs.qll b/python/ql/lib/utils/test/VerifyApiGraphs.qll similarity index 100% rename from python/ql/test/TestUtilities/VerifyApiGraphs.qll rename to python/ql/lib/utils/test/VerifyApiGraphs.qll diff --git a/python/ql/test/TestUtilities/dataflow/DataflowQueryTest.qll b/python/ql/lib/utils/test/dataflow/DataflowQueryTest.qll similarity index 98% rename from python/ql/test/TestUtilities/dataflow/DataflowQueryTest.qll rename to python/ql/lib/utils/test/dataflow/DataflowQueryTest.qll index e9f13aaaa475..bc3969310b42 100644 --- a/python/ql/test/TestUtilities/dataflow/DataflowQueryTest.qll +++ b/python/ql/lib/utils/test/dataflow/DataflowQueryTest.qll @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode signature module QueryTestSig { diff --git a/python/ql/test/TestUtilities/dataflow/FlowTest.qll b/python/ql/lib/utils/test/dataflow/FlowTest.qll similarity index 96% rename from python/ql/test/TestUtilities/dataflow/FlowTest.qll rename to python/ql/lib/utils/test/dataflow/FlowTest.qll index f2068ebe7237..17bbe9e0cff4 100644 --- a/python/ql/test/TestUtilities/dataflow/FlowTest.qll +++ b/python/ql/lib/utils/test/dataflow/FlowTest.qll @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode signature module FlowTestSig { diff --git a/python/ql/test/TestUtilities/dataflow/LocalFlowStepTest.qll b/python/ql/lib/utils/test/dataflow/LocalFlowStepTest.qll similarity index 100% rename from python/ql/test/TestUtilities/dataflow/LocalFlowStepTest.qll rename to python/ql/lib/utils/test/dataflow/LocalFlowStepTest.qll diff --git a/python/ql/test/TestUtilities/dataflow/MaximalFlowTest.qll b/python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll similarity index 100% rename from python/ql/test/TestUtilities/dataflow/MaximalFlowTest.qll rename to python/ql/lib/utils/test/dataflow/MaximalFlowTest.qll diff --git a/python/ql/test/TestUtilities/dataflow/NormalDataflowTest.qll b/python/ql/lib/utils/test/dataflow/NormalDataflowTest.qll similarity index 93% rename from python/ql/test/TestUtilities/dataflow/NormalDataflowTest.qll rename to python/ql/lib/utils/test/dataflow/NormalDataflowTest.qll index b89738b100ed..696b43d5f038 100644 --- a/python/ql/test/TestUtilities/dataflow/NormalDataflowTest.qll +++ b/python/ql/lib/utils/test/dataflow/NormalDataflowTest.qll @@ -1,6 +1,6 @@ import python -import TestUtilities.dataflow.FlowTest -import TestUtilities.dataflow.testConfig +import utils.test.dataflow.FlowTest +import utils.test.dataflow.testConfig private import semmle.python.dataflow.new.internal.PrintNode module DataFlowTest implements FlowTestSig { diff --git a/python/ql/test/TestUtilities/dataflow/NormalTaintTrackingTest.qll b/python/ql/lib/utils/test/dataflow/NormalTaintTrackingTest.qll similarity index 93% rename from python/ql/test/TestUtilities/dataflow/NormalTaintTrackingTest.qll rename to python/ql/lib/utils/test/dataflow/NormalTaintTrackingTest.qll index e63e962df4d5..753f8f61e137 100644 --- a/python/ql/test/TestUtilities/dataflow/NormalTaintTrackingTest.qll +++ b/python/ql/lib/utils/test/dataflow/NormalTaintTrackingTest.qll @@ -1,6 +1,6 @@ import python -import TestUtilities.dataflow.FlowTest -import TestUtilities.dataflow.testTaintConfig +import utils.test.dataflow.FlowTest +import utils.test.dataflow.testTaintConfig private import semmle.python.dataflow.new.internal.PrintNode module DataFlowTest implements FlowTestSig { diff --git a/python/ql/test/TestUtilities/dataflow/RoutingTest.qll b/python/ql/lib/utils/test/dataflow/RoutingTest.qll similarity index 97% rename from python/ql/test/TestUtilities/dataflow/RoutingTest.qll rename to python/ql/lib/utils/test/dataflow/RoutingTest.qll index 6c2df0e43484..e7ac4e872470 100644 --- a/python/ql/test/TestUtilities/dataflow/RoutingTest.qll +++ b/python/ql/lib/utils/test/dataflow/RoutingTest.qll @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate diff --git a/python/ql/test/TestUtilities/dataflow/UnresolvedCalls.qll b/python/ql/lib/utils/test/dataflow/UnresolvedCalls.qll similarity index 96% rename from python/ql/test/TestUtilities/dataflow/UnresolvedCalls.qll rename to python/ql/lib/utils/test/dataflow/UnresolvedCalls.qll index 9b26d8c91758..a4dfb07ee90f 100644 --- a/python/ql/test/TestUtilities/dataflow/UnresolvedCalls.qll +++ b/python/ql/lib/utils/test/dataflow/UnresolvedCalls.qll @@ -2,7 +2,7 @@ import python private import semmle.python.dataflow.new.internal.PrintNode private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate private import semmle.python.ApiGraphs -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest signature module UnresolvedCallExpectationsSig { predicate unresolvedCall(CallNode call); diff --git a/python/ql/test/TestUtilities/dataflow/callGraphConfig.qll b/python/ql/lib/utils/test/dataflow/callGraphConfig.qll similarity index 100% rename from python/ql/test/TestUtilities/dataflow/callGraphConfig.qll rename to python/ql/lib/utils/test/dataflow/callGraphConfig.qll diff --git a/python/ql/test/TestUtilities/dataflow/testConfig.qll b/python/ql/lib/utils/test/dataflow/testConfig.qll similarity index 100% rename from python/ql/test/TestUtilities/dataflow/testConfig.qll rename to python/ql/lib/utils/test/dataflow/testConfig.qll diff --git a/python/ql/test/TestUtilities/dataflow/testTaintConfig.qll b/python/ql/lib/utils/test/dataflow/testTaintConfig.qll similarity index 100% rename from python/ql/test/TestUtilities/dataflow/testTaintConfig.qll rename to python/ql/lib/utils/test/dataflow/testTaintConfig.qll diff --git a/python/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/python/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from python/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to python/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/python/ql/test/experimental/import-resolution/importflow.ql b/python/ql/test/experimental/import-resolution/importflow.ql index 0398f1a7a699..a3e20123fc7c 100644 --- a/python/ql/test/experimental/import-resolution/importflow.ql +++ b/python/ql/test/experimental/import-resolution/importflow.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.ApiGraphs -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.dataflow.new.internal.ImportResolution /** A string that appears on the right hand side of an assignment. */ diff --git a/python/ql/test/experimental/import-resolution/imports.ql b/python/ql/test/experimental/import-resolution/imports.ql index 48a8a4116657..d2b436b560be 100644 --- a/python/ql/test/experimental/import-resolution/imports.ql +++ b/python/ql/test/experimental/import-resolution/imports.ql @@ -1,5 +1,5 @@ import python -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.internal.ImportResolution diff --git a/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql b/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql index 8c47bacfb883..1771727dbbca 100644 --- a/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql +++ b/python/ql/test/experimental/library-tests/CallGraph/InlineCallGraphTest.ql @@ -1,5 +1,5 @@ import python -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.DataFlowDispatch as TT /** Holds when `call` is resolved to `callable` using points-to based call-graph. */ diff --git a/python/ql/test/experimental/meta/ConceptsTest.qll b/python/ql/test/experimental/meta/ConceptsTest.qll index 40aa9c951b0d..658d11f7e856 100644 --- a/python/ql/test/experimental/meta/ConceptsTest.qll +++ b/python/ql/test/experimental/meta/ConceptsTest.qll @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.Concepts -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode private import codeql.threatmodels.ThreatModels diff --git a/python/ql/test/experimental/meta/InlineTaintTest.qll b/python/ql/test/experimental/meta/InlineTaintTest.qll index a09cc9aabc19..525775d5106c 100644 --- a/python/ql/test/experimental/meta/InlineTaintTest.qll +++ b/python/ql/test/experimental/meta/InlineTaintTest.qll @@ -13,7 +13,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode private import semmle.python.Concepts diff --git a/python/ql/test/experimental/meta/MaDTest.qll b/python/ql/test/experimental/meta/MaDTest.qll index 9b6bd59287a6..705785d796c7 100644 --- a/python/ql/test/experimental/meta/MaDTest.qll +++ b/python/ql/test/experimental/meta/MaDTest.qll @@ -5,7 +5,7 @@ private import semmle.python.frameworks.data.ModelsAsData // need to import Frameworks to get the actual modeling imported private import semmle.python.Frameworks // this import needs to be public to get the query predicates propagated to the actual test files -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module MadSinkTest implements TestSig { string getARelevantTag() { diff --git a/python/ql/test/experimental/meta/RemoteFlowSourceTest.qll b/python/ql/test/experimental/meta/RemoteFlowSourceTest.qll index 65015afe4dba..98697fa838c0 100644 --- a/python/ql/test/experimental/meta/RemoteFlowSourceTest.qll +++ b/python/ql/test/experimental/meta/RemoteFlowSourceTest.qll @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.RemoteFlowSources -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode module SourceTest implements TestSig { diff --git a/python/ql/test/experimental/meta/debug/dataflowTestPaths.ql b/python/ql/test/experimental/meta/debug/dataflowTestPaths.ql index 4c0ab8986868..963a6a1c1ac2 100644 --- a/python/ql/test/experimental/meta/debug/dataflowTestPaths.ql +++ b/python/ql/test/experimental/meta/debug/dataflowTestPaths.ql @@ -9,7 +9,7 @@ // 3. if necessary, look at partial paths by (un)commenting appropriate lines import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.dataflow.testConfig +import utils.test.dataflow.testConfig module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { TestConfig::isSource(source) } diff --git a/python/ql/test/experimental/query-tests/Security/CWE-022-UnsafeUnpacking/DataflowQueryTest.ql b/python/ql/test/experimental/query-tests/Security/CWE-022-UnsafeUnpacking/DataflowQueryTest.ql index 9cbf6dd6ad8a..7bb635891f56 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-022-UnsafeUnpacking/DataflowQueryTest.ql +++ b/python/ql/test/experimental/query-tests/Security/CWE-022-UnsafeUnpacking/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import experimental.Security.UnsafeUnpackQuery import FromTaintTrackingConfig diff --git a/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/ConceptsTest.ql b/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/ConceptsTest.ql index 939a81f73f70..d70552d1a8dd 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/ConceptsTest.ql +++ b/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/ConceptsTest.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowDispatch -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode import experimental.semmle.python.Concepts diff --git a/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/DataflowQueryTest.ql b/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/DataflowQueryTest.ql index 580c5fcc5f4c..b4bcc3a30ab1 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/DataflowQueryTest.ql +++ b/python/ql/test/experimental/query-tests/Security/CWE-074-RemoteCommandExecution/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import experimental.semmle.python.security.RemoteCommandExecution import FromTaintTrackingConfig diff --git a/python/ql/test/experimental/query-tests/Security/CWE-409/DataflowQueryTest.ql b/python/ql/test/experimental/query-tests/Security/CWE-409/DataflowQueryTest.ql index c1724c29d2cf..c28fbe94eec8 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-409/DataflowQueryTest.ql +++ b/python/ql/test/experimental/query-tests/Security/CWE-409/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import experimental.semmle.python.security.DecompressionBomb import FromTaintTrackingConfig diff --git a/python/ql/test/library-tests/ApiGraphs/py2/use.ql b/python/ql/test/library-tests/ApiGraphs/py2/use.ql index c89ad1c5196b..d689d2e27a8d 100644 --- a/python/ql/test/library-tests/ApiGraphs/py2/use.ql +++ b/python/ql/test/library-tests/ApiGraphs/py2/use.ql @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.ApiGraphs module ApiUseTest implements TestSig { diff --git a/python/ql/test/library-tests/ApiGraphs/py2/verifyApiGraphs.ql b/python/ql/test/library-tests/ApiGraphs/py2/verifyApiGraphs.ql index 520f507ca9f8..3d3df4a18b81 100644 --- a/python/ql/test/library-tests/ApiGraphs/py2/verifyApiGraphs.ql +++ b/python/ql/test/library-tests/ApiGraphs/py2/verifyApiGraphs.ql @@ -1 +1 @@ -import TestUtilities.VerifyApiGraphs +import utils.test.VerifyApiGraphs diff --git a/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql b/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql index e3308914a57a..882941fc9b4c 100644 --- a/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql +++ b/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql @@ -1,6 +1,6 @@ // Note: This is not using standard inline-expectation tests, so will not alert if you // have not manually added an annotation to a line! -import TestUtilities.VerifyApiGraphs +import utils.test.VerifyApiGraphs class CustomEntryPoint extends API::EntryPoint { CustomEntryPoint() { this = "CustomEntryPoint" } diff --git a/python/ql/test/library-tests/InlineExpectationsTest/missing-relevant-tag/Test.ql b/python/ql/test/library-tests/InlineExpectationsTest/missing-relevant-tag/Test.ql index e4694ffc10dd..d6253ab6af54 100644 --- a/python/ql/test/library-tests/InlineExpectationsTest/missing-relevant-tag/Test.ql +++ b/python/ql/test/library-tests/InlineExpectationsTest/missing-relevant-tag/Test.ql @@ -2,7 +2,7 @@ // right values for `getARelevantTag`. We want to alert on this, // so it gets fixed! import python -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module MissingRelevantTag implements TestSig { string getARelevantTag() { none() } diff --git a/python/ql/test/library-tests/dataflow/basic/callGraph.ql b/python/ql/test/library-tests/dataflow/basic/callGraph.ql index f0e28c33dc6a..16c859f89ece 100644 --- a/python/ql/test/library-tests/dataflow/basic/callGraph.ql +++ b/python/ql/test/library-tests/dataflow/basic/callGraph.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.callGraphConfig +import utils.test.dataflow.callGraphConfig from DataFlow::Node source, DataFlow::Node sink where diff --git a/python/ql/test/library-tests/dataflow/basic/callGraphSinks.ql b/python/ql/test/library-tests/dataflow/basic/callGraphSinks.ql index 472d6ccaa374..e7598e471e14 100644 --- a/python/ql/test/library-tests/dataflow/basic/callGraphSinks.ql +++ b/python/ql/test/library-tests/dataflow/basic/callGraphSinks.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.callGraphConfig +import utils.test.dataflow.callGraphConfig from DataFlow::Node sink where diff --git a/python/ql/test/library-tests/dataflow/basic/callGraphSources.ql b/python/ql/test/library-tests/dataflow/basic/callGraphSources.ql index 05b26caf3c07..a74bfa8afe1d 100644 --- a/python/ql/test/library-tests/dataflow/basic/callGraphSources.ql +++ b/python/ql/test/library-tests/dataflow/basic/callGraphSources.ql @@ -1,4 +1,4 @@ -import TestUtilities.dataflow.callGraphConfig +import utils.test.dataflow.callGraphConfig from DataFlow::Node source where diff --git a/python/ql/test/library-tests/dataflow/basic/localFlowStepTest.ql b/python/ql/test/library-tests/dataflow/basic/localFlowStepTest.ql index 881592eeaeb9..34c8894a974f 100644 --- a/python/ql/test/library-tests/dataflow/basic/localFlowStepTest.ql +++ b/python/ql/test/library-tests/dataflow/basic/localFlowStepTest.ql @@ -1 +1 @@ -import TestUtilities.dataflow.LocalFlowStepTest +import utils.test.dataflow.LocalFlowStepTest diff --git a/python/ql/test/library-tests/dataflow/basic/maximalFlowTest.ql b/python/ql/test/library-tests/dataflow/basic/maximalFlowTest.ql index 64867eb89da5..ba374bc5ad70 100644 --- a/python/ql/test/library-tests/dataflow/basic/maximalFlowTest.ql +++ b/python/ql/test/library-tests/dataflow/basic/maximalFlowTest.ql @@ -1 +1 @@ -import TestUtilities.dataflow.MaximalFlowTest +import utils.test.dataflow.MaximalFlowTest diff --git a/python/ql/test/library-tests/dataflow/calls/DataFlowCallTest.ql b/python/ql/test/library-tests/dataflow/calls/DataFlowCallTest.ql index c49511d9cdd1..eb29ace49b3d 100644 --- a/python/ql/test/library-tests/dataflow/calls/DataFlowCallTest.ql +++ b/python/ql/test/library-tests/dataflow/calls/DataFlowCallTest.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowDispatch -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode module DataFlowCallTest implements TestSig { diff --git a/python/ql/test/library-tests/dataflow/coverage/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/coverage/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/coverage/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/coverage/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/coverage/argumentRoutingTest.ql b/python/ql/test/library-tests/dataflow/coverage/argumentRoutingTest.ql index 02b503824d48..7851dc4dda80 100644 --- a/python/ql/test/library-tests/dataflow/coverage/argumentRoutingTest.ql +++ b/python/ql/test/library-tests/dataflow/coverage/argumentRoutingTest.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate -import TestUtilities.dataflow.RoutingTest +import utils.test.dataflow.RoutingTest module Argument1RoutingTest implements RoutingTestSig { class Argument = Unit; diff --git a/python/ql/test/library-tests/dataflow/exceptions/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/exceptions/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/exceptions/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/exceptions/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/fieldflow/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/fieldflow/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/fieldflow/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/fieldflow/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/fieldflow/UnresolvedCalls.ql b/python/ql/test/library-tests/dataflow/fieldflow/UnresolvedCalls.ql index 299339dacf80..57e8e7f880fd 100644 --- a/python/ql/test/library-tests/dataflow/fieldflow/UnresolvedCalls.ql +++ b/python/ql/test/library-tests/dataflow/fieldflow/UnresolvedCalls.ql @@ -1,5 +1,5 @@ import python -import TestUtilities.dataflow.UnresolvedCalls +import utils.test.dataflow.UnresolvedCalls private import semmle.python.dataflow.new.DataFlow module IgnoreDictMethod implements UnresolvedCallExpectationsSig { diff --git a/python/ql/test/library-tests/dataflow/global-flow/accesses.ql b/python/ql/test/library-tests/dataflow/global-flow/accesses.ql index 5d65758ec14a..e6721918e60d 100644 --- a/python/ql/test/library-tests/dataflow/global-flow/accesses.ql +++ b/python/ql/test/library-tests/dataflow/global-flow/accesses.ql @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module GlobalReadTest implements TestSig { string getARelevantTag() { result = "reads" } diff --git a/python/ql/test/library-tests/dataflow/match/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/match/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/match/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/match/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/module-initialization/localFlow.ql b/python/ql/test/library-tests/dataflow/module-initialization/localFlow.ql index 36aa6e007a75..e3ca2484e529 100644 --- a/python/ql/test/library-tests/dataflow/module-initialization/localFlow.ql +++ b/python/ql/test/library-tests/dataflow/module-initialization/localFlow.ql @@ -1,6 +1,6 @@ // This query should be more focused yet. import python -import TestUtilities.dataflow.FlowTest +import utils.test.dataflow.FlowTest private import semmle.python.dataflow.new.internal.PrintNode private import semmle.python.dataflow.new.internal.DataFlowPrivate as DP diff --git a/python/ql/test/library-tests/dataflow/path-graph/PathNodes.ql b/python/ql/test/library-tests/dataflow/path-graph/PathNodes.ql index 8100e999491c..67321c45c105 100644 --- a/python/ql/test/library-tests/dataflow/path-graph/PathNodes.ql +++ b/python/ql/test/library-tests/dataflow/path-graph/PathNodes.ql @@ -5,8 +5,8 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking -import TestUtilities.dataflow.testConfig -import TestUtilities.InlineExpectationsTest +import utils.test.dataflow.testConfig +import utils.test.InlineExpectationsTest module TestTaintFlow = TaintTracking::Global; diff --git a/python/ql/test/library-tests/dataflow/regression/dataflow.ql b/python/ql/test/library-tests/dataflow/regression/dataflow.ql index 27645d084b87..f5632dc99591 100644 --- a/python/ql/test/library-tests/dataflow/regression/dataflow.ql +++ b/python/ql/test/library-tests/dataflow/regression/dataflow.ql @@ -6,7 +6,7 @@ */ import python -import TestUtilities.dataflow.testConfig +import utils.test.dataflow.testConfig from DataFlow::Node source, DataFlow::Node sink where TestFlow::flow(source, sink) diff --git a/python/ql/test/library-tests/dataflow/sensitive-data/TestSensitiveDataSources.ql b/python/ql/test/library-tests/dataflow/sensitive-data/TestSensitiveDataSources.ql index 67c375366c5b..058cf1fcf4a3 100644 --- a/python/ql/test/library-tests/dataflow/sensitive-data/TestSensitiveDataSources.ql +++ b/python/ql/test/library-tests/dataflow/sensitive-data/TestSensitiveDataSources.ql @@ -4,7 +4,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.dataflow.new.SensitiveDataSources private import semmle.python.ApiGraphs diff --git a/python/ql/test/library-tests/dataflow/summaries/NormalTaintTrackingTest.ql b/python/ql/test/library-tests/dataflow/summaries/NormalTaintTrackingTest.ql index 59376d7a53c1..98528085b8bc 100644 --- a/python/ql/test/library-tests/dataflow/summaries/NormalTaintTrackingTest.ql +++ b/python/ql/test/library-tests/dataflow/summaries/NormalTaintTrackingTest.ql @@ -1,3 +1,3 @@ import python private import TestSummaries -import TestUtilities.dataflow.NormalTaintTrackingTest +import utils.test.dataflow.NormalTaintTrackingTest diff --git a/python/ql/test/library-tests/dataflow/summaries/summaries.ql b/python/ql/test/library-tests/dataflow/summaries/summaries.ql index 4b5e79d28869..fdb225aa8080 100644 --- a/python/ql/test/library-tests/dataflow/summaries/summaries.ql +++ b/python/ql/test/library-tests/dataflow/summaries/summaries.ql @@ -8,7 +8,7 @@ import TestFlow::PathGraph import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.internal.FlowSummaryImpl import semmle.python.ApiGraphs -import TestUtilities.dataflow.testTaintConfig +import utils.test.dataflow.testTaintConfig private import TestSummaries query predicate invalidSpecComponent(SummarizedCallable sc, string s, string c) { diff --git a/python/ql/test/library-tests/dataflow/tainttracking/generator-flow/NormalDataflowTest.ql b/python/ql/test/library-tests/dataflow/tainttracking/generator-flow/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/dataflow/tainttracking/generator-flow/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/dataflow/tainttracking/generator-flow/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/dataflow/typetracking-summaries/tracked.ql b/python/ql/test/library-tests/dataflow/typetracking-summaries/tracked.ql index b4b626ff97eb..c4ed2522092f 100644 --- a/python/ql/test/library-tests/dataflow/typetracking-summaries/tracked.ql +++ b/python/ql/test/library-tests/dataflow/typetracking-summaries/tracked.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TypeTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.ApiGraphs import TestSummaries diff --git a/python/ql/test/library-tests/dataflow/typetracking/tracked.ql b/python/ql/test/library-tests/dataflow/typetracking/tracked.ql index 8bad0e33ead8..e720fd3c451b 100644 --- a/python/ql/test/library-tests/dataflow/typetracking/tracked.ql +++ b/python/ql/test/library-tests/dataflow/typetracking/tracked.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TypeTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.ApiGraphs private import semmle.python.dataflow.new.internal.DataFlowPrivate as DP diff --git a/python/ql/test/library-tests/dataflow/variable-capture/CaptureTest.ql b/python/ql/test/library-tests/dataflow/variable-capture/CaptureTest.ql index f81101741517..1f07106fa676 100644 --- a/python/ql/test/library-tests/dataflow/variable-capture/CaptureTest.ql +++ b/python/ql/test/library-tests/dataflow/variable-capture/CaptureTest.ql @@ -1,7 +1,7 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest -import TestUtilities.dataflow.testConfig +import utils.test.InlineExpectationsTest +import utils.test.dataflow.testConfig module CaptureTest implements TestSig { string getARelevantTag() { result = "captured" } diff --git a/python/ql/test/library-tests/essa/ssa-compute/UseUse.ql b/python/ql/test/library-tests/essa/ssa-compute/UseUse.ql index 4635dda09f87..19152e49d30d 100644 --- a/python/ql/test/library-tests/essa/ssa-compute/UseUse.ql +++ b/python/ql/test/library-tests/essa/ssa-compute/UseUse.ql @@ -1,6 +1,6 @@ import python import semmle.python.essa.SsaCompute -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module UseTest implements TestSig { string getARelevantTag() { result in ["use-use", "def-use", "def"] } diff --git a/python/ql/test/library-tests/frameworks/django-orm/NormalDataflowTest.ql b/python/ql/test/library-tests/frameworks/django-orm/NormalDataflowTest.ql index f7e55d12ded6..1e0627bfcca1 100644 --- a/python/ql/test/library-tests/frameworks/django-orm/NormalDataflowTest.ql +++ b/python/ql/test/library-tests/frameworks/django-orm/NormalDataflowTest.ql @@ -1,2 +1,2 @@ import python -import TestUtilities.dataflow.NormalDataflowTest +import utils.test.dataflow.NormalDataflowTest diff --git a/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql b/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql index 499743869b0f..b0325b027c3a 100644 --- a/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql +++ b/python/ql/test/library-tests/frameworks/internal-ql-helpers/PoorMansFunctionResolutionTest.ql @@ -1,7 +1,7 @@ private import python private import semmle.python.dataflow.new.DataFlow private import semmle.python.frameworks.internal.PoorMansFunctionResolution -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module InlinePoorMansFunctionResolutionTest implements TestSig { string getARelevantTag() { result = "resolved" } diff --git a/python/ql/test/library-tests/regex/SubstructureTests.ql b/python/ql/test/library-tests/regex/SubstructureTests.ql index f575670e16a8..34167d899ab2 100644 --- a/python/ql/test/library-tests/regex/SubstructureTests.ql +++ b/python/ql/test/library-tests/regex/SubstructureTests.ql @@ -1,5 +1,5 @@ import python -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.regex module CharacterSetTest implements TestSig { diff --git a/python/ql/test/library-tests/regexparser/Locations.ql b/python/ql/test/library-tests/regexparser/Locations.ql index bef14918dc6d..75cef3f3c8ab 100644 --- a/python/ql/test/library-tests/regexparser/Locations.ql +++ b/python/ql/test/library-tests/regexparser/Locations.ql @@ -1,6 +1,6 @@ import python import semmle.python.regexp.RegexTreeView::RegexTreeView -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private import semmle.python.dataflow.new.internal.PrintNode module RegexLocationTest implements TestSig { diff --git a/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.ql b/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.ql index eaf935d573be..2371d8c00080 100644 --- a/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.ql +++ b/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.ql @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.functions.ModificationOfParameterWithDefault private import semmle.python.dataflow.new.internal.PrintNode diff --git a/python/ql/test/query-tests/Numerics/Pythagorean.qlref b/python/ql/test/query-tests/Numerics/Pythagorean.qlref index 541bd35ac626..ed76bdfeb7b6 100644 --- a/python/ql/test/query-tests/Numerics/Pythagorean.qlref +++ b/python/ql/test/query-tests/Numerics/Pythagorean.qlref @@ -1,2 +1,2 @@ query: Numerics/Pythagorean.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/python/ql/test/query-tests/Security/CWE-022-PathInjection/DataflowQueryTest.ql b/python/ql/test/query-tests/Security/CWE-022-PathInjection/DataflowQueryTest.ql index a0cdc79b17d7..e4720596a37c 100644 --- a/python/ql/test/query-tests/Security/CWE-022-PathInjection/DataflowQueryTest.ql +++ b/python/ql/test/query-tests/Security/CWE-022-PathInjection/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import semmle.python.security.dataflow.PathInjectionQuery import FromTaintTrackingStateConfig diff --git a/python/ql/test/query-tests/Security/CWE-078-CommandInjection/DataflowQueryTest.ql b/python/ql/test/query-tests/Security/CWE-078-CommandInjection/DataflowQueryTest.ql index 26350c3db65b..dd521acc77d2 100644 --- a/python/ql/test/query-tests/Security/CWE-078-CommandInjection/DataflowQueryTest.ql +++ b/python/ql/test/query-tests/Security/CWE-078-CommandInjection/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import semmle.python.security.dataflow.CommandInjectionQuery import FromTaintTrackingConfig diff --git a/python/ql/test/query-tests/Security/CWE-078-UnsafeShellCommandConstruction/DataflowQueryTest.ql b/python/ql/test/query-tests/Security/CWE-078-UnsafeShellCommandConstruction/DataflowQueryTest.ql index 521527e7e4f0..51255358ec71 100644 --- a/python/ql/test/query-tests/Security/CWE-078-UnsafeShellCommandConstruction/DataflowQueryTest.ql +++ b/python/ql/test/query-tests/Security/CWE-078-UnsafeShellCommandConstruction/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import semmle.python.security.dataflow.UnsafeShellCommandConstructionQuery import FromTaintTrackingConfig diff --git a/python/ql/test/query-tests/Security/CWE-094-CodeInjection/CodeInjection.qlref b/python/ql/test/query-tests/Security/CWE-094-CodeInjection/CodeInjection.qlref index 0135c6787d4b..bfeec8aec393 100644 --- a/python/ql/test/query-tests/Security/CWE-094-CodeInjection/CodeInjection.qlref +++ b/python/ql/test/query-tests/Security/CWE-094-CodeInjection/CodeInjection.qlref @@ -1,2 +1,2 @@ query: Security/CWE-094/CodeInjection.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/python/ql/test/query-tests/Security/CWE-209-StackTraceExposure/ExceptionInfo.ql b/python/ql/test/query-tests/Security/CWE-209-StackTraceExposure/ExceptionInfo.ql index eb8375593867..1a0e4052103e 100644 --- a/python/ql/test/query-tests/Security/CWE-209-StackTraceExposure/ExceptionInfo.ql +++ b/python/ql/test/query-tests/Security/CWE-209-StackTraceExposure/ExceptionInfo.ql @@ -1,6 +1,6 @@ import python import semmle.python.dataflow.new.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import semmle.python.security.dataflow.ExceptionInfo module ExceptionInfoTest implements TestSig { diff --git a/python/ql/test/query-tests/Security/CWE-943-NoSqlInjection/DataflowQueryTest.ql b/python/ql/test/query-tests/Security/CWE-943-NoSqlInjection/DataflowQueryTest.ql index 5123e883d9cf..d67ff632ce3a 100644 --- a/python/ql/test/query-tests/Security/CWE-943-NoSqlInjection/DataflowQueryTest.ql +++ b/python/ql/test/query-tests/Security/CWE-943-NoSqlInjection/DataflowQueryTest.ql @@ -1,4 +1,4 @@ import python -import TestUtilities.dataflow.DataflowQueryTest +import utils.test.dataflow.DataflowQueryTest import semmle.python.security.dataflow.NoSqlInjectionQuery import FromTaintTrackingStateConfig diff --git a/ql/ql/test/TestUtilities/InlineExpectationsTest.qll b/ql/ql/src/utils/test/InlineExpectationsTest.qll similarity index 100% rename from ql/ql/test/TestUtilities/InlineExpectationsTest.qll rename to ql/ql/src/utils/test/InlineExpectationsTest.qll diff --git a/ql/ql/test/dataflow/getAStringValue/getAStringValue.ql b/ql/ql/test/dataflow/getAStringValue/getAStringValue.ql index fbd8bf0477f7..43f4c3639ba6 100644 --- a/ql/ql/test/dataflow/getAStringValue/getAStringValue.ql +++ b/ql/ql/test/dataflow/getAStringValue/getAStringValue.ql @@ -1,6 +1,6 @@ import ql import codeql_ql.dataflow.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module GetAStringValueTest implements TestSig { string getARelevantTag() { result = "getAStringValue" } diff --git a/ruby/ql/test/TestUtilities/InlineExpectationsTest.qll b/ruby/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from ruby/ql/test/TestUtilities/InlineExpectationsTest.qll rename to ruby/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/ruby/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/ruby/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from ruby/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to ruby/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/ruby/ql/test/TestUtilities/InlineFlowTest.qll b/ruby/ql/lib/utils/test/InlineFlowTest.qll similarity index 95% rename from ruby/ql/test/TestUtilities/InlineFlowTest.qll rename to ruby/ql/lib/utils/test/InlineFlowTest.qll index 1446d37d67d4..2444b04fb13e 100644 --- a/ruby/ql/test/TestUtilities/InlineFlowTest.qll +++ b/ruby/ql/lib/utils/test/InlineFlowTest.qll @@ -12,7 +12,7 @@ private import codeql.ruby.frameworks.data.internal.ApiGraphModelsExtensions as private import internal.InlineExpectationsTestImpl private module FlowTestImpl implements InputSig { - import TestUtilities.InlineFlowTestUtil + import utils.test.InlineFlowTestUtil bindingset[src, sink] string getArgString(DataFlow::Node src, DataFlow::Node sink) { diff --git a/ruby/ql/test/TestUtilities/InlineFlowTestUtil.qll b/ruby/ql/lib/utils/test/InlineFlowTestUtil.qll similarity index 100% rename from ruby/ql/test/TestUtilities/InlineFlowTestUtil.qll rename to ruby/ql/lib/utils/test/InlineFlowTestUtil.qll diff --git a/ruby/ql/test/TestUtilities/InlineTypeTrackingFlowTest.qll b/ruby/ql/lib/utils/test/InlineTypeTrackingFlowTest.qll similarity index 91% rename from ruby/ql/test/TestUtilities/InlineTypeTrackingFlowTest.qll rename to ruby/ql/lib/utils/test/InlineTypeTrackingFlowTest.qll index fdbd40968de6..9d37ef804810 100644 --- a/ruby/ql/test/TestUtilities/InlineTypeTrackingFlowTest.qll +++ b/ruby/ql/lib/utils/test/InlineTypeTrackingFlowTest.qll @@ -1,6 +1,6 @@ import ruby -import TestUtilities.InlineExpectationsTest -import TestUtilities.InlineFlowTestUtil +import utils.test.InlineExpectationsTest +import utils.test.InlineFlowTestUtil private import codeql.ruby.typetracking.TypeTracking private DataFlow::LocalSourceNode track(TypeTracker t, DataFlow::CallNode source) { diff --git a/ruby/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/ruby/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from ruby/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to ruby/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/ruby/ql/test/library-tests/concepts/CryptographicOperation.ql b/ruby/ql/test/library-tests/concepts/CryptographicOperation.ql index 602ee166fcee..18505a8ea3ab 100644 --- a/ruby/ql/test/library-tests/concepts/CryptographicOperation.ql +++ b/ruby/ql/test/library-tests/concepts/CryptographicOperation.ql @@ -1,6 +1,6 @@ import codeql.ruby.AST import codeql.ruby.Concepts -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module CryptographicOperationTest implements TestSig { string getARelevantTag() { diff --git a/ruby/ql/test/library-tests/dataflow/api-graphs/VerifyApiGraphExpectations.ql b/ruby/ql/test/library-tests/dataflow/api-graphs/VerifyApiGraphExpectations.ql index 1fd815c260b7..555b45ecbf8f 100644 --- a/ruby/ql/test/library-tests/dataflow/api-graphs/VerifyApiGraphExpectations.ql +++ b/ruby/ql/test/library-tests/dataflow/api-graphs/VerifyApiGraphExpectations.ql @@ -3,7 +3,7 @@ import codeql.dataflow.internal.AccessPathSyntax import codeql.ruby.ast.internal.TreeSitter import codeql.ruby.frameworks.data.internal.ApiGraphModels as ApiGraphModels import codeql.ruby.ApiGraphs -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private predicate accessPathRange(string s) { hasExpectationWithValue(_, s) } diff --git a/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.ql b/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.ql index 756833e8b35d..755b87ffceda 100644 --- a/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.CFG -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/array-flow/type-tracking-array-flow.ql b/ruby/ql/test/library-tests/dataflow/array-flow/type-tracking-array-flow.ql index 81c306b7b007..dce9f8922244 100644 --- a/ruby/ql/test/library-tests/dataflow/array-flow/type-tracking-array-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/array-flow/type-tracking-array-flow.ql @@ -3,4 +3,4 @@ // only that type-tracking cannot follow the flow in your test. If the dataflow // test (`array-flow.ql`) shows no failures, then that may be sufficient // (depending on your use case). -import TestUtilities.InlineTypeTrackingFlowTest +import utils.test.InlineTypeTrackingFlowTest diff --git a/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql b/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql index 55bc8c9e529f..e485d98d361d 100644 --- a/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-flow.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.CFG -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import codeql.ruby.dataflow.BarrierGuards import PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.ql b/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.ql index 4bcb358acfdd..ee9b9df140c9 100644 --- a/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.ql +++ b/ruby/ql/test/library-tests/dataflow/barrier-guards/barrier-guards.ql @@ -5,7 +5,7 @@ import codeql.ruby.controlflow.CfgNodes import codeql.ruby.controlflow.ControlFlowGraph import codeql.ruby.controlflow.BasicBlocks import codeql.ruby.DataFlow -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest query predicate newStyleBarrierGuards(DataFlow::Node n) { n instanceof StringConstCompareBarrier or diff --git a/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.ql b/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.ql index 62498bda1794..998bd78430c0 100644 --- a/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.ql +++ b/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.DataFlow -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph import codeql.ruby.dataflow.internal.DataFlowDispatch as DataFlowDispatch diff --git a/ruby/ql/test/library-tests/dataflow/erb/erb.ql b/ruby/ql/test/library-tests/dataflow/erb/erb.ql index a3d91150945b..1ea08645b886 100644 --- a/ruby/ql/test/library-tests/dataflow/erb/erb.ql +++ b/ruby/ql/test/library-tests/dataflow/erb/erb.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.CFG -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import ValueFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.ql b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.ql index 455ed9705389..07a804beba57 100644 --- a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.ql +++ b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.ql @@ -4,7 +4,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import PathGraph private import codeql.ruby.dataflow.FlowSummary diff --git a/ruby/ql/test/library-tests/dataflow/global/Flow.ql b/ruby/ql/test/library-tests/dataflow/global/Flow.ql index 51f0816cbba5..e0683efb39bf 100644 --- a/ruby/ql/test/library-tests/dataflow/global/Flow.ql +++ b/ruby/ql/test/library-tests/dataflow/global/Flow.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.DataFlow -private import TestUtilities.InlineFlowTest +private import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/global/TypeTrackingInlineTest.ql b/ruby/ql/test/library-tests/dataflow/global/TypeTrackingInlineTest.ql index 97df46829d99..ca5f717c578f 100644 --- a/ruby/ql/test/library-tests/dataflow/global/TypeTrackingInlineTest.ql +++ b/ruby/ql/test/library-tests/dataflow/global/TypeTrackingInlineTest.ql @@ -1 +1 @@ -import TestUtilities.InlineTypeTrackingFlowTest +import utils.test.InlineTypeTrackingFlowTest diff --git a/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.ql b/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.ql index 5ec8ec0a0d66..f810e6ccc163 100644 --- a/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.ql @@ -4,7 +4,7 @@ import codeql.ruby.AST import codeql.ruby.CFG -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/hash-flow/type-tracking-hash-flow.ql b/ruby/ql/test/library-tests/dataflow/hash-flow/type-tracking-hash-flow.ql index edcee16d6a58..3b16ee5ff4ea 100644 --- a/ruby/ql/test/library-tests/dataflow/hash-flow/type-tracking-hash-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/hash-flow/type-tracking-hash-flow.ql @@ -3,4 +3,4 @@ // only that type-tracking cannot follow the flow in your test. If the dataflow // test (`hash-flow.ql`) shows no failures, then that may be sufficient // (depending on your use case). -import TestUtilities.InlineTypeTrackingFlowTest +import utils.test.InlineTypeTrackingFlowTest diff --git a/ruby/ql/test/library-tests/dataflow/local/InlineFlowTest.ql b/ruby/ql/test/library-tests/dataflow/local/InlineFlowTest.ql index e30fe4c131b9..d9640ffd8ffd 100644 --- a/ruby/ql/test/library-tests/dataflow/local/InlineFlowTest.ql +++ b/ruby/ql/test/library-tests/dataflow/local/InlineFlowTest.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/params/params-flow.ql b/ruby/ql/test/library-tests/dataflow/params/params-flow.ql index 6f8978fe8194..88a79ab82619 100644 --- a/ruby/ql/test/library-tests/dataflow/params/params-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/params/params-flow.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import ValueFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/pathname-flow/pathame-flow.ql b/ruby/ql/test/library-tests/dataflow/pathname-flow/pathame-flow.ql index e02827eaf8d0..fae4b68cda0e 100644 --- a/ruby/ql/test/library-tests/dataflow/pathname-flow/pathame-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/pathname-flow/pathame-flow.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/ssa-flow/ssa-flow.ql b/ruby/ql/test/library-tests/dataflow/ssa-flow/ssa-flow.ql index e02827eaf8d0..fae4b68cda0e 100644 --- a/ruby/ql/test/library-tests/dataflow/ssa-flow/ssa-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/ssa-flow/ssa-flow.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/string-flow/string-flow.ql b/ruby/ql/test/library-tests/dataflow/string-flow/string-flow.ql index e02827eaf8d0..fae4b68cda0e 100644 --- a/ruby/ql/test/library-tests/dataflow/string-flow/string-flow.ql +++ b/ruby/ql/test/library-tests/dataflow/string-flow/string-flow.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.ql b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.ql index 7542228ce5f9..7b370496f0a6 100644 --- a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.ql +++ b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.ql @@ -8,7 +8,7 @@ import codeql.ruby.dataflow.FlowSummary import codeql.ruby.TaintTracking import codeql.ruby.dataflow.internal.FlowSummaryImpl import codeql.ruby.frameworks.data.ModelsAsData -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import PathGraph query predicate invalidSpecComponent(SummarizedCallable sc, string s, string c) { diff --git a/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.ql b/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.ql index d6e9c9e6f538..4bbbcebcab25 100644 --- a/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.ql +++ b/ruby/ql/test/library-tests/frameworks/action_controller/params-flow.ql @@ -3,7 +3,7 @@ */ import ruby -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlow::PathGraph import codeql.ruby.frameworks.Rails diff --git a/ruby/ql/test/library-tests/frameworks/action_mailer/params-flow.ql b/ruby/ql/test/library-tests/frameworks/action_mailer/params-flow.ql index d6e9c9e6f538..4bbbcebcab25 100644 --- a/ruby/ql/test/library-tests/frameworks/action_mailer/params-flow.ql +++ b/ruby/ql/test/library-tests/frameworks/action_mailer/params-flow.ql @@ -3,7 +3,7 @@ */ import ruby -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import TaintFlow::PathGraph import codeql.ruby.frameworks.Rails diff --git a/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.ql b/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.ql index 5cb6cd3208fa..a22d5179d8be 100644 --- a/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.ql +++ b/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.ql @@ -3,7 +3,7 @@ */ import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import codeql.ruby.Frameworks import DefaultFlowTest import ValueFlow::PathGraph diff --git a/ruby/ql/test/library-tests/frameworks/arel/Arel.ql b/ruby/ql/test/library-tests/frameworks/arel/Arel.ql index f992ef694e82..090abd60c72b 100644 --- a/ruby/ql/test/library-tests/frameworks/arel/Arel.ql +++ b/ruby/ql/test/library-tests/frameworks/arel/Arel.ql @@ -4,7 +4,7 @@ import codeql.ruby.frameworks.Arel import codeql.ruby.AST -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/ruby/ql/test/library-tests/frameworks/json/JsonDataFlow.ql b/ruby/ql/test/library-tests/frameworks/json/JsonDataFlow.ql index 6fe0aeda9b1b..1281d8bc2886 100644 --- a/ruby/ql/test/library-tests/frameworks/json/JsonDataFlow.ql +++ b/ruby/ql/test/library-tests/frameworks/json/JsonDataFlow.ql @@ -2,7 +2,7 @@ * @kind path-problem */ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import codeql.ruby.Frameworks import DefaultFlowTest import PathGraph diff --git a/ruby/ql/test/library-tests/frameworks/sinatra/Flow.ql b/ruby/ql/test/library-tests/frameworks/sinatra/Flow.ql index d1e708c214b1..7ddf98f6d162 100644 --- a/ruby/ql/test/library-tests/frameworks/sinatra/Flow.ql +++ b/ruby/ql/test/library-tests/frameworks/sinatra/Flow.ql @@ -3,7 +3,7 @@ */ import ruby -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import PathGraph import codeql.ruby.frameworks.Sinatra import codeql.ruby.Concepts diff --git a/ruby/ql/test/query-tests/experimental/improper-memoization/ImproperMemoization.ql b/ruby/ql/test/query-tests/experimental/improper-memoization/ImproperMemoization.ql index d1056f7cd12d..745fae3c1614 100644 --- a/ruby/ql/test/query-tests/experimental/improper-memoization/ImproperMemoization.ql +++ b/ruby/ql/test/query-tests/experimental/improper-memoization/ImproperMemoization.ql @@ -1,5 +1,5 @@ import codeql.ruby.AST -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import codeql.ruby.security.ImproperMemoizationQuery module ImproperMemoizationTest implements TestSig { diff --git a/ruby/ql/test/query-tests/security/cwe-022/PathInjection.qlref b/ruby/ql/test/query-tests/security/cwe-022/PathInjection.qlref index 07015c904352..bb8df5f2c6fd 100644 --- a/ruby/ql/test/query-tests/security/cwe-022/PathInjection.qlref +++ b/ruby/ql/test/query-tests/security/cwe-022/PathInjection.qlref @@ -1,2 +1,2 @@ query: queries/security/cwe-022/PathInjection.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/ruby/ql/test/query-tests/security/cwe-116/IncompleteMultiCharacterSanitization/IncompleteMultiCharacterSanitization.ql b/ruby/ql/test/query-tests/security/cwe-116/IncompleteMultiCharacterSanitization/IncompleteMultiCharacterSanitization.ql index b9b447f00ee7..aa55bfcc7d9d 100644 --- a/ruby/ql/test/query-tests/security/cwe-116/IncompleteMultiCharacterSanitization/IncompleteMultiCharacterSanitization.ql +++ b/ruby/ql/test/query-tests/security/cwe-116/IncompleteMultiCharacterSanitization/IncompleteMultiCharacterSanitization.ql @@ -6,7 +6,7 @@ import codeql.ruby.AST import codeql.ruby.regexp.RegExpTreeView as RETV import codeql.ruby.DataFlow import codeql.ruby.security.IncompleteMultiCharacterSanitizationQuery as Query -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module Test implements TestSig { string getARelevantTag() { result = "hasResult" } diff --git a/ruby/ql/test/query-tests/security/cwe-300/InsecureDependency.ql b/ruby/ql/test/query-tests/security/cwe-300/InsecureDependency.ql index 75bf5dce16d0..56cc02170bd3 100644 --- a/ruby/ql/test/query-tests/security/cwe-300/InsecureDependency.ql +++ b/ruby/ql/test/query-tests/security/cwe-300/InsecureDependency.ql @@ -1,5 +1,5 @@ import codeql.ruby.AST -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import codeql.ruby.security.InsecureDependencyQuery module InsecureDependencyTest implements TestSig { diff --git a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql index 4e1550bd9526..a8480b23a2df 100644 --- a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql +++ b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql @@ -1,7 +1,7 @@ import codeql.ruby.security.InsecureDownloadQuery import InsecureDownloadFlow::PathGraph -import TestUtilities.InlineExpectationsTest -import TestUtilities.InlineFlowTestUtil +import utils.test.InlineExpectationsTest +import utils.test.InlineFlowTestUtil module FlowTest implements TestSig { string getARelevantTag() { result = "BAD" } diff --git a/rust/ast-generator/src/main.rs b/rust/ast-generator/src/main.rs index 3fe918a4c3eb..c586342856f6 100644 --- a/rust/ast-generator/src/main.rs +++ b/rust/ast-generator/src/main.rs @@ -35,6 +35,7 @@ fn property_name(type_name: &str, field_name: &str) -> String { (_, "then_branch") => "then", (_, "else_branch") => "else_", ("ArrayType", "ty") => "element_type_repr", + ("SelfParam", "is_amp") => "is_ref", (_, "ty") => "type_repr", _ => field_name, }; @@ -363,6 +364,13 @@ fn get_fields(node: &AstNodeSrc) -> Vec { is_many: false, }); } + "SelfParam" => { + result.push(FieldInfo { + name: "is_amp".to_string(), + tp: "predicate".to_string(), + is_many: false, + }); + } _ => {} } diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index cbc2dd7c6573..d298aadd79fb 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 -top.rs d09cf25daa06fc9bc802e438231e0f038443d2ede3972a0dd829f322b390c4e4 d09cf25daa06fc9bc802e438231e0f038443d2ede3972a0dd829f322b390c4e4 +top.rs d6c934b738b7f071df86303f6deb2a2d18bfc7545cd487446823e97702240582 d6c934b738b7f071df86303f6deb2a2d18bfc7545cd487446823e97702240582 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index ee61282295da..b7b00a606082 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -6911,6 +6911,7 @@ pub struct SelfParam { pub id: trap::TrapId, pub attrs: Vec>, pub type_repr: Option>, + pub is_ref: bool, pub is_mut: bool, pub lifetime: Option>, pub name: Option>, @@ -6929,6 +6930,9 @@ impl trap::TrapEntry for SelfParam { if let Some(v) = self.type_repr { out.add_tuple("param_base_type_reprs", vec![id.into(), v.into()]); } + if self.is_ref { + out.add_tuple("self_param_is_ref", vec![id.into()]); + } if self.is_mut { out.add_tuple("self_param_is_mut", vec![id.into()]); } diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs index a87f2d74caf4..a1c4865cf621 100644 --- a/rust/extractor/src/translate/generated.rs +++ b/rust/extractor/src/translate/generated.rs @@ -1812,6 +1812,7 @@ impl Translator<'_> { pub(crate) fn emit_self_param(&mut self, node: ast::SelfParam) -> Label { let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + let is_ref = node.amp_token().is_some(); let is_mut = node.mut_token().is_some(); let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); let name = node.name().map(|x| self.emit_name(x)); @@ -1819,6 +1820,7 @@ impl Translator<'_> { let label = self.trap.emit(generated::SelfParam { id: TrapId::Star, attrs, + is_ref, is_mut, lifetime, name, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 264205ee9145..41a3264fae4f 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,4 @@ -lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 12a240e8392e4b0ad9ddb8067b25a1b5e4c1151886d9d64292a7a9ff29d11d97 fdbe7ca4f085d04371280299fd10a604ee5a059294d2c4c836f334d2b5f8926d +lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 9e80eb4315a41fe2ce8649701f6306435861a048687d35de043c5a9feba195c2 8d4b43beaed489befb3ecbc2f0d52085fd157a67e3baeba78f6d312b51288b9c lib/codeql/rust/elements/Abi.qll 4c973d28b6d628f5959d1f1cc793704572fd0acaae9a97dfce82ff9d73f73476 250f68350180af080f904cd34cb2af481c5c688dc93edf7365fd0ae99855e893 lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be lib/codeql/rust/elements/ArgList.qll 661f5100f5d3ef8351452d9058b663a2a5c720eea8cf11bedd628969741486a2 28e424aac01a90fb58cd6f9f83c7e4cf379eea39e636bc0ba07efc818be71c71 @@ -131,7 +131,7 @@ lib/codeql/rust/elements/RestPat.qll a898a2c396f974a52424efbc8168174416ac6ed30f9 lib/codeql/rust/elements/RetTypeRepr.qll a95a053e861a8d6e5e8eda531f29c611b00904d48ea2bb493138d94d39096ace ebde4f865d310351ba6ee71852428819627ea3909e341d6800ab268b1810c6fa lib/codeql/rust/elements/ReturnExpr.qll b87187cff55bc33c8c18558c9b88617179183d1341b322c1cab35ba07167bbdb 892f3a9df2187e745c869e67f33c228ee42754bc9e4f8f4c1718472eb8f8c80f lib/codeql/rust/elements/ReturnTypeSyntax.qll 0aa9125f5ea8864ecf1e4ff6e85f060f1b11fdd603448816145fea1b290f0232 3911819548ad1cf493199aac2ed15652c8e48b532a1e92153388b062191c1e6e -lib/codeql/rust/elements/SelfParam.qll 7d720c99097a340bc7bf6cc27ac6fe291a04af53e9bac23bf070b04b36e6e033 736488794a46ea702dcd3f603134052598207f3953acce3c9237bd6c6a038b23 +lib/codeql/rust/elements/SelfParam.qll e36b54cdc57529935910b321c336783e9e2662c762f3cd6af492d819373ff188 7a4735dbf532fc0c33ebdb0b5c1dfc4e5267e79ceff4ca8977065eb0ce54aaf5 lib/codeql/rust/elements/SlicePat.qll f48f13bb13378cc68f935d5b09175c316f3e81f50ef6a3ac5fdbfbfb473d6fc1 4c8df0b092274f37028e287a949f1a287f7505b7c2c36ee8d5f47fb8365d278a lib/codeql/rust/elements/SliceTypeRepr.qll 4f3fcb2b457ba95c76a1ff786e6fc217ad1a5f570dac68ec5da4b9a37c963186 b3f524d744d3fcef85a2e1e175b99a8e3acab36b2a717f107272ed92a48940c0 lib/codeql/rust/elements/SourceFile.qll 5916d550385d618bd3b3d4835fbd3040485822220af8ce52ee1adb649b3d8594 0b79766216649e948fa59de467d64fa752de4666c28e0e503e88740ae27a2aef @@ -347,7 +347,7 @@ lib/codeql/rust/elements/internal/ReturnExprConstructor.qll 57be5afbe20aa8db6e63 lib/codeql/rust/elements/internal/ReturnTypeSyntaxConstructor.qll 8994672e504d1674e5773157d0ad8a0dc3aad3d64ef295e7722e647e78e36c11 abe7df754721f4ff7f3e3bb22d275976b2e9a1ef51436a461fe52ebd2d29cff1 lib/codeql/rust/elements/internal/ReturnTypeSyntaxImpl.qll d47a3dcfcc2b02a6a9eaeefe9a7a4be2074ecd2019da129dda0f218bc3fbd94b 87198db7c0620ed49369da160f09287015e0cd1718784e1ba28ec3ec5a0bb4a8 lib/codeql/rust/elements/internal/SelfParamConstructor.qll a63af1d1ccde6013c09e0397f1247f5ab3efd97f3410dd1b6c15e1fb6cd96e54 0d8977653c074d5010c78144327f8b6c4da07f09d21e5cc3342082cd50107a81 -lib/codeql/rust/elements/internal/SelfParamImpl.qll def23beb8926f498fc81b7b44489001b35d704da1a2058c84c23b329e8bc2f49 c9be1e8fa2c4e23b314a4d0563be6cffcbab6f03d08b77a366f7638b28a09de4 +lib/codeql/rust/elements/internal/SelfParamImpl.qll 4112ffa718b95b3917ac3dfb45f4f4df56c1ee9cbbc61b91ec16628be57001c5 23f49c040a785ff5c9b09891d09007e9878fa78be086a68621d1f4d59d2e5d86 lib/codeql/rust/elements/internal/SlicePatConstructor.qll 19216ec9e87ca98784d78b29b8b06ea9ac428e2faa468f0717d1c0d0a8e7351c 458e5be76aa51aec579566be39486525ec9d4c73d248cb228da74892e2a56c08 lib/codeql/rust/elements/internal/SlicePatImpl.qll c6176095360e3b23382557242d2d3ff0b5e0f01f8b1c438452518e9c36ff3c70 644ab41a59a619947f69f75e2d0807245d4ddefc247efaeab63b99b4f08c1cc1 lib/codeql/rust/elements/internal/SliceTypeReprConstructor.qll 4576f203450767bfd142b1d6797b6482bb78f7700b6b410475b182d5067504ae 2b5aeaf91d5ea10e2370fa88b86bce7d0691d6d00f18ab8e1a1be917bb1619bb @@ -521,7 +521,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll c808c9d84dd7800573832b lib/codeql/rust/elements/internal/generated/ParenExpr.qll bc0731505bfe88516205ec360582a4222d2681d11342c93e15258590ddee82f2 d4bd6e0c80cf1d63746c88d4bcb3a01d4c75732e5da09e3ebd9437ced227fb60 lib/codeql/rust/elements/internal/generated/ParenPat.qll 4f168ef5d5bb87a903251cc31b2e44a759b099ec69c90af31783fbb15778c940 0e34f94a45a13396fd57d94c245dc64d1adde2ab0e22b56946f7e94c04e297fc lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 40ab5c592e7699c621787793743e33988de71ff42ca27599f5ab3ddb70e3f7d8 12c0a6eed2202ee3e892f61da3b3ce77ac3190854cdf3097e8d2be98aa3cb91d -lib/codeql/rust/elements/internal/generated/ParentChild.qll 876e28befd6a93666832de01342c6df403efb5cbea36d3c4b5d5cc2f34c54d6c 3448847608c25b100328bd68f70730a7e43b7d8b5ef8ab1ce40ae3f5a57c6bd2 +lib/codeql/rust/elements/internal/generated/ParentChild.qll 9064e1cbc32dd6f830ea9d96f7408ee864c79404cadda1f278c3782eeca7bd7f 3448847608c25b100328bd68f70730a7e43b7d8b5ef8ab1ce40ae3f5a57c6bd2 lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll bf6a86e7fcb7164624cc070dcce86d2bda50a2516b95115b87d0ebb5596e50a1 fd7a9ad4034cdebe8dfe495619c46f464630d38195313072e0bd904061b0fb00 lib/codeql/rust/elements/internal/generated/PathAstNode.qll e6d4d5bffd3c623baaaee46bc183eb31ce88795535f164f6a9b9b4d98bbd6101 168db515404933479ba6b150c72e012d28592cbc32366aefcb1bf9599dbcd183 @@ -535,7 +535,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 51d1e9e683fc79dddbff lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9 -lib/codeql/rust/elements/internal/generated/Raw.qll b295dd46979a2d4df840e1bef4ba12e3b4ff58aa886c8a1320281739d36c5a4f 2369cba6d70f0e853acb0e018dfb47e604ee01dca48af7094b484a7e18a46365 +lib/codeql/rust/elements/internal/generated/Raw.qll 71ebb4246cd4b34ef28e216ea3a2d494b3514ec011aa4106105f83accf781d98 4a58d85b93e6547565acea761221d7c69ef34fdb69ec8d7912d6e50569f5f48e lib/codeql/rust/elements/internal/generated/RecordExpr.qll 2131b2cb336caa76170082e69776011bf02576bbfdd34ba68ca84af24209250a 39a2e3ec32352b594c43cc1295e0e8b3f9808173322d3d73cb7d48ef969d5565 lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1 lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0 @@ -553,7 +553,7 @@ lib/codeql/rust/elements/internal/generated/RestPat.qll 234bbaa8aa37962c9138baf5 lib/codeql/rust/elements/internal/generated/RetTypeRepr.qll 173fd722308161f9405f929a13718134f8eaefe9fce1686048860b7c8f4c29f7 30bbaada842369dac5618ae573999f59979597c6a3315c6cce04e5bed0b38c87 lib/codeql/rust/elements/internal/generated/ReturnExpr.qll c9c05400d326cd8e0da11c3bfa524daa08b2579ecaee80e468076e5dd7911d56 e7694926727220f46a7617b6ca336767450e359c6fa3782e82b1e21d85d37268 lib/codeql/rust/elements/internal/generated/ReturnTypeSyntax.qll 34e32623d2c0e848c57ce1892c16f4bc81ccca7df22dc21dad5eb48969224465 ccb07c205468bce06392ff4a150136c0d8ebacfb15d1d96dd599ab020b353f47 -lib/codeql/rust/elements/internal/generated/SelfParam.qll e1d994dea58a406dbfca3ea0c724ac48be66ac4380e7270e4037ca2714eef722 90f8ebfac723eef259e13d3c8a7ef6b886c2831d4f436a742144b96db6b6fc92 +lib/codeql/rust/elements/internal/generated/SelfParam.qll 076c583f7f34e29aaaf3319e9d64565a34c64caa5a6dfca240c0cc7800e9a14c 375afed1772d193b71980d3825c4ac438e90b295cba0baf58319d29a3a8463a0 lib/codeql/rust/elements/internal/generated/SlicePat.qll 722b1bd47a980ac9c91d018133b251c65ee817682e06708ad130031fbd01379b 7e0ce13b9de2040d2ef9d0948aab3f39e5fdc28d38c40bfbee590e2125dbe41c lib/codeql/rust/elements/internal/generated/SliceTypeRepr.qll efd28e97936944ce56ab5f83aa16cf76cc1b42a39c123959d3a878ca13ceb84e 3435ea66d467f4234b9644ce63fa9072a7e9ac86e23d464ba18aea7802fc03a7 lib/codeql/rust/elements/internal/generated/SourceFile.qll 55d44c9f09c5ff28c4f715f779a0db74083e1180acaf0d410e63ca07b90d1cb5 78c0af48b0b64aa377413ea4799dfe977602a111208e1d25e4bdfa920dbd7238 @@ -995,7 +995,7 @@ test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 8e9eba0837a466255e8e249e test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql 9fb7e1c79798e4f42e18785f3af17ea75f901a36abf9beb47a1eede69c613ba9 9cdb7cc4a4742865f6c92357973f84cee9229f55ff28081e5d17b6d57d6d275f test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql 7d4562efb0d26d92d11f03a0ef80338eb7d5a0c073f1f09cbb8a826f0cef33de 523ebd51b97f957afaf497e5a4d27929eed18e1d276054e3d5a7c5cfe7285c6e test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql 976ce33fe3fd34aae2028a11b4accdee122b6d82d07722488c3239f0d2c14609 906bf8c8e7769a1052196bc78947b655158dd3b2903fef2802e2031cffbc1d78 -test/extractor-tests/generated/SelfParam/SelfParam.ql 1a75aa4caf4342365c74811f566359053a1a1bbff7058840891f4e050433ee50 a173a91b4c9d8af2f82d8c774b674e06c54414e2bae845695d06f6d27e6ff40b +test/extractor-tests/generated/SelfParam/SelfParam.ql a5be8dc977d652c6fe8b27377a3dae3e34b4e034b76d2621d6c43ea9cf07128e 099fe28e1b17238c46c457593aed8d9fca6e6e6cf8f9c4ec5b14261035261c04 test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql 00dd5409c07e9a7b5dc51c1444e24b35d2ac3cab11320396ef70f531a3b65dc0 effbed79ad530a835e85b931389a0c8609a10ee035cb694f2e39b8539f8e54ba test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql 0b7c243f609e005dd63fd1b3b9f0096fc13cb98fe113e6f3fefb0d5c414e9a5f f6e06de8bcddfc9bd978c058079e53174edbe7b39f18df3c0bd4e80486808eda test/extractor-tests/generated/SelfParam/SelfParam_getName.ql 69207a57b415ba590e50003d506a64fd1780b27b8832b14f9bd3c909bddb5593 56fa28ba1222f45893237052fa5a9421d960e14fbf1396b2d1049b440c2e5abe diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll index 78e78192b7c7..e4c1078b682e 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll @@ -2695,8 +2695,13 @@ module MakeCfgNodes Input> { /** * A `self` parameter. For example `self` in: * ```rust - * fn push(&mut self, value: T) { - * // ... + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} * } * ``` */ @@ -2708,6 +2713,11 @@ module MakeCfgNodes Input> { /** Gets the underlying `SelfParam`. */ SelfParam getSelfParam() { result = node } + /** + * Holds if this self parameter is reference. + */ + predicate isRef() { node.isRef() } + /** * Holds if this self parameter is mut. */ diff --git a/rust/ql/lib/codeql/rust/elements/SelfParam.qll b/rust/ql/lib/codeql/rust/elements/SelfParam.qll index 88c1a05d8371..35afdab562b9 100644 --- a/rust/ql/lib/codeql/rust/elements/SelfParam.qll +++ b/rust/ql/lib/codeql/rust/elements/SelfParam.qll @@ -11,8 +11,13 @@ import codeql.rust.elements.ParamBase /** * A `self` parameter. For example `self` in: * ```rust - * fn push(&mut self, value: T) { - * // ... + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} * } * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll index 0d0d23a1e8c5..dad7b1d96fb2 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/SelfParamImpl.qll @@ -15,8 +15,13 @@ module Impl { /** * A `self` parameter. For example `self` in: * ```rust - * fn push(&mut self, value: T) { - * // ... + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} * } * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index 5a32a8623bc1..c6ee20a4dc4b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -2631,14 +2631,24 @@ module Raw { * INTERNAL: Do not use. * A `self` parameter. For example `self` in: * ```rust - * fn push(&mut self, value: T) { - * // ... + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} * } * ``` */ class SelfParam extends @self_param, ParamBase { override string toString() { result = "SelfParam" } + /** + * Holds if this self parameter is reference. + */ + predicate isRef() { self_param_is_ref(this) } + /** * Holds if this self parameter is mut. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll index b2cc6e4b0c4a..1092de3cc08c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SelfParam.qll @@ -18,8 +18,13 @@ module Generated { /** * A `self` parameter. For example `self` in: * ```rust - * fn push(&mut self, value: T) { - * // ... + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} * } * ``` * INTERNAL: Do not reference the `Generated::SelfParam` class directly. @@ -28,6 +33,11 @@ module Generated { class SelfParam extends Synth::TSelfParam, ParamBaseImpl::ParamBase { override string getAPrimaryQlClass() { result = "SelfParam" } + /** + * Holds if this self parameter is reference. + */ + predicate isRef() { Synth::convertSelfParamToRaw(this).(Raw::SelfParam).isRef() } + /** * Holds if this self parameter is mut. */ diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index d706df19af4a..df89d1c2034f 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -2226,6 +2226,11 @@ self_params( unique int id: @self_param ); +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + #keyset[id] self_param_is_mut( int id: @self_param ref diff --git a/rust/ql/test/utils/InlineExpectationsTest.qll b/rust/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from rust/ql/test/utils/InlineExpectationsTest.qll rename to rust/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/rust/ql/test/utils/InlineExpectationsTestQuery.ql b/rust/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from rust/ql/test/utils/InlineExpectationsTestQuery.ql rename to rust/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/utils/InlineFlowTest.qll b/rust/ql/lib/utils/test/InlineFlowTest.qll similarity index 100% rename from rust/ql/test/utils/InlineFlowTest.qll rename to rust/ql/lib/utils/test/InlineFlowTest.qll diff --git a/rust/ql/test/utils/PrettyPrintModels.ql b/rust/ql/lib/utils/test/PrettyPrintModels.ql similarity index 100% rename from rust/ql/test/utils/PrettyPrintModels.ql rename to rust/ql/lib/utils/test/PrettyPrintModels.ql diff --git a/rust/ql/test/utils/ProvenancePathGraph.qll b/rust/ql/lib/utils/test/ProvenancePathGraph.qll similarity index 100% rename from rust/ql/test/utils/ProvenancePathGraph.qll rename to rust/ql/lib/utils/test/ProvenancePathGraph.qll diff --git a/rust/ql/test/utils/internal/InlineExpectationsTestImpl.qll b/rust/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from rust/ql/test/utils/internal/InlineExpectationsTestImpl.qll rename to rust/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 2410d9237d0c..78f9e0cfc778 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -105,7 +105,7 @@ RestPat/gen_rest_pat.rs e762bf7537225f97da751c5dca6a2cd3836ad7579b68c748b8c6cba6 RetTypeRepr/gen_ret_type_repr.rs 25edbd60ad63ab4266f6426ef50f1dd17e24132f5a24404d240a3f07daef6a31 25edbd60ad63ab4266f6426ef50f1dd17e24132f5a24404d240a3f07daef6a31 ReturnExpr/gen_return_expr.rs 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f 4f6ef29d7b3c60d6d71d1a6034a0721671f517428ba21897361a92b01009d38f ReturnTypeSyntax/gen_return_type_syntax.rs 0b11a4cc400f9a2001996f99d61391bdb636e8aea036f587cf18ad6a957fe496 0b11a4cc400f9a2001996f99d61391bdb636e8aea036f587cf18ad6a957fe496 -SelfParam/gen_self_param.rs 9be528c454e2734292d54550f8850ae8e48e1558da46dcf7f06fc7a7a8c3e569 9be528c454e2734292d54550f8850ae8e48e1558da46dcf7f06fc7a7a8c3e569 +SelfParam/gen_self_param.rs 15491f86a32020c9ed3ecadc08c945ed01916b63683f95d2f5c1bedb4f3f01f2 15491f86a32020c9ed3ecadc08c945ed01916b63683f95d2f5c1bedb4f3f01f2 SlicePat/gen_slice_pat.rs df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 df4a6692f5100aa11dd777561400ce71e37b85f2363b0638c21975a1771b15d5 SliceTypeRepr/gen_slice_type_repr.rs e50c142b7cf7bc3040ad64f351488557323d0b2fd5d004b41ed0fa8e522b5648 e50c142b7cf7bc3040ad64f351488557323d0b2fd5d004b41ed0fa8e522b5648 SourceFile/gen_source_file.rs a7a1d4fa77b53adb6fbc031bf7ab49cf7c8787728ba0a687c348b5eefbb5b9df a7a1d4fa77b53adb6fbc031bf7ab49cf7c8787728ba0a687c348b5eefbb5b9df diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected index 6fd67c90f3ba..ba8ab1e624d6 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected @@ -1 +1,5 @@ -| gen_self_param.rs:5:13:5:21 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isMut: | yes | hasLifetime: | no | hasName: | yes | +| gen_self_param.rs:6:10:6:14 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | no | hasLifetime: | no | hasName: | yes | +| gen_self_param.rs:7:10:7:18 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | yes | hasLifetime: | no | hasName: | yes | +| gen_self_param.rs:8:12:8:15 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | no | isMut: | no | hasLifetime: | no | hasName: | yes | +| gen_self_param.rs:9:11:9:18 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | no | isMut: | yes | hasLifetime: | no | hasName: | yes | +| gen_self_param.rs:10:15:10:22 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | no | hasLifetime: | yes | hasName: | yes | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql index 2e8ef6d0bb61..3f09c3ece20b 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql @@ -3,15 +3,16 @@ import codeql.rust.elements import TestUtils from - SelfParam x, int getNumberOfAttrs, string hasTypeRepr, string isMut, string hasLifetime, - string hasName + SelfParam x, int getNumberOfAttrs, string hasTypeRepr, string isRef, string isMut, + string hasLifetime, string hasName where toBeTested(x) and not x.isUnknown() and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and + (if x.isRef() then isRef = "yes" else isRef = "no") and (if x.isMut() then isMut = "yes" else isMut = "no") and (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and if x.hasName() then hasName = "yes" else hasName = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "isMut:", isMut, - "hasLifetime:", hasLifetime, "hasName:", hasName +select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "isRef:", isRef, + "isMut:", isMut, "hasLifetime:", hasLifetime, "hasName:", hasName diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected index e69de29bb2d1..47e9eba10acc 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected @@ -0,0 +1 @@ +| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:16:10:17 | ''a | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected index 70a9a4a06596..6b57cfe1570a 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected @@ -1 +1,5 @@ -| gen_self_param.rs:5:13:5:21 | SelfParam | gen_self_param.rs:5:18:5:21 | self | +| gen_self_param.rs:6:10:6:14 | SelfParam | gen_self_param.rs:6:11:6:14 | self | +| gen_self_param.rs:7:10:7:18 | SelfParam | gen_self_param.rs:7:15:7:18 | self | +| gen_self_param.rs:8:12:8:15 | SelfParam | gen_self_param.rs:8:12:8:15 | self | +| gen_self_param.rs:9:11:9:18 | SelfParam | gen_self_param.rs:9:15:9:18 | self | +| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:19:10:22 | self | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs b/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs index 6278147a8783..4c6da9bcc064 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs +++ b/rust/ql/test/extractor-tests/generated/SelfParam/gen_self_param.rs @@ -1,8 +1,11 @@ // generated by codegen, do not edit -fn test_self_param() -> () { - // A `self` parameter. For example `self` in: - fn push(&mut self, value: T) { - // ... - } +// A `self` parameter. For example `self` in: +struct X; +impl X { + fn one(&self) {} + fn two(&mut self) {} + fn three(self) {} + fn four(mut self) {} + fn five<'a>(&'a self) {} } diff --git a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql index ad553fe548dc..e399ea0e5d71 100644 --- a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/rust/ql/test/library-tests/dataflow/closures/inline-flow.ql b/rust/ql/test/library-tests/dataflow/closures/inline-flow.ql index ad553fe548dc..e399ea0e5d71 100644 --- a/rust/ql/test/library-tests/dataflow/closures/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/closures/inline-flow.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/rust/ql/test/library-tests/dataflow/global/inline-flow.ql b/rust/ql/test/library-tests/dataflow/global/inline-flow.ql index ad553fe548dc..e399ea0e5d71 100644 --- a/rust/ql/test/library-tests/dataflow/global/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/global/inline-flow.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/rust/ql/test/library-tests/dataflow/local/inline-flow.ql b/rust/ql/test/library-tests/dataflow/local/inline-flow.ql index ad553fe548dc..e399ea0e5d71 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.ql +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import ValueFlow::PathGraph diff --git a/rust/ql/test/library-tests/dataflow/models/models.ql b/rust/ql/test/library-tests/dataflow/models/models.ql index e456d6d1c1c1..f419c266862e 100644 --- a/rust/ql/test/library-tests/dataflow/models/models.ql +++ b/rust/ql/test/library-tests/dataflow/models/models.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import codeql.rust.dataflow.DataFlow import codeql.rust.dataflow.FlowSummary import codeql.rust.dataflow.TaintTracking diff --git a/rust/ql/test/library-tests/dataflow/sources/InlineFlow.ql b/rust/ql/test/library-tests/dataflow/sources/InlineFlow.ql index 5bcbe05229bb..92a41dc46811 100644 --- a/rust/ql/test/library-tests/dataflow/sources/InlineFlow.ql +++ b/rust/ql/test/library-tests/dataflow/sources/InlineFlow.ql @@ -1,7 +1,7 @@ import rust import codeql.rust.dataflow.DataFlow import codeql.rust.Concepts -import utils.InlineFlowTest +import utils.test.InlineFlowTest /** * Configuration for flow from any threat model source to an argument of the function `sink`. diff --git a/rust/ql/test/library-tests/dataflow/sources/TaintSources.qlref b/rust/ql/test/library-tests/dataflow/sources/TaintSources.qlref index 3f6de4d0e4e3..7aa95121af3e 100644 --- a/rust/ql/test/library-tests/dataflow/sources/TaintSources.qlref +++ b/rust/ql/test/library-tests/dataflow/sources/TaintSources.qlref @@ -1,2 +1,2 @@ query: queries/summary/TaintSources.ql -postprocess: utils/InlineExpectationsTestQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.ql b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.ql index 2929ae90964f..5dcb7ee70a9d 100644 --- a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.ql +++ b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.ql @@ -3,7 +3,7 @@ */ import rust -import utils.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest import TaintFlow::PathGraph diff --git a/rust/ql/test/library-tests/variables/variables.ql b/rust/ql/test/library-tests/variables/variables.ql index 23eab9774457..cbadfe53d346 100644 --- a/rust/ql/test/library-tests/variables/variables.ql +++ b/rust/ql/test/library-tests/variables/variables.ql @@ -1,5 +1,5 @@ import rust -import utils.InlineExpectationsTest +import utils.test.InlineExpectationsTest query predicate variable(Variable v) { any() } diff --git a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.qlref b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.qlref index 7aee10fcc4a5..269ef42b0d40 100644 --- a/rust/ql/test/query-tests/security/CWE-089/SqlInjection.qlref +++ b/rust/ql/test/query-tests/security/CWE-089/SqlInjection.qlref @@ -1,4 +1,4 @@ query: queries/security/CWE-089/SqlInjection.ql postprocess: - - utils/PrettyPrintModels.ql - - utils/InlineExpectationsTestQuery.ql + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/security/CWE-089/SqlSinks.ql b/rust/ql/test/query-tests/security/CWE-089/SqlSinks.ql index ac5efd72db91..5e992146c2af 100644 --- a/rust/ql/test/query-tests/security/CWE-089/SqlSinks.ql +++ b/rust/ql/test/query-tests/security/CWE-089/SqlSinks.ql @@ -1,6 +1,6 @@ import rust import codeql.rust.security.SqlInjectionExtensions -import utils.InlineExpectationsTest +import utils.test.InlineExpectationsTest module SqlSinksTest implements TestSig { string getARelevantTag() { result = "sql-sink" } diff --git a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm.qlref b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm.qlref index 6b7ff78b567a..db55d3a51cba 100644 --- a/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm.qlref +++ b/rust/ql/test/query-tests/security/CWE-327/BrokenCryptoAlgorithm.qlref @@ -1,2 +1,2 @@ query: queries/security/CWE-327/BrokenCryptoAlgorithm.ql -postprocess: utils/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/rust/ql/test/query-tests/security/CWE-696/BadCTorInitialization.qlref b/rust/ql/test/query-tests/security/CWE-696/BadCTorInitialization.qlref index 2b71705c98b8..2a850f7d0979 100644 --- a/rust/ql/test/query-tests/security/CWE-696/BadCTorInitialization.qlref +++ b/rust/ql/test/query-tests/security/CWE-696/BadCTorInitialization.qlref @@ -1,2 +1,2 @@ query: queries/security/CWE-696/BadCtorInitialization.ql -postprocess: utils/InlineExpectationsTestQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/unusedentities/UnreachableCode.qlref b/rust/ql/test/query-tests/unusedentities/UnreachableCode.qlref index 23ca9359181e..e5d2530725ad 100644 --- a/rust/ql/test/query-tests/unusedentities/UnreachableCode.qlref +++ b/rust/ql/test/query-tests/unusedentities/UnreachableCode.qlref @@ -1,2 +1,2 @@ query: queries/unusedentities/UnreachableCode.ql -postprocess: utils/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/unusedentities/UnusedValue.qlref b/rust/ql/test/query-tests/unusedentities/UnusedValue.qlref index d08b310e2d04..f32a0d6b7ea2 100644 --- a/rust/ql/test/query-tests/unusedentities/UnusedValue.qlref +++ b/rust/ql/test/query-tests/unusedentities/UnusedValue.qlref @@ -1,2 +1,2 @@ query: queries/unusedentities/UnusedValue.ql -postprocess: utils/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/ql/test/query-tests/unusedentities/UnusedVariable.qlref b/rust/ql/test/query-tests/unusedentities/UnusedVariable.qlref index 709d2b61d550..67f81cd140b8 100644 --- a/rust/ql/test/query-tests/unusedentities/UnusedVariable.qlref +++ b/rust/ql/test/query-tests/unusedentities/UnusedVariable.qlref @@ -1,2 +1,2 @@ query: queries/unusedentities/UnusedVariable.ql -postprocess: utils/InlineExpectationsTestQuery.ql \ No newline at end of file +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 33a837871043..b2ce365bc4cb 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -1546,12 +1546,18 @@ class _: @annotate(SelfParam, replace_bases={AstNode: ParamBase}, cfg = True) +@rust.doc_test_signature(None) class _: """ A `self` parameter. For example `self` in: ```rust - fn push(&mut self, value: T) { - // ... + struct X; + impl X { + fn one(&self) {} + fn two(&mut self) {} + fn three(self) {} + fn four(mut self) {} + fn five<'a>(&'a self) {} } ``` """ diff --git a/rust/schema/ast.py b/rust/schema/ast.py index 77d52977b4ec..cb302e093150 100644 --- a/rust/schema/ast.py +++ b/rust/schema/ast.py @@ -540,6 +540,7 @@ class ReturnTypeSyntax(AstNode): class SelfParam(AstNode): attrs: list["Attr"] | child + is_ref: predicate is_mut: predicate lifetime: optional["Lifetime"] | child name: optional["Name"] | child diff --git a/swift/BUILD.bazel b/swift/BUILD.bazel index 45b0f6687cbd..d9a5e912668f 100644 --- a/swift/BUILD.bazel +++ b/swift/BUILD.bazel @@ -26,8 +26,14 @@ filegroup( ) codeql_pkg_files( - name = "autobuilder-incompatible-os", - exes = ["//swift/tools/diagnostics:autobuilder-incompatible-os"], + name = "incompatible-os", + exes = ["//swift/tools/incompatible-os"], + renames = select_os( + otherwise = {}, + windows = { + "//swift/tools/incompatible-os": "extractor.exe", + }, + ), ) codeql_pkg_runfiles( @@ -42,7 +48,7 @@ pkg_filegroup( ":autobuilder-files", ], otherwise = [ - ":autobuilder-incompatible-os", + ":incompatible-os", ], ), prefix = "tools/{CODEQL_PLATFORM}", @@ -64,6 +70,13 @@ pkg_filegroup( prefix = "tools/{CODEQL_PLATFORM}", ) +pkg_filegroup( + name = "incompatible-linux-extractor", + srcs = ["//swift/extractor:incompatible"], + prefix = "tools/{CODEQL_PLATFORM}", + target_compatible_with = ["@platforms//os:linux"], +) + codeql_pkg_files( name = "root-files", srcs = [ @@ -86,7 +99,7 @@ zip_map = { ":tools", "//swift/downgrades", ] + select_os( - linux = [":extractor"] if linux_included else [], + linux = [":extractor"] if linux_included else [":incompatible-linux-extractor"], macos = [":extractor"], windows = [], ), diff --git a/swift/extractor/BUILD.bazel b/swift/extractor/BUILD.bazel index c96552728328..425d72146527 100644 --- a/swift/extractor/BUILD.bazel +++ b/swift/extractor/BUILD.bazel @@ -1,5 +1,5 @@ load("@rules_shell//shell:sh_binary.bzl", "sh_binary") -load("//misc/bazel:pkg.bzl", "codeql_pkg_runfiles") +load("//misc/bazel:pkg.bzl", "codeql_pkg_files", "codeql_pkg_runfiles") load("//swift:rules.bzl", "swift_cc_binary") swift_cc_binary( @@ -36,3 +36,11 @@ codeql_pkg_runfiles( exes = [":extractor"], visibility = ["//swift:__pkg__"], ) + +codeql_pkg_files( + name = "incompatible", + exes = ["incompatible-extractor.sh"], + renames = {"incompatible-extractor.sh": "extractor"}, + target_compatible_with = ["@platforms//os:linux"], + visibility = ["//swift:__pkg__"], +) diff --git a/swift/extractor/incompatible-extractor.sh b/swift/extractor/incompatible-extractor.sh new file mode 100755 index 000000000000..2e5b31906961 --- /dev/null +++ b/swift/extractor/incompatible-extractor.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exec -a "$0" "$(dirname $0)/incompatible-os" diff --git a/swift/ql/integration-tests/autobuilder/unsupported-os/diagnostics.expected b/swift/ql/integration-tests/autobuilder/unsupported-os/diagnostics.expected index 72b2d9f081f2..19c8a6b0752d 100644 --- a/swift/ql/integration-tests/autobuilder/unsupported-os/diagnostics.expected +++ b/swift/ql/integration-tests/autobuilder/unsupported-os/diagnostics.expected @@ -1,9 +1,9 @@ { - "markdownMessage": "Currently, `autobuild` for Swift analysis is only supported on macOS.\n\n[Change the Actions runner][1] to run on macOS.\n\nYou may be able to run analysis on Linux by setting up a [manual build command][2].\n\n[1]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on\n[2]: https://docs.github.com/en/enterprise-server/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language", + "markdownMessage": "Currently, Swift analysis is only supported on macOS.\n\n[Change the Actions runner][1] to run on macOS.\n\n[1]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on", "severity": "error", "source": { "extractorName": "swift", - "id": "swift/autobuilder/incompatible-os", + "id": "swift/extractor/incompatible-os", "name": "Incompatible operating system (expected macOS)" }, "visibility": { diff --git a/swift/ql/test/TestUtilities/InlineExpectationsTest.qll b/swift/ql/lib/utils/test/InlineExpectationsTest.qll similarity index 100% rename from swift/ql/test/TestUtilities/InlineExpectationsTest.qll rename to swift/ql/lib/utils/test/InlineExpectationsTest.qll diff --git a/swift/ql/test/TestUtilities/InlineExpectationsTestQuery.ql b/swift/ql/lib/utils/test/InlineExpectationsTestQuery.ql similarity index 100% rename from swift/ql/test/TestUtilities/InlineExpectationsTestQuery.ql rename to swift/ql/lib/utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/TestUtilities/InlineFlowTest.qll b/swift/ql/lib/utils/test/InlineFlowTest.qll similarity index 98% rename from swift/ql/test/TestUtilities/InlineFlowTest.qll rename to swift/ql/lib/utils/test/InlineFlowTest.qll index 214d28cac042..f50930924ebf 100644 --- a/swift/ql/test/TestUtilities/InlineFlowTest.qll +++ b/swift/ql/lib/utils/test/InlineFlowTest.qll @@ -4,7 +4,7 @@ * Example for a test.ql: * ```ql * import swift - * import TestUtilities.InlineFlowTest + * import utils.test.InlineFlowTest * import DefaultFlowTest * import PathGraph * @@ -39,7 +39,7 @@ import codeql.swift.dataflow.DataFlow import codeql.swift.dataflow.ExternalFlow import codeql.swift.dataflow.TaintTracking -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest private predicate defaultSource(DataFlow::Node source) { source diff --git a/swift/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll b/swift/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll similarity index 100% rename from swift/ql/test/TestUtilities/internal/InlineExpectationsTestImpl.qll rename to swift/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll diff --git a/swift/ql/test/library-tests/dataflow/capture/FlowInline.ql b/swift/ql/test/library-tests/dataflow/capture/FlowInline.ql index 50e3f8d2f7de..3fba19d6cdca 100644 --- a/swift/ql/test/library-tests/dataflow/capture/FlowInline.ql +++ b/swift/ql/test/library-tests/dataflow/capture/FlowInline.ql @@ -1,2 +1,2 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import DefaultFlowTest diff --git a/swift/ql/test/library-tests/dataflow/dataflow/DataFlowInline.ql b/swift/ql/test/library-tests/dataflow/dataflow/DataFlowInline.ql index dce3fe902ca5..26400f87729b 100644 --- a/swift/ql/test/library-tests/dataflow/dataflow/DataFlowInline.ql +++ b/swift/ql/test/library-tests/dataflow/dataflow/DataFlowInline.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import FlowConfig string customTaintFlowTag() { result = "flow" } diff --git a/swift/ql/test/library-tests/dataflow/flowsources/FlowSourcesInline.ql b/swift/ql/test/library-tests/dataflow/flowsources/FlowSourcesInline.ql index e4ea2e0e56e2..193a5a748bb0 100644 --- a/swift/ql/test/library-tests/dataflow/flowsources/FlowSourcesInline.ql +++ b/swift/ql/test/library-tests/dataflow/flowsources/FlowSourcesInline.ql @@ -1,5 +1,5 @@ import swift -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest import FlowConfig import codeql.swift.dataflow.TaintTracking import codeql.swift.dataflow.DataFlow diff --git a/swift/ql/test/library-tests/dataflow/taint/core/TaintInline.ql b/swift/ql/test/library-tests/dataflow/taint/core/TaintInline.ql index 971896d835cf..05197e4d58be 100644 --- a/swift/ql/test/library-tests/dataflow/taint/core/TaintInline.ql +++ b/swift/ql/test/library-tests/dataflow/taint/core/TaintInline.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest import Taint string customTaintFlowTag() { result = "tainted" } diff --git a/swift/ql/test/library-tests/dataflow/taint/libraries/TaintInline.ql b/swift/ql/test/library-tests/dataflow/taint/libraries/TaintInline.ql index 0608a134e6cd..6f550be74097 100644 --- a/swift/ql/test/library-tests/dataflow/taint/libraries/TaintInline.ql +++ b/swift/ql/test/library-tests/dataflow/taint/libraries/TaintInline.ql @@ -1,4 +1,4 @@ -import TestUtilities.InlineFlowTest +import utils.test.InlineFlowTest string customTaintFlowTag() { result = "tainted" } diff --git a/swift/ql/test/library-tests/regex/regex.ql b/swift/ql/test/library-tests/regex/regex.ql index 208909ba6524..c1be7a605729 100644 --- a/swift/ql/test/library-tests/regex/regex.ql +++ b/swift/ql/test/library-tests/regex/regex.ql @@ -3,7 +3,7 @@ import codeql.swift.regex.Regex private import codeql.swift.regex.internal.ParseRegex private import codeql.swift.regex.RegexTreeView::RegexTreeView as TreeView import codeql.regex.nfa.ExponentialBackTracking::Make -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest bindingset[s] string quote(string s) { if s.matches("% %") then result = "\"" + s + "\"" else result = s } diff --git a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql index 0e21c40886ec..a32f9c56ee90 100644 --- a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql +++ b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql @@ -2,7 +2,7 @@ import swift import codeql.swift.dataflow.DataFlow import codeql.swift.dataflow.FlowSources import codeql.swift.security.PathInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module PathInjectionTest implements TestSig { string getARelevantTag() { result = "hasPathInjection" } diff --git a/swift/ql/test/query-tests/Security/CWE-094/UnsafeJsEval.qlref b/swift/ql/test/query-tests/Security/CWE-094/UnsafeJsEval.qlref index 51ad8bf6ed37..55cc812d7365 100644 --- a/swift/ql/test/query-tests/Security/CWE-094/UnsafeJsEval.qlref +++ b/swift/ql/test/query-tests/Security/CWE-094/UnsafeJsEval.qlref @@ -1,2 +1,2 @@ query: queries/Security/CWE-094/UnsafeJsEval.ql -postprocess: TestUtilities/InlineExpectationsTestQuery.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql index 5ad644f6a6dc..e7371e9d7435 100644 --- a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql +++ b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql @@ -1,7 +1,7 @@ import swift import codeql.swift.dataflow.DataFlow import codeql.swift.security.CleartextLoggingQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module CleartextLogging implements TestSig { string getARelevantTag() { result = "hasCleartextLogging" } diff --git a/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql b/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql index 684cef766d66..64001151b442 100644 --- a/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql +++ b/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql @@ -1,7 +1,7 @@ import swift import codeql.swift.dataflow.FlowSources import codeql.swift.security.XXEQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest class TestRemoteSource extends RemoteFlowSource { TestRemoteSource() { this.asExpr().(ApplyExpr).getStaticTarget().getName().matches("source%") } diff --git a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql index 2c1eafa0b71c..202ca05ad43b 100644 --- a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql +++ b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql @@ -1,7 +1,7 @@ import swift import codeql.swift.dataflow.DataFlow import codeql.swift.security.PredicateInjectionQuery -import TestUtilities.InlineExpectationsTest +import utils.test.InlineExpectationsTest module PredicateInjectionTest implements TestSig { string getARelevantTag() { result = "hasPredicateInjection" } diff --git a/swift/tools/autobuild.cmd b/swift/tools/autobuild.cmd index fc90f9f2f052..6ca5d4c4d15f 100644 --- a/swift/tools/autobuild.cmd +++ b/swift/tools/autobuild.cmd @@ -1 +1 @@ -"%CODEQL_EXTRACTOR_SWIFT_ROOT%/tools/%CODEQL_PLATFORM%/autobuilder-incompatible-os.exe" +"%CODEQL_EXTRACTOR_SWIFT_ROOT%/tools/%CODEQL_PLATFORM%/extractor.exe" diff --git a/swift/tools/autobuild.sh b/swift/tools/autobuild.sh index 89bf3c12435b..aa2afcf57e91 100755 --- a/swift/tools/autobuild.sh +++ b/swift/tools/autobuild.sh @@ -5,5 +5,5 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export CODEQL_SWIFT_POD_EXEC=`which pod` exec "${CODEQL_EXTRACTOR_SWIFT_ROOT}/tools/${CODEQL_PLATFORM}/swift-autobuilder" else - exec "${CODEQL_EXTRACTOR_SWIFT_ROOT}/tools/${CODEQL_PLATFORM}/autobuilder-incompatible-os" + exec "${CODEQL_EXTRACTOR_SWIFT_ROOT}/tools/${CODEQL_PLATFORM}/incompatible-os" fi diff --git a/swift/tools/diagnostics/AutobuilderIncompatibleOs.cpp b/swift/tools/diagnostics/AutobuilderIncompatibleOs.cpp deleted file mode 100644 index c9ee7fa1ab26..000000000000 --- a/swift/tools/diagnostics/AutobuilderIncompatibleOs.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// Unconditionally emits a diagnostic about running the autobuilder on an incompatible, non-macOS OS -// and exits with an error code. -// -// This is implemented as a C++ binary instead of a hardcoded JSON file so we can leverage existing -// diagnostic machinery for emitting correct timestamps, generating correct file names, etc. - -#include "swift/logging/SwiftLogging.h" - -const std::string_view codeql::programName = "autobuilder"; -const std::string_view codeql::extractorName = "swift"; - -constexpr codeql::Diagnostic incompatibleOs{ - .id = "incompatible-os", - .name = "Incompatible operating system (expected macOS)", - .action = - "[Change the Actions runner][1] to run on macOS.\n" - "\n" - "You may be able to run analysis on Linux by setting up a [manual build command][2].\n" - "\n" - "[1]: " - "https://docs.github.com/en/actions/using-workflows/" - "workflow-syntax-for-github-actions#jobsjob_idruns-on\n" - "[2]: " - "https://docs.github.com/en/enterprise-server/code-security/code-scanning/" - "automatically-scanning-your-code-for-vulnerabilities-and-errors/" - "configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-" - "compiled-" - "language"}; - -static codeql::Logger& logger() { - static codeql::Logger ret{"main"}; - return ret; -} - -int main() { - DIAGNOSE_ERROR(incompatibleOs, - "Currently, `autobuild` for Swift analysis is only supported on macOS."); - return 1; -} diff --git a/swift/tools/diagnostics/BUILD.bazel b/swift/tools/incompatible-os/BUILD.bazel similarity index 72% rename from swift/tools/diagnostics/BUILD.bazel rename to swift/tools/incompatible-os/BUILD.bazel index e02d6aed13b0..a834415ed9f5 100644 --- a/swift/tools/diagnostics/BUILD.bazel +++ b/swift/tools/incompatible-os/BUILD.bazel @@ -1,8 +1,8 @@ load("//swift:rules.bzl", "swift_cc_binary") swift_cc_binary( - name = "autobuilder-incompatible-os", - srcs = ["AutobuilderIncompatibleOs.cpp"], + name = "incompatible-os", + srcs = ["IncompatibleOs.cpp"], # No restrictions (Windows allowed) target_compatible_with = [], visibility = ["//swift:__subpackages__"], diff --git a/swift/tools/incompatible-os/IncompatibleOs.cpp b/swift/tools/incompatible-os/IncompatibleOs.cpp new file mode 100644 index 000000000000..4aecccef564f --- /dev/null +++ b/swift/tools/incompatible-os/IncompatibleOs.cpp @@ -0,0 +1,28 @@ +// Unconditionally emits a diagnostic about running the autobuilder on an incompatible, non-macOS OS +// and exits with an error code. +// +// This is implemented as a C++ binary instead of a hardcoded JSON file so we can leverage existing +// diagnostic machinery for emitting correct timestamps, generating correct file names, etc. + +#include "swift/logging/SwiftLogging.h" + +const std::string_view codeql::programName = "extractor"; +const std::string_view codeql::extractorName = "swift"; + +constexpr codeql::Diagnostic incompatibleOs{ + .id = "incompatible-os", + .name = "Incompatible operating system (expected macOS)", + .action = "[Change the Actions runner][1] to run on macOS.\n\n" + "[1]: " + "https://docs.github.com/en/actions/using-workflows/" + "workflow-syntax-for-github-actions#jobsjob_idruns-on"}; + +static codeql::Logger& logger() { + static codeql::Logger ret{"main"}; + return ret; +} + +int main() { + DIAGNOSE_ERROR(incompatibleOs, "Currently, Swift analysis is only supported on macOS."); + return 1; +}