mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Merge branch 'main' into alexdenisov+redsun82/tuple-mangling
This commit is contained in:
3
.github/workflows/check-change-note.yml
vendored
3
.github/workflows/check-change-note.yml
vendored
@@ -11,7 +11,6 @@ on:
|
||||
- "*/ql/lib/**/*.yml"
|
||||
- "!**/experimental/**"
|
||||
- "!ql/**"
|
||||
- "!swift/**"
|
||||
- ".github/workflows/check-change-note.yml"
|
||||
|
||||
jobs:
|
||||
@@ -32,4 +31,4 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$"))' |
|
||||
grep true -c
|
||||
grep true -c
|
||||
|
||||
@@ -1640,8 +1640,15 @@ predicate localInstructionFlow(Instruction e1, Instruction e2) {
|
||||
localFlow(instructionNode(e1), instructionNode(e2))
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* Ideally this module would be private, but the `asExprInternal` predicate is
|
||||
* needed in `DefaultTaintTrackingImpl`. Once `DefaultTaintTrackingImpl` is gone
|
||||
* we can make this module private.
|
||||
*/
|
||||
cached
|
||||
private module ExprFlowCached {
|
||||
module ExprFlowCached {
|
||||
/**
|
||||
* Holds if `n` is an indirect operand of a `PointerArithmeticInstruction`, and
|
||||
* `e` is the result of loading from the `PointerArithmeticInstruction`.
|
||||
@@ -1692,7 +1699,8 @@ private module ExprFlowCached {
|
||||
* `x[i]` steps to the expression `x[i - 1]` without traversing the
|
||||
* entire chain.
|
||||
*/
|
||||
private Expr asExpr(Node n) {
|
||||
cached
|
||||
Expr asExprInternal(Node n) {
|
||||
isIndirectBaseOfArrayAccess(n, result)
|
||||
or
|
||||
not isIndirectBaseOfArrayAccess(n, _) and
|
||||
@@ -1704,7 +1712,7 @@ private module ExprFlowCached {
|
||||
* dataflow step.
|
||||
*/
|
||||
private predicate localStepFromNonExpr(Node n1, Node n2) {
|
||||
not exists(asExpr(n1)) and
|
||||
not exists(asExprInternal(n1)) and
|
||||
localFlowStep(n1, n2)
|
||||
}
|
||||
|
||||
@@ -1715,7 +1723,7 @@ private module ExprFlowCached {
|
||||
pragma[nomagic]
|
||||
private predicate localStepsToExpr(Node n1, Node n2, Expr e2) {
|
||||
localStepFromNonExpr*(n1, n2) and
|
||||
e2 = asExpr(n2)
|
||||
e2 = asExprInternal(n2)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1726,7 +1734,7 @@ private module ExprFlowCached {
|
||||
exists(Node mid |
|
||||
localFlowStep(n1, mid) and
|
||||
localStepsToExpr(mid, n2, e2) and
|
||||
e1 = asExpr(n1)
|
||||
e1 = asExprInternal(n1)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ private DataFlow::Node getNodeForSource(Expr source) {
|
||||
}
|
||||
|
||||
private DataFlow::Node getNodeForExpr(Expr node) {
|
||||
result = DataFlow::exprNode(node)
|
||||
node = DataFlow::ExprFlowCached::asExprInternal(result)
|
||||
or
|
||||
// Some of the sources in `isUserInput` are intended to match the value of
|
||||
// an expression, while others (those modeled below) are intended to match
|
||||
@@ -221,7 +221,7 @@ private module Cached {
|
||||
predicate nodeIsBarrierIn(DataFlow::Node node) {
|
||||
// don't use dataflow into taint sources, as this leads to duplicate results.
|
||||
exists(Expr source | isUserInput(source, _) |
|
||||
node = DataFlow::exprNode(source)
|
||||
source = DataFlow::ExprFlowCached::asExprInternal(node)
|
||||
or
|
||||
// This case goes together with the similar (but not identical) rule in
|
||||
// `getNodeForSource`.
|
||||
|
||||
@@ -729,7 +729,7 @@ module RangeStage<
|
||||
) {
|
||||
exists(SemExpr e, D::Delta d1, D::Delta d2 |
|
||||
unequalFlowStepIntegralSsa(v, pos, e, d1, reason) and
|
||||
boundedUpper(e, b, d1) and
|
||||
boundedUpper(e, b, d2) and
|
||||
boundedLower(e, b, d2) and
|
||||
delta = D::fromFloat(D::toFloat(d1) + D::toFloat(d2))
|
||||
)
|
||||
|
||||
@@ -78,3 +78,36 @@ void testInterproc(BigArray *arr) {
|
||||
|
||||
addToPointerAndAssign(arr->buf);
|
||||
}
|
||||
|
||||
void testEqRefinement() {
|
||||
int arr[MAX_SIZE];
|
||||
|
||||
for(int i = 0; i <= MAX_SIZE; i++) {
|
||||
if(i != MAX_SIZE) {
|
||||
arr[i] = 0; // GOOD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void testEqRefinement2() {
|
||||
int arr[MAX_SIZE];
|
||||
|
||||
int n = 0;
|
||||
|
||||
for(int i = 0; i <= MAX_SIZE; i++) {
|
||||
if(n == 0) {
|
||||
if(i == MAX_SIZE) {
|
||||
break;
|
||||
}
|
||||
n = arr[i]; // GOOD
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == MAX_SIZE || n != arr[i]) {
|
||||
if (i == MAX_SIZE) {
|
||||
break;
|
||||
}
|
||||
n = arr[i]; // GOOD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +653,24 @@ edges
|
||||
| test.cpp:304:15:304:26 | new[] | test.cpp:308:5:308:6 | xs |
|
||||
| test.cpp:308:5:308:6 | xs | test.cpp:308:5:308:11 | access to array |
|
||||
| test.cpp:308:5:308:11 | access to array | test.cpp:308:5:308:29 | Store: ... = ... |
|
||||
| test.cpp:313:16:313:29 | new[] | test.cpp:314:17:314:18 | xs |
|
||||
| test.cpp:313:14:313:27 | new[] | test.cpp:314:15:314:16 | xs |
|
||||
| test.cpp:325:14:325:27 | new[] | test.cpp:326:15:326:16 | xs |
|
||||
| test.cpp:326:15:326:16 | xs | test.cpp:326:15:326:23 | ... + ... |
|
||||
| test.cpp:326:15:326:16 | xs | test.cpp:326:15:326:23 | ... + ... |
|
||||
| test.cpp:326:15:326:16 | xs | test.cpp:338:8:338:15 | * ... |
|
||||
| test.cpp:326:15:326:16 | xs | test.cpp:341:8:341:17 | * ... |
|
||||
| test.cpp:326:15:326:23 | ... + ... | test.cpp:342:8:342:17 | * ... |
|
||||
| test.cpp:326:15:326:23 | ... + ... | test.cpp:342:8:342:17 | * ... |
|
||||
| test.cpp:338:8:338:15 | * ... | test.cpp:342:8:342:17 | * ... |
|
||||
| test.cpp:341:8:341:17 | * ... | test.cpp:342:8:342:17 | * ... |
|
||||
| test.cpp:342:8:342:17 | * ... | test.cpp:333:5:333:21 | Store: ... = ... |
|
||||
| test.cpp:342:8:342:17 | * ... | test.cpp:341:5:341:21 | Store: ... = ... |
|
||||
| test.cpp:347:14:347:27 | new[] | test.cpp:348:15:348:16 | xs |
|
||||
| test.cpp:348:15:348:16 | xs | test.cpp:350:16:350:19 | ... ++ |
|
||||
| test.cpp:348:15:348:16 | xs | test.cpp:350:16:350:19 | ... ++ |
|
||||
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:15:350:19 | Load: * ... |
|
||||
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:16:350:19 | ... ++ |
|
||||
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:16:350:19 | ... ++ |
|
||||
subpaths
|
||||
#select
|
||||
| test.cpp:6:14:6:15 | Load: * ... | test.cpp:4:15:4:20 | call to malloc | test.cpp:6:14:6:15 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:4:15:4:20 | call to malloc | call to malloc | test.cpp:5:19:5:22 | size | size |
|
||||
@@ -679,3 +696,6 @@ subpaths
|
||||
| test.cpp:264:13:264:14 | Load: * ... | test.cpp:260:13:260:24 | new[] | test.cpp:264:13:264:14 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:260:13:260:24 | new[] | new[] | test.cpp:261:19:261:21 | len | len |
|
||||
| test.cpp:274:5:274:10 | Store: ... = ... | test.cpp:270:13:270:24 | new[] | test.cpp:274:5:274:10 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:270:13:270:24 | new[] | new[] | test.cpp:271:19:271:21 | len | len |
|
||||
| test.cpp:308:5:308:29 | Store: ... = ... | test.cpp:304:15:304:26 | new[] | test.cpp:308:5:308:29 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:304:15:304:26 | new[] | new[] | test.cpp:308:8:308:10 | ... + ... | ... + ... |
|
||||
| test.cpp:333:5:333:21 | Store: ... = ... | test.cpp:325:14:325:27 | new[] | test.cpp:333:5:333:21 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:325:14:325:27 | new[] | new[] | test.cpp:326:20:326:23 | size | size |
|
||||
| test.cpp:341:5:341:21 | Store: ... = ... | test.cpp:325:14:325:27 | new[] | test.cpp:341:5:341:21 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:325:14:325:27 | new[] | new[] | test.cpp:326:20:326:23 | size | size |
|
||||
| test.cpp:350:15:350:19 | Load: * ... | test.cpp:347:14:347:27 | new[] | test.cpp:350:15:350:19 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:347:14:347:27 | new[] | new[] | test.cpp:348:20:348:23 | size | size |
|
||||
|
||||
@@ -310,15 +310,43 @@ void test21() {
|
||||
}
|
||||
|
||||
void test22(unsigned size, int val) {
|
||||
char *xs = new char[size];
|
||||
char *end = xs + size; // GOOD
|
||||
char **current = &end;
|
||||
do
|
||||
{
|
||||
if( *current - xs < 1 ) // GOOD
|
||||
return;
|
||||
*--(*current) = 0; // GOOD
|
||||
val >>= 8;
|
||||
}
|
||||
while( val > 0 );
|
||||
char *xs = new char[size];
|
||||
char *end = xs + size; // GOOD
|
||||
char **current = &end;
|
||||
do {
|
||||
if (*current - xs < 1) // GOOD
|
||||
return;
|
||||
*--(*current) = 0; // GOOD
|
||||
val >>= 8;
|
||||
} while (val > 0);
|
||||
}
|
||||
|
||||
void test23(unsigned size, int val) {
|
||||
char *xs = new char[size];
|
||||
char *end = xs + size;
|
||||
char **current = &end;
|
||||
|
||||
if (val < 1) {
|
||||
if(*current - xs < 1)
|
||||
return;
|
||||
|
||||
*--(*current) = 0; // GOOD [FALSE POSITIVE]
|
||||
return;
|
||||
}
|
||||
|
||||
if (val < 2) {
|
||||
if(*current - xs < 2)
|
||||
return;
|
||||
|
||||
*--(*current) = 0; // GOOD [FALSE POSITIVE]
|
||||
*--(*current) = 0; // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
void test24(unsigned size) {
|
||||
char *xs = new char[size];
|
||||
char *end = xs + size;
|
||||
if (xs < end) {
|
||||
int val = *xs++; // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
WARNING: Module TaintedWithPath has been deprecated and may be removed in future (tainted.ql:9,8-47)
|
||||
WARNING: Predicate tainted has been deprecated and may be removed in future (tainted.ql:20,49-74)
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -38,12 +38,10 @@ predicate irTaint(Element source, TaintedWithPath::PathNode predNode, string tag
|
||||
)
|
||||
}
|
||||
|
||||
class IRDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
IRDefaultTaintTrackingTest() { this = "IRDefaultTaintTrackingTest" }
|
||||
module IRDefaultTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = ["ir-path", "ir-sink"] }
|
||||
|
||||
override string getARelevantTag() { result = ["ir-path", "ir-sink"] }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Element elem, TaintedWithPath::PathNode node, int n |
|
||||
irTaint(_, node, tag) and
|
||||
elem = getElementFromPathNode(node) and
|
||||
@@ -67,12 +65,10 @@ class IRDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
class AstTaintTrackingTest extends InlineExpectationsTest {
|
||||
AstTaintTrackingTest() { this = "ASTTaintTrackingTest" }
|
||||
module AstTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = "ast" }
|
||||
|
||||
override string getARelevantTag() { result = "ast" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Expr source, Element tainted, int n |
|
||||
tag = "ast" and
|
||||
astTaint(source, tainted) and
|
||||
@@ -100,3 +96,5 @@ class AstTaintTrackingTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<IRDefaultTaintTrackingTest, AstTaintTrackingTest>>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
WARNING: Module TaintedWithPath has been deprecated and may be removed in future (tainted.ql:10,8-47)
|
||||
WARNING: Predicate tainted has been deprecated and may be removed in future (tainted.ql:21,3-28)
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -29,12 +29,10 @@ predicate irTaint(Expr source, Element sink) {
|
||||
TaintedWithPath::taintedWithPath(source, sink, _, _)
|
||||
}
|
||||
|
||||
class IRDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
IRDefaultTaintTrackingTest() { this = "IRDefaultTaintTrackingTest" }
|
||||
module IRDefaultTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = "ir" }
|
||||
|
||||
override string getARelevantTag() { result = "ir" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Expr source, Element tainted, int n |
|
||||
tag = "ir" and
|
||||
irTaint(source, tainted) and
|
||||
@@ -55,12 +53,10 @@ class IRDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
class AstTaintTrackingTest extends InlineExpectationsTest {
|
||||
AstTaintTrackingTest() { this = "ASTTaintTrackingTest" }
|
||||
module AstTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = "ast" }
|
||||
|
||||
override string getARelevantTag() { result = "ast" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Expr source, Element tainted, int n |
|
||||
tag = "ast" and
|
||||
astTaint(source, tainted) and
|
||||
@@ -80,3 +76,5 @@ class AstTaintTrackingTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<IRDefaultTaintTrackingTest, AstTaintTrackingTest>>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
WARNING: Predicate taintedIncludingGlobalVars has been deprecated and may be removed in future (global.ql:8,3-47)
|
||||
WARNING: Predicate taintedIncludingGlobalVars has been deprecated and may be removed in future (global.ql:12,3-53)
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -12,12 +12,10 @@ predicate irTaint(Expr source, Element sink, string globalVar) {
|
||||
IRDefaultTaintTracking::taintedIncludingGlobalVars(source, sink, globalVar) and globalVar != ""
|
||||
}
|
||||
|
||||
class IRGlobalDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
IRGlobalDefaultTaintTrackingTest() { this = "IRGlobalDefaultTaintTrackingTest" }
|
||||
module IRGlobalDefaultTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = "ir" }
|
||||
|
||||
override string getARelevantTag() { result = "ir" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Element tainted |
|
||||
tag = "ir" and
|
||||
irTaint(_, tainted, value) and
|
||||
@@ -27,12 +25,10 @@ class IRGlobalDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
class AstGlobalDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
AstGlobalDefaultTaintTrackingTest() { this = "ASTGlobalDefaultTaintTrackingTest" }
|
||||
module AstGlobalDefaultTaintTrackingTest implements TestSig {
|
||||
string getARelevantTag() { result = "ast" }
|
||||
|
||||
override string getARelevantTag() { result = "ast" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Element tainted |
|
||||
tag = "ast" and
|
||||
astTaint(_, tainted, value) and
|
||||
@@ -41,3 +37,5 @@ class AstGlobalDefaultTaintTrackingTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<IRGlobalDefaultTaintTrackingTest, AstGlobalDefaultTaintTrackingTest>>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -5,12 +5,10 @@ module AstTest {
|
||||
private import semmle.code.cpp.dataflow.DataFlow::DataFlow
|
||||
private import semmle.code.cpp.dataflow.internal.DataFlowPrivate
|
||||
|
||||
class AstMultipleOutNodesTest extends InlineExpectationsTest {
|
||||
AstMultipleOutNodesTest() { this = "AstMultipleOutNodesTest" }
|
||||
module AstMultipleOutNodesTest implements TestSig {
|
||||
string getARelevantTag() { result = "ast-count(" + any(ReturnKind k).toString() + ")" }
|
||||
|
||||
override string getARelevantTag() { result = "ast-count(" + any(ReturnKind k).toString() + ")" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlowCall call, int n, ReturnKind kind |
|
||||
call.getLocation() = location and
|
||||
n = strictcount(getAnOutNode(call, kind)) and
|
||||
@@ -27,12 +25,10 @@ module IRTest {
|
||||
private import semmle.code.cpp.ir.dataflow.DataFlow
|
||||
private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate
|
||||
|
||||
class IRMultipleOutNodesTest extends InlineExpectationsTest {
|
||||
IRMultipleOutNodesTest() { this = "IRMultipleOutNodesTest" }
|
||||
module IRMultipleOutNodesTest implements TestSig {
|
||||
string getARelevantTag() { result = "ir-count(" + any(ReturnKind k).toString() + ")" }
|
||||
|
||||
override string getARelevantTag() { result = "ir-count(" + any(ReturnKind k).toString() + ")" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlowCall call, int n, ReturnKind kind |
|
||||
call.getLocation() = location and
|
||||
n = strictcount(getAnOutNode(call, kind)) and
|
||||
@@ -44,3 +40,5 @@ module IRTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<AstTest::AstMultipleOutNodesTest, IRTest::IRMultipleOutNodesTest>>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -4,12 +4,10 @@ import cpp
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
import semmle.code.cpp.security.FlowSources
|
||||
|
||||
class RemoteFlowSourceTest extends InlineExpectationsTest {
|
||||
RemoteFlowSourceTest() { this = "RemoteFlowSourceTest" }
|
||||
module RemoteFlowSourceTest implements TestSig {
|
||||
string getARelevantTag() { result = "remote_source" }
|
||||
|
||||
override string getARelevantTag() { result = "remote_source" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "remote_source" and
|
||||
exists(RemoteFlowSource node, int n |
|
||||
n =
|
||||
@@ -31,12 +29,10 @@ class RemoteFlowSourceTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
class RemoteFlowSinkTest extends InlineExpectationsTest {
|
||||
RemoteFlowSinkTest() { this = "RemoteFlowSinkTest" }
|
||||
module RemoteFlowSinkTest implements TestSig {
|
||||
string getARelevantTag() { result = "remote_sink" }
|
||||
|
||||
override string getARelevantTag() { result = "remote_sink" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "remote_sink" and
|
||||
exists(RemoteFlowSink node, int n |
|
||||
n =
|
||||
@@ -57,3 +53,5 @@ class RemoteFlowSinkTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<RemoteFlowSourceTest, RemoteFlowSinkTest>>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -12,12 +12,10 @@ import TestUtilities.InlineExpectationsTest
|
||||
module ModulusAnalysisInstantiated =
|
||||
ModulusAnalysis<FloatDelta, ConstantBounds, RangeUtil<FloatDelta, CppLangImplRelative>>;
|
||||
|
||||
class ModulusAnalysisTest extends InlineExpectationsTest {
|
||||
ModulusAnalysisTest() { this = "ModulusAnalysisTest" }
|
||||
module ModulusAnalysisTest implements TestSig {
|
||||
string getARelevantTag() { result = "mod" }
|
||||
|
||||
override string getARelevantTag() { result = "mod" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(SemExpr e, IR::CallInstruction call |
|
||||
getSemanticExpr(call.getArgument(0)) = e and
|
||||
call.getStaticCallTarget().hasName("mod") and
|
||||
@@ -29,6 +27,8 @@ class ModulusAnalysisTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<ModulusAnalysisTest>
|
||||
|
||||
private string getAModString(SemExpr e) {
|
||||
exists(SemBound b, int delta, int mod |
|
||||
ModulusAnalysisInstantiated::semExprModulus(e, b, delta, mod) and
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -21,12 +21,10 @@ module Raw {
|
||||
result = getOperandMemoryLocation(instr.getAnOperand())
|
||||
}
|
||||
|
||||
class RawPointsToTest extends InlineExpectationsTest {
|
||||
RawPointsToTest() { this = "RawPointsToTest" }
|
||||
module RawPointsToTest implements TestSig {
|
||||
string getARelevantTag() { result = "raw" }
|
||||
|
||||
override string getARelevantTag() { result = "raw" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Instruction instr, MemoryLocation memLocation |
|
||||
memLocation = getAMemoryAccess(instr) and
|
||||
tag = "raw" and
|
||||
@@ -49,12 +47,10 @@ module UnaliasedSsa {
|
||||
result = getOperandMemoryLocation(instr.getAnOperand())
|
||||
}
|
||||
|
||||
class UnaliasedSsaPointsToTest extends InlineExpectationsTest {
|
||||
UnaliasedSsaPointsToTest() { this = "UnaliasedSSAPointsToTest" }
|
||||
module UnaliasedSsaPointsToTest implements TestSig {
|
||||
string getARelevantTag() { result = "ussa" }
|
||||
|
||||
override string getARelevantTag() { result = "ussa" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Instruction instr, MemoryLocation memLocation |
|
||||
memLocation = getAMemoryAccess(instr) and
|
||||
not memLocation.getVirtualVariable() instanceof AliasedVirtualVariable and
|
||||
@@ -69,3 +65,5 @@ module UnaliasedSsa {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<MergeTests<Raw::RawPointsToTest, UnaliasedSsa::UnaliasedSsaPointsToTest>>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ import cpp
|
||||
import semmle.code.cpp.rangeanalysis.new.SimpleRangeAnalysis
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class RangeAnalysisTest extends InlineExpectationsTest {
|
||||
RangeAnalysisTest() { this = "RangeAnalysisTest" }
|
||||
module RangeAnalysisTest implements TestSig {
|
||||
string getARelevantTag() { result = "overflow" }
|
||||
|
||||
override string getARelevantTag() { result = "overflow" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Expr e |
|
||||
tag = "overflow" and
|
||||
element = e.toString() and
|
||||
@@ -21,3 +19,5 @@ class RangeAnalysisTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<RangeAnalysisTest>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -5,12 +5,10 @@ import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticExprSpecific
|
||||
import semmle.code.cpp.ir.IR as IR
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class RangeAnalysisTest extends InlineExpectationsTest {
|
||||
RangeAnalysisTest() { this = "RangeAnalysisTest" }
|
||||
module RangeAnalysisTest implements TestSig {
|
||||
string getARelevantTag() { result = "range" }
|
||||
|
||||
override string getARelevantTag() { result = "range" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(SemExpr e, IR::CallInstruction call |
|
||||
getSemanticExpr(call.getArgument(0)) = e and
|
||||
call.getStaticCallTarget().hasName("range") and
|
||||
@@ -22,6 +20,8 @@ class RangeAnalysisTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<RangeAnalysisTest>
|
||||
|
||||
private string getDirectionString(boolean d) {
|
||||
result = "<=" and d = true
|
||||
or
|
||||
|
||||
@@ -59,3 +59,14 @@
|
||||
range(i); // $ range=>=0 SPURIOUS: range="<=call to f3_get-1" range="<=call to f3_get-2"
|
||||
}
|
||||
}
|
||||
|
||||
int f4(int x) {
|
||||
for (int i = 0; i <= 100; i++) {
|
||||
range(i); // $ range=<=100 range=>=0
|
||||
if(i == 100) {
|
||||
range(i); // $ range===100
|
||||
} else {
|
||||
range(i); // $ range=<=99 range=>=0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -11,12 +11,10 @@ import TestUtilities.InlineExpectationsTest
|
||||
module SignAnalysisInstantiated =
|
||||
SignAnalysis<FloatDelta, RangeUtil<FloatDelta, CppLangImplRelative>>;
|
||||
|
||||
class SignAnalysisTest extends InlineExpectationsTest {
|
||||
SignAnalysisTest() { this = "SignAnalysisTest" }
|
||||
module SignAnalysisTest implements TestSig {
|
||||
string getARelevantTag() { result = "sign" }
|
||||
|
||||
override string getARelevantTag() { result = "sign" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(SemExpr e, IR::CallInstruction call |
|
||||
getSemanticExpr(call.getArgument(0)) = e and
|
||||
call.getStaticCallTarget().hasName("sign") and
|
||||
@@ -28,6 +26,8 @@ class SignAnalysisTest extends InlineExpectationsTest {
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<SignAnalysisTest>
|
||||
|
||||
private string getASignString(SemExpr e) {
|
||||
result = strictconcat(SignAnalysisInstantiated::semExprSign(e).toString(), "")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ private import cpp
|
||||
private import semmle.code.cpp.ir.implementation.raw.IR
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class IRTypesTest extends InlineExpectationsTest {
|
||||
IRTypesTest() { this = "IRTypesTest" }
|
||||
module IRTypesTest implements TestSig {
|
||||
string getARelevantTag() { result = "irtype" }
|
||||
|
||||
override string getARelevantTag() { result = "irtype" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(IRUserVariable irVar |
|
||||
location = irVar.getLocation() and
|
||||
element = irVar.toString() and
|
||||
@@ -16,3 +14,5 @@ class IRTypesTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<IRTypesTest>
|
||||
|
||||
@@ -3,7 +3,7 @@ Dapper,55,,,,,,,,,,55,,,,,,,
|
||||
JsonToItemsTaskFactory,,,7,,,,,,,,,,,,,,7,
|
||||
Microsoft.ApplicationBlocks.Data,28,,,,,,,,,,28,,,,,,,
|
||||
Microsoft.CSharp,,,24,,,,,,,,,,,,,,24,
|
||||
Microsoft.EntityFrameworkCore,6,,,,,,,,,,6,,,,,,,
|
||||
Microsoft.EntityFrameworkCore,6,,12,,,,,,,,6,,,,,,,12
|
||||
Microsoft.Extensions.Caching.Distributed,,,15,,,,,,,,,,,,,,15,
|
||||
Microsoft.Extensions.Caching.Memory,,,46,,,,,,,,,,,,,,45,1
|
||||
Microsoft.Extensions.Configuration,,,83,,,,,,,,,,,,,,80,3
|
||||
@@ -24,5 +24,5 @@ Microsoft.Win32,,,8,,,,,,,,,,,,,,8,
|
||||
MySql.Data.MySqlClient,48,,,,,,,,,,48,,,,,,,
|
||||
Newtonsoft.Json,,,91,,,,,,,,,,,,,,73,18
|
||||
ServiceStack,194,,7,27,,,,,,75,92,,,,,,7,
|
||||
System,65,25,12154,,8,8,9,,4,,33,3,1,17,3,4,10163,1991
|
||||
System,65,25,12157,,8,8,9,,4,,33,3,1,17,3,4,10163,1994
|
||||
Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,
|
||||
|
||||
|
@@ -8,7 +8,7 @@ C# framework & library support
|
||||
|
||||
Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting`
|
||||
`ServiceStack <https://servicestack.net/>`_,"``ServiceStack.*``, ``ServiceStack``",,7,194,
|
||||
System,"``System.*``, ``System``",25,12154,65,7
|
||||
Others,"``Dapper``, ``JsonToItemsTaskFactory``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NETCore.Platforms.BuildTasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``Windows.Security.Cryptography.Core``",,556,138,
|
||||
Totals,,25,12717,397,7
|
||||
System,"``System.*``, ``System``",25,12157,65,7
|
||||
Others,"``Dapper``, ``JsonToItemsTaskFactory``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NETCore.Platforms.BuildTasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``Windows.Security.Cryptography.Core``",,568,138,
|
||||
Totals,,25,12732,397,7
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ at the places where it is called.
|
||||
``pragma[inline_late]``
|
||||
-----------------------
|
||||
|
||||
**Available for**: |non-member predicates|
|
||||
**Available for**: |characteristic predicates|, |member predicates|, |non-member predicates|
|
||||
|
||||
The ``pragma[inline_late]`` annotation must be used in conjunction with a
|
||||
``bindingset[...]`` pragma. Together, they tell the QL optimiser to use the
|
||||
|
||||
@@ -738,7 +738,7 @@ The parameterized annotation ``pragma`` supplies compiler pragmas, and may be ap
|
||||
+===========================+=========+============+===================+=======================+=========+========+=========+=========+
|
||||
| ``inline`` | | yes | yes | yes | | | | |
|
||||
+---------------------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
|
||||
| ``inline_late`` | | | | yes | | | | |
|
||||
| ``inline_late`` | | yes | yes | yes | | | | |
|
||||
+---------------------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
|
||||
| ``noinline`` | | yes | yes | yes | | | | |
|
||||
+---------------------------+---------+------------+-------------------+-----------------------+---------+--------+---------+---------+
|
||||
|
||||
@@ -54,7 +54,7 @@ java.beans,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,
|
||||
java.io,44,,45,,18,,,,,,,,,,,,,,,4,,,,,,,,,,,,22,,,,,,,,43,2
|
||||
java.lang,18,,92,,,,,,,,,,,,8,,,,,5,,4,,,1,,,,,,,,,,,,,,,56,36
|
||||
java.net,13,3,20,,,,,,,,,,,,,,,13,,,,,,,,,,,,,,,,,,,,,3,20,
|
||||
java.nio,36,,31,,21,,,,,,,,,,,,,,,12,,,,,,,,,,,,3,,,,,,,,31,
|
||||
java.nio,38,,31,,22,,,,,,,,,,,,,,,13,,,,,,,,,,,,3,,,,,,,,31,
|
||||
java.sql,13,,3,,,,,,,,4,,,,,,,,,,,,,,,,,,9,,,,,,,,,,,2,1
|
||||
java.util,44,,484,,,,,,,,,,,,34,,,,,,,,5,2,,1,2,,,,,,,,,,,,,44,440
|
||||
javafx.scene.web,1,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,
|
||||
|
||||
|
@@ -18,10 +18,10 @@ Java framework & library support
|
||||
`Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,41,2,,,,,
|
||||
JBoss Logging,``org.jboss.logging``,,,324,,,,,,
|
||||
`JSON-java <https://github.com/stleary/JSON-java>`_,``org.json``,,236,,,,,,,
|
||||
Java Standard Library,``java.*``,3,679,168,39,,9,,,13
|
||||
Java Standard Library,``java.*``,3,679,170,40,,9,,,13
|
||||
Java extensions,"``javax.*``, ``jakarta.*``",63,611,34,1,4,,1,1,2
|
||||
Kotlin Standard Library,``kotlin*``,,1843,16,11,,,,,2
|
||||
`Spring <https://spring.io/>`_,``org.springframework.*``,29,483,113,2,,28,14,,29
|
||||
Others,"``cn.hutool.core.codec``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.hubspot.jinjava``, ``com.mitchellbosecke.pebble``, ``com.opensymphony.xwork2.ognl``, ``com.rabbitmq.client``, ``com.thoughtworks.xstream``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.text``, ``groovy.util``, ``hudson``, ``io.jsonwebtoken``, ``io.netty.bootstrap``, ``io.netty.buffer``, ``io.netty.channel``, ``io.netty.handler.codec``, ``io.netty.handler.ssl``, ``io.netty.handler.stream``, ``io.netty.resolver``, ``io.netty.util``, ``javafx.scene.web``, ``jodd.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.eclipse.jetty.client``, ``org.geogebra.web.full.main``, ``org.hibernate``, ``org.jdbi.v3.core``, ``org.jooq``, ``org.kohsuke.stapler``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``",89,827,516,26,,18,18,,181
|
||||
Totals,,246,9119,1967,174,10,122,33,1,361
|
||||
Totals,,246,9119,1969,175,10,122,33,1,361
|
||||
|
||||
|
||||
BIN
ql/Cargo.lock
generated
BIN
ql/Cargo.lock
generated
Binary file not shown.
@@ -9,4 +9,4 @@ edition = "2018"
|
||||
lazy_static = "1.4.0"
|
||||
chrono = "0.4.24"
|
||||
rayon = "1.7.0"
|
||||
regex = "1.8.2"
|
||||
regex = "1.8.3"
|
||||
|
||||
@@ -16,5 +16,5 @@ clap = { version = "4.2", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
||||
rayon = "1.7.0"
|
||||
regex = "1.8.2"
|
||||
regex = "1.8.3"
|
||||
codeql-extractor = { path = "../../shared/tree-sitter-extractor" }
|
||||
|
||||
@@ -26,6 +26,7 @@ runs:
|
||||
--check-repeated-labels \
|
||||
--check-redefined-labels \
|
||||
--check-use-before-definition \
|
||||
--consistency-queries "${{ github.workspace }}/swift/ql/consistency-queries" \
|
||||
--compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" \
|
||||
${{ inputs.flags }} \
|
||||
swift/ql/test
|
||||
|
||||
1
swift/ql/consistency-queries/PrintAstConsistency.ql
Normal file
1
swift/ql/consistency-queries/PrintAstConsistency.ql
Normal file
@@ -0,0 +1 @@
|
||||
import codeql.swift.printast.Consistency
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: newQuery
|
||||
---
|
||||
* Added two consistency queries for checking control flow and AST printing internals.
|
||||
4
swift/ql/consistency-queries/qlpack.yml
Normal file
4
swift/ql/consistency-queries/qlpack.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
name: codeql/swift-consistency-queries
|
||||
groups: [swift, test, consistency-queries]
|
||||
dependencies:
|
||||
codeql/swift-all: ${workspace}
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Some models for the `Data` class have been generalized to `DataProtocol` so that they apply more widely.
|
||||
@@ -26,9 +26,9 @@ private class DataSummaries extends SummaryModelCsv {
|
||||
";Data;true;base64EncodedData(options:);;;Argument[-1];ReturnValue;taint",
|
||||
";Data;true;base64EncodedString(options:);;;Argument[-1];ReturnValue;taint",
|
||||
";Data;true;compactMap(_:);;;Argument[-1];ReturnValue;taint",
|
||||
";Data;true;copyBytes(to:);;;Argument[-1];Argument[0];taint",
|
||||
";Data;true;copyBytes(to:count:);;;Argument[-1];Argument[0];taint",
|
||||
";Data;true;copyBytes(to:from:);;;Argument[-1];Argument[0];taint",
|
||||
";DataProtocol;true;copyBytes(to:);;;Argument[-1];Argument[0];taint",
|
||||
";DataProtocol;true;copyBytes(to:count:);;;Argument[-1];Argument[0];taint",
|
||||
";DataProtocol;true;copyBytes(to:from:);;;Argument[-1];Argument[0];taint",
|
||||
";Data;true;flatMap(_:);;;Argument[-1];ReturnValue;taint",
|
||||
";Data;true;insert(contentsOf:at:);;;Argument[0];Argument[-1];taint",
|
||||
";Data;true;map(_:);;;Argument[-1];ReturnValue;taint",
|
||||
|
||||
40
swift/ql/lib/codeql/swift/printast/Consistency.qll
Normal file
40
swift/ql/lib/codeql/swift/printast/Consistency.qll
Normal file
@@ -0,0 +1,40 @@
|
||||
/** Provides a set of checks that the AST is actually a tree. */
|
||||
|
||||
private import codeql.swift.printast.PrintAstNode
|
||||
|
||||
/** Checks that no child has more than one parent. */
|
||||
query predicate doubleParents(
|
||||
PrintAstNode parent1, string label1, PrintAstNode parent2, string label2, PrintAstNode child
|
||||
) {
|
||||
parent1 != parent2 and
|
||||
parent1.hasChild(child, _, label1) and
|
||||
parent2.hasChild(child, _, label2)
|
||||
}
|
||||
|
||||
/** Checks that no two children share the same index. */
|
||||
query predicate doubleChildren(
|
||||
PrintAstNode parent, int index, string label1, PrintAstNode child1, string label2,
|
||||
PrintAstNode child2
|
||||
) {
|
||||
child1 != child2 and
|
||||
parent.hasChild(child1, index, label1) and
|
||||
parent.hasChild(child2, index, label2)
|
||||
}
|
||||
|
||||
/** Checks that no child is under different indexes. */
|
||||
query predicate doubleIndexes(
|
||||
PrintAstNode parent, int index1, string label1, int index2, string label2, PrintAstNode child
|
||||
) {
|
||||
index1 != index2 and
|
||||
parent.hasChild(child, index1, label1) and
|
||||
parent.hasChild(child, index2, label2)
|
||||
}
|
||||
|
||||
private predicate isChildOf(PrintAstNode parent, PrintAstNode child) {
|
||||
parent.hasChild(child, _, _)
|
||||
}
|
||||
|
||||
/** Checks that there is no back edge. */
|
||||
query predicate parentChildLoops(PrintAstNode parent, PrintAstNode child) {
|
||||
isChildOf(parent, child) and isChildOf*(child, parent)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,5 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| unspecified.swift:12:20:12:21 | (...) |
|
||||
| unspecified.swift:25:9:28:9 | switch ErrorExpr { ... } |
|
||||
@@ -0,0 +1,2 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,14 @@
|
||||
multipleSuccessors
|
||||
| var_decls.swift:54:4:54:15 | call to X<T>.init(wrappedValue:) | successor | file://:0:0:0:0 | var ... = ... |
|
||||
| var_decls.swift:54:4:54:15 | call to X<T>.init(wrappedValue:) | successor | var_decls.swift:54:6:54:15 | var ... = ... |
|
||||
| var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | successor | file://:0:0:0:0 | var ... = ... |
|
||||
| var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | successor | var_decls.swift:55:20:55:29 | var ... = ... |
|
||||
| var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | successor | file://:0:0:0:0 | var ... = ... |
|
||||
| var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | successor | var_decls.swift:56:25:56:34 | var ... = ... |
|
||||
| var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | successor | file://:0:0:0:0 | var ... = ... |
|
||||
| var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | successor | var_decls.swift:57:32:57:41 | var ... = ... |
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | var ... = ... |
|
||||
| file://:0:0:0:0 | var ... = ... |
|
||||
| file://:0:0:0:0 | var ... = ... |
|
||||
| file://:0:0:0:0 | var ... = ... |
|
||||
@@ -0,0 +1,13 @@
|
||||
doubleParents
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:54:6:54:15 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:54:4:54:15 | [CallExpr] call to X<T>.init(wrappedValue:) |
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:55:20:55:29 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:55:4:55:29 | [CallExpr] call to WrapperWithInit.init(wrappedValue:) |
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:56:25:56:34 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:56:4:56:34 | [CallExpr] call to WrapperWithProjected.init(wrappedValue:projectedValue:) |
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:57:32:57:41 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:57:4:57:41 | [CallExpr] call to WrapperWithProjectedAndInit.init(wrappedValue:) |
|
||||
| var_decls.swift:23:1:25:1 | [StructDecl] Wrapped | getMember(2) | var_decls.swift:24:15:24:15 | [ConcreteVarDecl] wrapped | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| var_decls.swift:23:1:25:1 | [StructDecl] Wrapped | getMember(3) | var_decls.swift:24:15:24:15 | [ConcreteVarDecl] wrapped | getPropertyWrapperBackingVar() | var_decls.swift:24:15:24:15 | [ConcreteVarDecl] _wrapped |
|
||||
| var_decls.swift:24:15:24:15 | [ConcreteVarDecl] wrapped | getPropertyWrapperBackingVar() | var_decls.swift:23:1:25:1 | [StructDecl] Wrapped | getMember(3) | var_decls.swift:24:15:24:15 | [ConcreteVarDecl] _wrapped |
|
||||
| var_decls.swift:24:15:24:15 | [ConcreteVarDecl] wrapped | getPropertyWrapperBackingVarBinding() | var_decls.swift:23:1:25:1 | [StructDecl] Wrapped | getMember(2) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| var_decls.swift:54:6:54:15 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:54:4:54:15 | [CallExpr] call to X<T>.init(wrappedValue:) |
|
||||
| var_decls.swift:55:20:55:29 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:55:4:55:29 | [CallExpr] call to WrapperWithInit.init(wrappedValue:) |
|
||||
| var_decls.swift:56:25:56:34 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:56:4:56:34 | [CallExpr] call to WrapperWithProjected.init(wrappedValue:projectedValue:) |
|
||||
| var_decls.swift:57:32:57:41 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | var_decls.swift:57:4:57:41 | [CallExpr] call to WrapperWithProjectedAndInit.init(wrappedValue:) |
|
||||
@@ -0,0 +1,6 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,21 @@
|
||||
doubleParents
|
||||
| param_decls.swift:48:18:48:18 | [ConcreteVarDecl] p1 | getPropertyWrapperBackingVar() | param_decls.swift:48:18:48:22 | [ParamDecl] p1 | getPropertyWrapperBackingVar() | param_decls.swift:48:18:48:18 | [ConcreteVarDecl] _p1 |
|
||||
| param_decls.swift:48:18:48:18 | [ConcreteVarDecl] p1 | getPropertyWrapperBackingVarBinding() | param_decls.swift:48:18:48:22 | [ParamDecl] p1 | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:48:18:48:22 | [ParamDecl] p1 | getPropertyWrapperBackingVar() | param_decls.swift:48:18:48:18 | [ConcreteVarDecl] p1 | getPropertyWrapperBackingVar() | param_decls.swift:48:18:48:18 | [ConcreteVarDecl] _p1 |
|
||||
| param_decls.swift:48:18:48:22 | [ParamDecl] p1 | getPropertyWrapperBackingVarBinding() | param_decls.swift:48:18:48:18 | [ConcreteVarDecl] p1 | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:49:26:49:26 | [ConcreteVarDecl] p2 | getPropertyWrapperBackingVar() | param_decls.swift:49:26:49:30 | [ParamDecl] p2 | getPropertyWrapperBackingVar() | param_decls.swift:49:26:49:26 | [ConcreteVarDecl] _p2 |
|
||||
| param_decls.swift:49:26:49:26 | [ConcreteVarDecl] p2 | getPropertyWrapperBackingVarBinding() | param_decls.swift:49:26:49:30 | [ParamDecl] p2 | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:49:26:49:30 | [ParamDecl] p2 | getPropertyWrapperBackingVar() | param_decls.swift:49:26:49:26 | [ConcreteVarDecl] p2 | getPropertyWrapperBackingVar() | param_decls.swift:49:26:49:26 | [ConcreteVarDecl] _p2 |
|
||||
| param_decls.swift:49:26:49:30 | [ParamDecl] p2 | getPropertyWrapperBackingVarBinding() | param_decls.swift:49:26:49:26 | [ConcreteVarDecl] p2 | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperBackingVar() | param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _p3 |
|
||||
| param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperProjectionVar() | param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperProjectionVar() | param_decls.swift:50:31:50:31 | [ConcreteVarDecl] $p3 |
|
||||
| param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperProjectionVarBinding() | param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperBackingVar() | param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _p3 |
|
||||
| param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperProjectionVar() | param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperProjectionVar() | param_decls.swift:50:31:50:31 | [ConcreteVarDecl] $p3 |
|
||||
| param_decls.swift:50:31:50:35 | [ParamDecl] p3 | getPropertyWrapperProjectionVarBinding() | param_decls.swift:50:31:50:31 | [ConcreteVarDecl] p3 | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperBackingVar() | param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _p4 |
|
||||
| param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperProjectionVar() | param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperProjectionVar() | param_decls.swift:51:38:51:38 | [ConcreteVarDecl] $p4 |
|
||||
| param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperProjectionVarBinding() | param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperBackingVar() | param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _p4 |
|
||||
| param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperProjectionVar() | param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperProjectionVar() | param_decls.swift:51:38:51:38 | [ConcreteVarDecl] $p4 |
|
||||
| param_decls.swift:51:38:51:42 | [ParamDecl] p4 | getPropertyWrapperProjectionVarBinding() | param_decls.swift:51:38:51:38 | [ConcreteVarDecl] p4 | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
@@ -0,0 +1,13 @@
|
||||
doubleParents
|
||||
| applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperBackingVar() | applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _x |
|
||||
| applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] $x |
|
||||
| applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperProjectionVarBinding() | applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperBackingVar() | applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _x |
|
||||
| applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] $x |
|
||||
| applied_property_wrapper.swift:12:19:12:22 | [ParamDecl] x | getPropertyWrapperProjectionVarBinding() | applied_property_wrapper.swift:12:19:12:19 | [ConcreteVarDecl] x | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperBackingVar() | applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _y |
|
||||
| applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] $y |
|
||||
| applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperProjectionVarBinding() | applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperBackingVar() | applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperBackingVar() | file://:0:0:0:0 | [ParamDecl] _y |
|
||||
| applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperProjectionVar() | applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] $y |
|
||||
| applied_property_wrapper.swift:17:26:17:29 | [ParamDecl] y | getPropertyWrapperProjectionVarBinding() | applied_property_wrapper.swift:17:26:17:26 | [ConcreteVarDecl] y | getPropertyWrapperProjectionVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
@@ -0,0 +1,5 @@
|
||||
doubleParents
|
||||
| dynamic_lookup.swift:15:1:15:3 | [DynamicMemberRefExpr] .foo(_:) | getBase() | dynamic_lookup.swift:15:1:15:3 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | dynamic_lookup.swift:15:1:15:1 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| dynamic_lookup.swift:15:1:15:3 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | dynamic_lookup.swift:15:1:15:3 | [DynamicMemberRefExpr] .foo(_:) | getBase() | dynamic_lookup.swift:15:1:15:1 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| dynamic_lookup.swift:16:5:16:9 | [DynamicSubscriptExpr] subscript ...[...] | getBase() | dynamic_lookup.swift:16:5:16:9 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | dynamic_lookup.swift:16:5:16:5 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| dynamic_lookup.swift:16:5:16:9 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | dynamic_lookup.swift:16:5:16:9 | [DynamicSubscriptExpr] subscript ...[...] | getBase() | dynamic_lookup.swift:16:5:16:5 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
@@ -0,0 +1,14 @@
|
||||
multipleSuccessors
|
||||
| method_lookups.swift:42:9:42:19 | call to baz(_:) | successor | method_lookups.swift:42:3:42:19 | await ... |
|
||||
| method_lookups.swift:42:9:42:19 | call to baz(_:) | successor | method_lookups.swift:44:7:44:7 | f |
|
||||
| method_lookups.swift:48:9:48:19 | call to foo(_:_:) | successor | method_lookups.swift:48:3:48:19 | await ... |
|
||||
| method_lookups.swift:48:9:48:19 | call to foo(_:_:) | successor | method_lookups.swift:49:9:49:11 | .bar() |
|
||||
| method_lookups.swift:49:9:49:15 | call to bar() | successor | method_lookups.swift:49:3:49:15 | await ... |
|
||||
| method_lookups.swift:49:9:49:15 | call to bar() | successor | method_lookups.swift:50:9:50:13 | .baz(_:) |
|
||||
| method_lookups.swift:50:9:50:19 | call to baz(_:) | successor | method_lookups.swift:50:3:50:19 | await ... |
|
||||
| method_lookups.swift:50:9:50:19 | call to baz(_:) | successor | method_lookups.swift:52:7:52:7 | f |
|
||||
deadEnd
|
||||
| method_lookups.swift:42:3:42:19 | await ... |
|
||||
| method_lookups.swift:48:3:48:19 | await ... |
|
||||
| method_lookups.swift:49:3:49:15 | await ... |
|
||||
| method_lookups.swift:50:3:50:19 | await ... |
|
||||
@@ -0,0 +1,3 @@
|
||||
doubleIndexes
|
||||
| method_lookups.swift:44:13:44:13 | [AutoClosureExpr] { ... } | 2 | getParam(0) | 4 | getParam(1) | file://:0:0:0:0 | [ParamDecl] argument |
|
||||
| method_lookups.swift:44:13:44:13 | [AutoClosureExpr] { ... } | 4 | getParam(1) | 2 | getParam(0) | file://:0:0:0:0 | [ParamDecl] argument |
|
||||
@@ -0,0 +1,7 @@
|
||||
doubleParents
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | property_wrapper_value_placeholder.swift:12:12:12:26 | [PatternBindingDecl] var ... = ... | getInit(0) | property_wrapper_value_placeholder.swift:12:4:12:26 | [CallExpr] call to Wrapper.init(wrappedValue:) |
|
||||
| property_wrapper_value_placeholder.swift:11:1:13:1 | [StructDecl] S | getMember(2) | property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] x | getPropertyWrapperBackingVarBinding() | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
| property_wrapper_value_placeholder.swift:11:1:13:1 | [StructDecl] S | getMember(3) | property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] x | getPropertyWrapperBackingVar() | property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] _x |
|
||||
| property_wrapper_value_placeholder.swift:12:12:12:26 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | property_wrapper_value_placeholder.swift:12:4:12:26 | [CallExpr] call to Wrapper.init(wrappedValue:) |
|
||||
| property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] x | getPropertyWrapperBackingVar() | property_wrapper_value_placeholder.swift:11:1:13:1 | [StructDecl] S | getMember(3) | property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] _x |
|
||||
| property_wrapper_value_placeholder.swift:12:16:12:16 | [ConcreteVarDecl] x | getPropertyWrapperBackingVarBinding() | property_wrapper_value_placeholder.swift:11:1:13:1 | [StructDecl] S | getMember(2) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... |
|
||||
@@ -0,0 +1,3 @@
|
||||
doubleParents
|
||||
| opened_archetypes.swift:24:10:24:16 | [MemberRefExpr] .isFooMember | getBase() | opened_archetypes.swift:24:10:24:16 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | opened_archetypes.swift:24:10:24:10 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| opened_archetypes.swift:24:10:24:16 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | opened_archetypes.swift:24:10:24:16 | [MemberRefExpr] .isFooMember | getBase() | opened_archetypes.swift:24:10:24:10 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
@@ -0,0 +1,2 @@
|
||||
deadEnd
|
||||
| patterns.swift:16:10:16:14 | =~ ... |
|
||||
@@ -0,0 +1,2 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,24 @@
|
||||
multipleSuccessors
|
||||
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:33:49:33:60 | call to isZero(x:) |
|
||||
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:35:5:37:3 | case ... |
|
||||
| cfg.swift:144:10:144:10 | =~ ... | no-match | cfg.swift:144:18:144:34 | ... .&&(_:_:) ... |
|
||||
| cfg.swift:144:10:144:10 | =~ ... | no-match | cfg.swift:146:5:147:14 | case ... |
|
||||
| cfg.swift:515:6:515:28 | #available | false | cfg.swift:515:42:515:46 | iOS 12 |
|
||||
| cfg.swift:515:6:515:28 | #available | false | cfg.swift:519:10:519:10 | x |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:40:11:40:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:40:12:40:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:10:263:10 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:11:263:11 | .appendLiteral(_:) |
|
||||
deadEnd
|
||||
| cfg.swift:33:49:33:60 | call to isZero(x:) |
|
||||
| cfg.swift:144:18:144:34 | ... .&&(_:_:) ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| patterns.swift:16:10:16:14 | =~ ... |
|
||||
@@ -1,8 +0,0 @@
|
||||
private import codeql.swift.printast.PrintAstNode
|
||||
|
||||
from PrintAstNode parent, int index, PrintAstNode child1, PrintAstNode child2
|
||||
where
|
||||
child1 != child2 and
|
||||
parent.hasChild(child1, index, _) and
|
||||
parent.hasChild(child2, index, _)
|
||||
select parent, index, child1, child2
|
||||
@@ -1,8 +0,0 @@
|
||||
private import codeql.swift.printast.PrintAstNode
|
||||
|
||||
from PrintAstNode parent, int index1, int index2, PrintAstNode child
|
||||
where
|
||||
index1 != index2 and
|
||||
parent.hasChild(child, index1, _) and
|
||||
parent.hasChild(child, index2, _)
|
||||
select parent, child, index1, index2
|
||||
@@ -1,8 +0,0 @@
|
||||
private import codeql.swift.printast.PrintAstNode
|
||||
|
||||
from PrintAstNode parent1, PrintAstNode parent2, PrintAstNode child
|
||||
where
|
||||
parent1 != parent2 and
|
||||
parent1.hasChild(child, _, _) and
|
||||
parent2.hasChild(child, _, _)
|
||||
select parent1, parent2, child
|
||||
@@ -1,7 +0,0 @@
|
||||
private import codeql.swift.printast.PrintAstNode
|
||||
|
||||
predicate isChildOf(PrintAstNode parent, PrintAstNode child) { parent.hasChild(child, _, _) }
|
||||
|
||||
from PrintAstNode parent, PrintAstNode child
|
||||
where isChildOf(parent, child) and isChildOf*(child, parent)
|
||||
select parent, child
|
||||
@@ -1,8 +1,3 @@
|
||||
nonUniqueSetRepresentation
|
||||
breakInvariant2
|
||||
breakInvariant3
|
||||
breakInvariant4
|
||||
breakInvariant5
|
||||
multipleSuccessors
|
||||
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:33:49:33:60 | call to isZero(x:) |
|
||||
| cfg.swift:33:28:33:28 | ... is ... | no-match | cfg.swift:35:5:37:3 | case ... |
|
||||
@@ -14,11 +9,8 @@ multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:40:12:40:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:10:263:10 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cfg.swift:263:11:263:11 | .appendLiteral(_:) |
|
||||
simpleAndNormalSuccessors
|
||||
deadEnd
|
||||
| cfg.swift:33:49:33:60 | call to isZero(x:) |
|
||||
| cfg.swift:144:18:144:34 | ... .&&(_:_:) ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
nonUniqueSplitKind
|
||||
nonUniqueListOrder
|
||||
@@ -0,0 +1,7 @@
|
||||
multipleSuccessors
|
||||
| test.swift:252:6:252:27 | call to DidSetSource.init(wrappedValue:) | successor | file://:0:0:0:0 | var ... = ... |
|
||||
| test.swift:252:6:252:27 | call to DidSetSource.init(wrappedValue:) | successor | test.swift:252:19:252:27 | var ... = ... |
|
||||
| test.swift:488:8:488:12 | let ...? | no-match | test.swift:488:27:488:27 | y |
|
||||
| test.swift:488:8:488:12 | let ...? | no-match | test.swift:493:9:493:9 | tuple1 |
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | var ... = ... |
|
||||
@@ -0,0 +1,3 @@
|
||||
doubleParents
|
||||
| file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | test.swift:252:19:252:27 | [PatternBindingDecl] var ... = ... | getInit(0) | test.swift:252:6:252:27 | [CallExpr] call to DidSetSource.init(wrappedValue:) |
|
||||
| test.swift:252:19:252:27 | [PatternBindingDecl] var ... = ... | getInit(0) | file://:0:0:0:0 | [PatternBindingDecl] var ... = ... | getInit(0) | test.swift:252:6:252:27 | [CallExpr] call to DidSetSource.init(wrappedValue:) |
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ import swift
|
||||
import FlowConfig
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class TaintTest extends InlineExpectationsTest {
|
||||
TaintTest() { this = "DataFlowTest" }
|
||||
module TaintTest implements TestSig {
|
||||
string getARelevantTag() { result = "flow" }
|
||||
|
||||
override string getARelevantTag() { result = "flow" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr |
|
||||
TestFlow::flow(source, sink) and
|
||||
sinkExpr = sink.asExpr() and
|
||||
@@ -18,3 +16,5 @@ class TaintTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<TaintTest>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
doubleParents
|
||||
| generics.swift:93:9:93:15 | [MemberRefExpr] .source0 | getBase() | generics.swift:93:9:93:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:93:9:93:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:93:9:93:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:93:9:93:15 | [MemberRefExpr] .source0 | getBase() | generics.swift:93:9:93:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:94:9:94:15 | [MemberRefExpr] .source1 | getBase() | generics.swift:94:9:94:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:94:9:94:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:94:9:94:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:94:9:94:15 | [MemberRefExpr] .source1 | getBase() | generics.swift:94:9:94:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:95:9:95:15 | [MemberRefExpr] .source2 | getBase() | generics.swift:95:9:95:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:95:9:95:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:95:9:95:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:95:9:95:15 | [MemberRefExpr] .source2 | getBase() | generics.swift:95:9:95:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:125:9:125:15 | [MemberRefExpr] .source0 | getBase() | generics.swift:125:9:125:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:125:9:125:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:125:9:125:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:125:9:125:15 | [MemberRefExpr] .source0 | getBase() | generics.swift:125:9:125:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:126:9:126:15 | [MemberRefExpr] .source1 | getBase() | generics.swift:126:9:126:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:126:9:126:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:126:9:126:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:126:9:126:15 | [MemberRefExpr] .source1 | getBase() | generics.swift:126:9:126:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:127:9:127:15 | [MemberRefExpr] .source2 | getBase() | generics.swift:127:9:127:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:127:9:127:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| generics.swift:127:9:127:15 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | generics.swift:127:9:127:15 | [MemberRefExpr] .source2 | getBase() | generics.swift:127:9:127:9 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -8,12 +8,10 @@ string describe(FlowSource source) {
|
||||
source instanceof LocalFlowSource and result = "local"
|
||||
}
|
||||
|
||||
class FlowSourcesTest extends InlineExpectationsTest {
|
||||
FlowSourcesTest() { this = "FlowSourcesTest" }
|
||||
module FlowSourcesTest implements TestSig {
|
||||
string getARelevantTag() { result = "source" }
|
||||
|
||||
override string getARelevantTag() { result = "source" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(FlowSource source |
|
||||
location = source.getLocation() and
|
||||
location.getFile().getBaseName() != "" and
|
||||
@@ -23,3 +21,5 @@ class FlowSourcesTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<FlowSourcesTest>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:13:23:13:23 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:13:24:13:24 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:22:12:22:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:22:13:22:13 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:23:12:23:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:23:13:23:13 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:24:12:24:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:24:13:24:13 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:30:12:30:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:30:13:30:13 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:31:12:31:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:31:13:31:13 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:32:12:32:12 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | stringinterpolation.swift:32:13:32:13 | .appendLiteral(_:) |
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ import swift
|
||||
import Taint
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class TaintTest extends InlineExpectationsTest {
|
||||
TaintTest() { this = "TaintTest" }
|
||||
module TaintTest implements TestSig {
|
||||
string getARelevantTag() { result = "tainted" }
|
||||
|
||||
override string getARelevantTag() { result = "tainted" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr |
|
||||
TestFlow::flow(source, sink) and
|
||||
sinkExpr = sink.asExpr() and
|
||||
@@ -18,3 +16,5 @@ class TaintTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<TaintTest>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:139:13:139:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:139:14:139:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:141:13:141:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:141:14:141:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:143:13:143:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:143:14:143:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:147:13:147:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:147:14:147:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:149:13:149:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:149:14:149:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:151:13:151:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:151:14:151:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:154:13:154:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | string.swift:154:14:154:14 | .appendLiteral(_:) |
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ import swift
|
||||
import Taint
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class TaintTest extends InlineExpectationsTest {
|
||||
TaintTest() { this = "TaintTest" }
|
||||
module TaintTest implements TestSig {
|
||||
string getARelevantTag() { result = "tainted" }
|
||||
|
||||
override string getARelevantTag() { result = "tainted" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr |
|
||||
TestFlow::flow(source, sink) and
|
||||
sinkExpr = sink.asExpr() and
|
||||
@@ -18,3 +16,5 @@ class TaintTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<TaintTest>
|
||||
|
||||
@@ -7,7 +7,19 @@ protocol SortComparator {
|
||||
associatedtype Compared
|
||||
}
|
||||
|
||||
struct Data : RangeReplaceableCollection
|
||||
protocol DataProtocol {
|
||||
}
|
||||
extension DataProtocol {
|
||||
func copyBytes(to: UnsafeMutableRawBufferPointer) {}
|
||||
func copyBytes(to: UnsafeMutablePointer<UInt8>, count: Int) {}
|
||||
func copyBytes(to: UnsafeMutablePointer<UInt8>, from: Range<Data.Index>) {}
|
||||
}
|
||||
extension UnsafeRawBufferPointer : DataProtocol { }
|
||||
extension Array : DataProtocol where Element == UInt8 { }
|
||||
|
||||
protocol MutableDataProtocol : DataProtocol, RangeReplaceableCollection { }
|
||||
|
||||
struct Data : MutableDataProtocol
|
||||
{
|
||||
struct Base64EncodingOptions : OptionSet { let rawValue: Int }
|
||||
struct Base64DecodingOptions : OptionSet { let rawValue: Int }
|
||||
@@ -82,182 +94,193 @@ func taintThroughData() {
|
||||
let dataTainted2 = Data(dataTainted)
|
||||
|
||||
sink(arg: dataClean)
|
||||
sink(arg: dataTainted) // $ tainted=81
|
||||
sink(arg: dataTainted2) // $ tainted=81
|
||||
sink(arg: dataTainted) // $ tainted=93
|
||||
sink(arg: dataTainted2) // $ tainted=93
|
||||
|
||||
// ";Data;true;init(base64Encoded:options:);;;Argument[0];ReturnValue;taint",
|
||||
let dataTainted3 = Data(base64Encoded: source() as! Data, options: [])
|
||||
sink(arg: dataTainted3) // $ tainted=89
|
||||
sink(arg: dataTainted3) // $ tainted=101
|
||||
|
||||
// ";Data;true;init(buffer:);;;Argument[0];ReturnValue;taint",
|
||||
let dataTainted4 = Data(buffer: source() as! UnsafeBufferPointer<UInt8>)
|
||||
sink(arg: dataTainted4) // $ tainted=93
|
||||
sink(arg: dataTainted4) // $ tainted=105
|
||||
let dataTainted5 = Data(buffer: source() as! UnsafeMutablePointer<UInt8>)
|
||||
sink(arg: dataTainted5) // $ tainted=95
|
||||
sink(arg: dataTainted5) // $ tainted=107
|
||||
|
||||
// ";Data;true;init(bytes:count:);;;Argument[0];ReturnValue;taint",
|
||||
let dataTainted6 = Data(bytes: source() as! UnsafeRawPointer, count: 0)
|
||||
sink(arg: dataTainted6) // $ tainted=99
|
||||
sink(arg: dataTainted6) // $ tainted=111
|
||||
|
||||
// ";Data;true;init(bytesNoCopy:count:deallocator:);;;Argument[0];ReturnValue;taint",
|
||||
let dataTainted7 = Data(bytesNoCopy: source() as! UnsafeRawPointer, count: 0, deallocator: Data.Deallocator.none)
|
||||
sink(arg: dataTainted7) // $ tainted=103
|
||||
sink(arg: dataTainted7) // $ tainted=115
|
||||
|
||||
// ";Data;true;init(contentsOf:options:);;;Argument[0];ReturnValue;taint",
|
||||
let urlTainted8 = source() as! URL
|
||||
let dataTainted8 = Data(contentsOf: urlTainted8, options: [])
|
||||
sink(arg: dataTainted8) // $ tainted=107
|
||||
sink(arg: dataTainted8) // $ tainted=119
|
||||
|
||||
// ";Data;true;init(referencing:);;;Argument[0];ReturnValue;taint",
|
||||
let dataTainted9 = Data(referencing: source() as! NSData)
|
||||
sink(arg: dataTainted9) // $ tainted=112
|
||||
sink(arg: dataTainted9) // $ tainted=124
|
||||
|
||||
// ";Data;true;append(_:);;;Argument[0];Argument[-1];taint",
|
||||
let dataTainted10 = Data("")
|
||||
dataTainted10.append(source() as! Data)
|
||||
sink(arg: dataTainted10) // $ tainted=117
|
||||
sink(arg: dataTainted10) // $ tainted=129
|
||||
|
||||
let dataTainted11 = Data("")
|
||||
dataTainted11.append(source() as! UInt8)
|
||||
sink(arg: dataTainted11) // $ tainted=121
|
||||
sink(arg: dataTainted11) // $ tainted=133
|
||||
|
||||
let dataTainted12 = Data("")
|
||||
dataTainted12.append(source() as! UnsafeBufferPointer<UInt8>)
|
||||
sink(arg: dataTainted12) // $ tainted=125
|
||||
sink(arg: dataTainted12) // $ tainted=137
|
||||
|
||||
// ";Data;true;append(_:count:);;;Argument[0];Argument[-1];taint",
|
||||
let dataTainted13 = Data("")
|
||||
dataTainted13.append(source() as! UnsafePointer<UInt8>, count: 0)
|
||||
sink(arg: dataTainted13) // $ tainted=130
|
||||
sink(arg: dataTainted13) // $ tainted=142
|
||||
|
||||
// ";Data;true;append(contentsOf:);;;Argument[0];Argument[-1];taint",
|
||||
let dataTainted14 = Data("")
|
||||
dataTainted14.append(contentsOf: source() as! [UInt8])
|
||||
sink(arg: dataTainted14) // $ tainted=135
|
||||
sink(arg: dataTainted14) // $ tainted=147
|
||||
|
||||
// ";Data;true;base64EncodedData(options:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted15 = source() as! Data
|
||||
sink(arg: dataTainted15.base64EncodedData(options: [])) // $ tainted=139
|
||||
sink(arg: dataTainted15.base64EncodedData(options: [])) // $ tainted=151
|
||||
|
||||
// ";Data;true;base64EncodedString(options:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted16 = source() as! Data
|
||||
sink(arg: dataTainted16.base64EncodedString(options: [])) // $ tainted=143
|
||||
sink(arg: dataTainted16.base64EncodedString(options: [])) // $ tainted=155
|
||||
|
||||
// ";Data;true;compactMap(_:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted17 = source() as! Data
|
||||
let compactMapped: [Int] = dataTainted17.compactMap { str in Int(str) }
|
||||
sink(arg: compactMapped) // $ tainted=147
|
||||
sink(arg: compactMapped) // $ tainted=159
|
||||
|
||||
// ";Data;true;copyBytes(to:);;;Argument[-1];Argument[0];taint",
|
||||
let dataTainted18 = source() as! Data
|
||||
let pointerTainted18 = UnsafeMutableRawBufferPointer.allocate(byteCount: 0, alignment: 0)
|
||||
dataTainted18.copyBytes(to: pointerTainted18)
|
||||
sink(arg: pointerTainted18) // $ tainted=152
|
||||
sink(arg: pointerTainted18) // $ tainted=164
|
||||
|
||||
// ";Data;true;copyBytes(to:count:);;;Argument[-1];Argument[0];taint",
|
||||
let dataTainted19 = source() as! Data
|
||||
let pointerTainted19 = UnsafeMutablePointer<UInt8>.allocate(capacity: 0)
|
||||
dataTainted19.copyBytes(to: pointerTainted19, count: 0)
|
||||
sink(arg: pointerTainted19) // $ tainted=158
|
||||
sink(arg: pointerTainted19) // $ tainted=170
|
||||
|
||||
// ";Data;true;copyBytes(to:from:);;;Argument[-1];Argument[0];taint",
|
||||
let dataTainted20 = source() as! Data
|
||||
let pointerTainted20 = UnsafeMutablePointer<UInt8>.allocate(capacity: 0)
|
||||
dataTainted20.copyBytes(to: pointerTainted20, from: 0..<1)
|
||||
sink(arg: pointerTainted20) // $ tainted=164
|
||||
sink(arg: pointerTainted20) // $ tainted=176
|
||||
|
||||
// ";Data;true;flatMap(_:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted21 = source() as! Data
|
||||
let flatMapped = dataTainted21.flatMap { Array(repeating: $0, count: 0) }
|
||||
sink(arg: flatMapped) // $ tainted=170
|
||||
sink(arg: flatMapped) // $ tainted=182
|
||||
|
||||
let dataTainted22 = source() as! Data
|
||||
let flatMapped2 = dataTainted22.flatMap { str in Int(str) }
|
||||
sink(arg: flatMapped2) // $ tainted=174
|
||||
sink(arg: flatMapped2) // $ tainted=186
|
||||
|
||||
// ";Data;true;insert(_:at:);;;Argument[0];Argument[-1];taint",
|
||||
let dataTainted23 = Data("")
|
||||
dataTainted23.insert(source() as! UInt8, at: 0)
|
||||
sink(arg: dataTainted23) // $ tainted=180
|
||||
sink(arg: dataTainted23) // $ tainted=192
|
||||
|
||||
// ";Data;true;insert(contentsOf:at:);;;Argument[0];Argument[-1];taint",
|
||||
let dataTainted24 = Data("")
|
||||
dataTainted24.insert(contentsOf: source() as! [UInt8], at: 0)
|
||||
sink(arg: dataTainted24) // $ tainted=185
|
||||
sink(arg: dataTainted24) // $ tainted=197
|
||||
|
||||
// ";Data;true;map(_:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted25 = source() as! Data
|
||||
let mapped = dataTainted25.map { $0 }
|
||||
sink(arg: mapped) // $ tainted=189
|
||||
sink(arg: mapped) // $ tainted=201
|
||||
|
||||
// ";Data;true;reduce(into:_:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted26 = source() as! Data
|
||||
let reduced = dataTainted26.reduce(into: [:]) { c, i in c[i, default: 0] += 1 }
|
||||
sink(arg: reduced) // $ tainted=194
|
||||
sink(arg: reduced) // $ tainted=206
|
||||
|
||||
// ";Data;true;replace(_:with:maxReplacements:);;;Argument[1];Argument[-1];taint",
|
||||
let dataTainted27 = Data("")
|
||||
dataTainted27.replace([0], with: source() as! [UInt8], maxReplacements: .max)
|
||||
sink(arg: dataTainted27) // $ tainted=200
|
||||
sink(arg: dataTainted27) // $ tainted=212
|
||||
|
||||
// ";Data;true;replaceSubrange(_:with:);;;Argument[1];Argument[-1];taint",
|
||||
let dataTainted28 = Data("")
|
||||
dataTainted28.replaceSubrange(1..<3, with: source() as! Data)
|
||||
sink(arg: dataTainted28) // $ tainted=205
|
||||
sink(arg: dataTainted28) // $ tainted=217
|
||||
|
||||
let dataTainted29 = Data("")
|
||||
dataTainted29.replaceSubrange(1..<3, with: source() as! [UInt8])
|
||||
sink(arg: dataTainted29) // $ tainted=209
|
||||
sink(arg: dataTainted29) // $ tainted=221
|
||||
|
||||
let dataTainted30 = Data("")
|
||||
dataTainted30.replaceSubrange(1..<3, with: source() as! UnsafeBufferPointer<UInt8>)
|
||||
sink(arg: dataTainted30) // $ tainted=213
|
||||
sink(arg: dataTainted30) // $ tainted=225
|
||||
|
||||
// ";Data;true;replaceSubrange(_:with:count:);;;Argument[1];Argument[-1];taint",
|
||||
let dataTainted31 = Data("")
|
||||
dataTainted31.replaceSubrange(1..<3, with: source() as! UnsafeRawPointer, count: 0)
|
||||
sink(arg: dataTainted31) // $ tainted=218
|
||||
sink(arg: dataTainted31) // $ tainted=230
|
||||
|
||||
// ";Data;true;replacing(_:with:maxReplacements:);;;Argument[1];Argument[-1];taint",
|
||||
let dataTainted32 = Data("")
|
||||
let _ = dataTainted32.replacing([0], with: source() as! [UInt8], maxReplacements: 0)
|
||||
sink(arg: dataTainted32) // $ tainted=223
|
||||
sink(arg: dataTainted32) // $ tainted=235
|
||||
|
||||
// ";Data;true;replacing(_:with:subrange:maxReplacements:);;;Argument[1];Argument[-1];taint",
|
||||
let dataTainted33 = Data("")
|
||||
let _ = dataTainted33.replacing([0], with: source() as! [UInt8], subrange: 1..<3, maxReplacements: 0)
|
||||
sink(arg: dataTainted33) // $ tainted=228
|
||||
sink(arg: dataTainted33) // $ tainted=240
|
||||
|
||||
// ";Data;true;reversed();;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted34 = source() as! Data
|
||||
sink(arg: dataTainted34.reversed()) // $ tainted=232
|
||||
sink(arg: dataTainted34.reversed()) // $ tainted=244
|
||||
|
||||
// ";Data;true;sorted();;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted35 = source() as! Data
|
||||
sink(arg: dataTainted35.sorted()) // $ tainted=236
|
||||
sink(arg: dataTainted35.sorted()) // $ tainted=248
|
||||
|
||||
// ";Data;true;sorted(by:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted36 = source() as! Data
|
||||
sink(arg: dataTainted36.sorted{ _,_ in return false }) // $ tainted=240
|
||||
sink(arg: dataTainted36.sorted{ _,_ in return false }) // $ tainted=252
|
||||
|
||||
// ";Data;true;sorted(using:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted37 = source() as! Data
|
||||
sink(arg: dataTainted37.sorted(using: cmp()!)) // $ tainted=244
|
||||
sink(arg: dataTainted37.sorted(using: cmp()!)) // $ tainted=256
|
||||
|
||||
// ";Data;true;shuffled();;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted38 = source() as! Data
|
||||
sink(arg: dataTainted38.shuffled()) // $ tainted=248
|
||||
sink(arg: dataTainted38.shuffled()) // $ tainted=260
|
||||
|
||||
// ";Data;true;shuffled(using:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted39 = source() as! Data
|
||||
var rng = rng()!
|
||||
sink(arg: dataTainted39.shuffled(using: &rng)) // $ tainted=252
|
||||
var myRng = rng()!
|
||||
sink(arg: dataTainted39.shuffled(using: &myRng)) // $ tainted=264
|
||||
|
||||
// ";Data;true;trimmingPrefix(_:);;;Argument[-1];ReturnValue;taint",
|
||||
let dataTainted40 = source() as! Data
|
||||
sink(arg: dataTainted40.trimmingPrefix([0])) // $ tainted=257
|
||||
sink(arg: dataTainted40.trimmingPrefix([0])) // $ tainted=269
|
||||
|
||||
// ";Data;true;trimmingPrefix(while:);;;Argument[-1];ReturnValue;taint"
|
||||
let dataTainted41 = source() as! Data
|
||||
sink(arg: dataTainted41.trimmingPrefix { _ in false }) // $ tainted=261
|
||||
sink(arg: dataTainted41.trimmingPrefix { _ in false }) // $ tainted=273
|
||||
|
||||
// ";DataProtocol;true;copyBytes(to:);;;Argument[-1];Argument[0];taint",
|
||||
let dataTainted43 = source() as! UnsafeRawBufferPointer
|
||||
let pointerTainted43 = UnsafeMutableRawBufferPointer.allocate(byteCount: 0, alignment: 0)
|
||||
dataTainted43.copyBytes(to: pointerTainted43)
|
||||
sink(arg: pointerTainted43) // $ tainted=277
|
||||
|
||||
let dataTainted44 = source() as! Array<UInt8>
|
||||
let pointerTainted44 = UnsafeMutableRawBufferPointer.allocate(byteCount: 0, alignment: 0)
|
||||
dataTainted44.copyBytes(to: pointerTainted44)
|
||||
sink(arg: pointerTainted44) // $ tainted=282
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,17 @@
|
||||
multipleSuccessors
|
||||
| methodlookup.swift:37:11:37:30 | call to instanceMethod() | successor | methodlookup.swift:37:5:37:30 | await ... |
|
||||
| methodlookup.swift:37:11:37:30 | call to instanceMethod() | successor | methodlookup.swift:40:5:40:9 | .staticMethod() |
|
||||
| methodlookup.swift:47:11:47:30 | call to instanceMethod() | successor | methodlookup.swift:47:5:47:30 | await ... |
|
||||
| methodlookup.swift:47:11:47:30 | call to instanceMethod() | successor | methodlookup.swift:48:11:48:11 | Baz.Type |
|
||||
| methodlookup.swift:48:11:48:35 | call to { ... } | successor | methodlookup.swift:48:5:48:35 | await ... |
|
||||
| methodlookup.swift:48:11:48:35 | call to { ... } | successor | methodlookup.swift:50:11:50:15 | .classMethod() |
|
||||
| methodlookup.swift:50:11:50:27 | call to classMethod() | successor | methodlookup.swift:50:5:50:27 | await ... |
|
||||
| methodlookup.swift:50:11:50:27 | call to classMethod() | successor | methodlookup.swift:51:11:51:15 | .staticMethod() |
|
||||
| methodlookup.swift:51:11:51:28 | call to staticMethod() | successor | methodlookup.swift:43:6:52:1 | exit { ... } (normal) |
|
||||
| methodlookup.swift:51:11:51:28 | call to staticMethod() | successor | methodlookup.swift:51:5:51:28 | await ... |
|
||||
deadEnd
|
||||
| methodlookup.swift:37:5:37:30 | await ... |
|
||||
| methodlookup.swift:47:5:47:30 | await ... |
|
||||
| methodlookup.swift:48:5:48:35 | await ... |
|
||||
| methodlookup.swift:50:5:50:27 | await ... |
|
||||
| methodlookup.swift:51:5:51:28 | await ... |
|
||||
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -4,12 +4,10 @@ import codeql.swift.dataflow.FlowSources
|
||||
import codeql.swift.security.PathInjectionQuery
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class PathInjectionTest extends InlineExpectationsTest {
|
||||
PathInjectionTest() { this = "PathInjectionTest" }
|
||||
module PathInjectionTest implements TestSig {
|
||||
string getARelevantTag() { result = "hasPathInjection" }
|
||||
|
||||
override string getARelevantTag() { result = "hasPathInjection" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node source, DataFlow::Node sink |
|
||||
PathInjectionFlow::flow(source, sink) and
|
||||
location = sink.getLocation() and
|
||||
@@ -20,3 +18,5 @@ class PathInjectionTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<PathInjectionTest>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:126:25:126:25 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:126:26:126:26 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:127:25:127:25 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:127:26:127:26 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:173:25:173:25 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:173:26:173:26 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:174:25:174:25 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UnsafeWebViewFetch.swift:174:26:174:26 | .appendLiteral(_:) |
|
||||
@@ -0,0 +1,15 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:67:21:67:21 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:67:22:67:22 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:68:19:68:19 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:68:20:68:20 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:69:19:69:19 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | SQLite.swift:69:20:69:20 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:127:21:127:21 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:127:22:127:22 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:128:19:128:19 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:128:20:128:20 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:129:19:129:19 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | sqlite3_c_api.swift:129:20:129:20 | .appendLiteral(_:) |
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -6,8 +6,8 @@ struct URL
|
||||
init?(string: String) {}
|
||||
init?(string: String, relativeTo: URL?) {}
|
||||
}
|
||||
|
||||
struct Data {
|
||||
protocol DataProtocol { }
|
||||
struct Data : DataProtocol {
|
||||
init<S>(_ elements: S) { count = 0 }
|
||||
|
||||
var count: Int
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,3 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | UncontrolledFormatString.swift:94:22:94:22 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | UncontrolledFormatString.swift:94:23:94:23 | .appendLiteral(_:) |
|
||||
@@ -0,0 +1,41 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation2.swift:38:11:38:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation2.swift:38:12:38:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:46:11:46:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:46:12:46:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:47:11:47:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:47:12:47:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:48:11:48:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:48:12:48:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:57:11:57:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:57:12:57:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:61:11:61:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:61:12:61:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:67:11:67:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:67:12:67:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:75:11:75:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:75:12:75:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:82:11:82:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:82:12:82:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:91:11:91:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:91:12:91:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:97:11:97:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:97:12:97:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:101:11:101:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:101:12:101:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:105:11:105:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:105:12:105:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:109:11:109:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:109:12:109:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:115:11:115:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:115:12:115:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:121:11:121:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:121:12:121:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:127:11:127:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:127:12:127:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:133:11:133:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:133:12:133:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:139:11:139:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:139:12:139:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:145:11:145:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | StringLengthConflation.swift:145:12:145:12 | .appendLiteral(_:) |
|
||||
@@ -0,0 +1,5 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,2 @@
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
@@ -0,0 +1,3 @@
|
||||
doubleParents
|
||||
| file://:0:0:0:0 | [MethodLookupExpr] .container(keyedBy:) | getBase() | file://:0:0:0:0 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | file://:0:0:0:0 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | [OpenExistentialExpr] OpenExistentialExpr | getOpaqueExpr() | file://:0:0:0:0 | [MethodLookupExpr] .container(keyedBy:) | getBase() | file://:0:0:0:0 | [OpaqueValueExpr] OpaqueValueExpr |
|
||||
@@ -0,0 +1,65 @@
|
||||
multipleSuccessors
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:98:11:98:11 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:98:12:98:12 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:107:13:107:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:107:14:107:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:108:13:108:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:108:14:108:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:109:13:109:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:109:14:109:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:110:13:110:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:110:14:110:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:111:13:111:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:111:14:111:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:112:13:112:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:112:14:112:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:113:13:113:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:113:14:113:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:114:13:114:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:114:14:114:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:115:13:115:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:115:14:115:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:116:13:116:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:116:14:116:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:117:13:117:13 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:117:14:117:14 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:118:30:118:30 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:118:31:118:31 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:119:15:119:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:119:16:119:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:120:15:120:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:120:16:120:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:121:15:121:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:121:16:121:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:122:15:122:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:122:16:122:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:123:14:123:14 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:123:15:123:15 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:124:14:124:14 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:124:15:124:15 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:125:16:125:16 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:125:17:125:17 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:126:16:126:16 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:126:17:126:17 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:127:17:127:17 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:127:18:127:18 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:128:17:128:17 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:128:18:128:18 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:129:15:129:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:129:16:129:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:130:15:130:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:130:16:130:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:131:18:131:18 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:131:19:131:19 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:132:18:132:18 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:132:19:132:19 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:133:15:133:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:133:16:133:16 | .appendLiteral(_:) |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:134:15:134:15 | OpaqueValueExpr |
|
||||
| file://:0:0:0:0 | $interpolation | successor | cleartextLoggingTest.swift:134:16:134:16 | .appendLiteral(_:) |
|
||||
deadEnd
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
| file://:0:0:0:0 | ... = ... |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user