Skip to content

Commit 9c3d45a

Browse files
committed
last test of taint steps
1 parent 894252d commit 9c3d45a

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

python/ql/test/library-tests/frameworks/data/test.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ taintFlow
99
| test.py:75:5:75:15 | ControlFlowNode for getSource() | test.py:77:22:77:22 | ControlFlowNode for y |
1010
| test.py:81:36:81:46 | ControlFlowNode for getSource() | test.py:81:8:81:47 | ControlFlowNode for Attribute() |
1111
| test.py:83:50:83:60 | ControlFlowNode for getSource() | test.py:83:8:83:61 | ControlFlowNode for Attribute() |
12+
| test.py:86:49:86:59 | ControlFlowNode for getSource() | test.py:86:8:86:60 | ControlFlowNode for Attribute() |
13+
| test.py:87:56:87:66 | ControlFlowNode for getSource() | test.py:87:8:87:67 | ControlFlowNode for Attribute() |
1214
isSink
1315
| test.py:4:8:4:8 | ControlFlowNode for x | test-sink |
1416
| test.py:7:17:7:17 | ControlFlowNode for x | test-sink |
@@ -41,6 +43,9 @@ isSink
4143
| test.py:81:8:81:47 | ControlFlowNode for Attribute() | test-sink |
4244
| test.py:82:8:82:54 | ControlFlowNode for Attribute() | test-sink |
4345
| test.py:83:8:83:61 | ControlFlowNode for Attribute() | test-sink |
46+
| test.py:85:8:85:53 | ControlFlowNode for Attribute() | test-sink |
47+
| test.py:86:8:86:60 | ControlFlowNode for Attribute() | test-sink |
48+
| test.py:87:8:87:67 | ControlFlowNode for Attribute() | test-sink |
4449
isSource
4550
| test.py:3:5:3:15 | ControlFlowNode for getSource() | test-source |
4651
| test.py:9:8:9:14 | ControlFlowNode for alias() | test-source |
@@ -73,6 +78,9 @@ isSource
7378
| test.py:81:36:81:46 | ControlFlowNode for getSource() | test-source |
7479
| test.py:82:43:82:53 | ControlFlowNode for getSource() | test-source |
7580
| test.py:83:50:83:60 | ControlFlowNode for getSource() | test-source |
81+
| test.py:85:42:85:52 | ControlFlowNode for getSource() | test-source |
82+
| test.py:86:49:86:59 | ControlFlowNode for getSource() | test-source |
83+
| test.py:87:56:87:66 | ControlFlowNode for getSource() | test-source |
7684
syntaxErrors
7785
| Member[foo |
7886
| Member[foo] .Member[bar] |

python/ql/test/library-tests/frameworks/data/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,8 @@ def secondAndAfter(self, arg1, arg2, arg3, arg4, arg5):
8080

8181
mySink(Steps.preserveArgZeroAndTwo(getSource())) # FLOW
8282
mySink(Steps.preserveArgZeroAndTwo("foo", getSource())) # NO FLOW
83-
mySink(Steps.preserveArgZeroAndTwo("foo", "bar", getSource())) # FLOW
83+
mySink(Steps.preserveArgZeroAndTwo("foo", "bar", getSource())) # FLOW
84+
85+
mySink(Steps.preserveAllButFirstArgument(getSource())) # NO FLOW
86+
mySink(Steps.preserveAllButFirstArgument("foo", getSource())) # FLOW
87+
mySink(Steps.preserveAllButFirstArgument("foo", "bar", getSource())) # FLOW

python/ql/test/library-tests/frameworks/data/test.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Steps extends ModelInput::SummaryModelCsv {
1313
"testlib;;Member[Steps].Member[preserveTaint];Argument[0];ReturnValue;taint",
1414
"testlib;;Member[Steps].Member[taintIntoCallback];Argument[0];Argument[1..2].Parameter[0];taint",
1515
"testlib;;Member[Steps].Member[preserveArgZeroAndTwo];Argument[0,2];ReturnValue;taint",
16-
// "testlib;;Member[Steps].Member[preserveAllButFirstArgument];Argument[1..];ReturnValue;taint",
16+
"testlib;;Member[Steps].Member[preserveAllButFirstArgument];Argument[1..];ReturnValue;taint",
1717
]
1818
}
1919
}

0 commit comments

Comments
 (0)