mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
third test of taint steps
This commit is contained in:
@@ -7,6 +7,8 @@ taintFlow
|
||||
| test.py:71:28:71:38 | ControlFlowNode for getSource() | test.py:71:8:71:39 | ControlFlowNode for Attribute() |
|
||||
| test.py:75:5:75:15 | ControlFlowNode for getSource() | test.py:76:22:76:22 | ControlFlowNode for x |
|
||||
| test.py:75:5:75:15 | ControlFlowNode for getSource() | test.py:77:22:77:22 | ControlFlowNode for y |
|
||||
| test.py:81:36:81:46 | ControlFlowNode for getSource() | test.py:81:8:81:47 | ControlFlowNode for Attribute() |
|
||||
| test.py:83:50:83:60 | ControlFlowNode for getSource() | test.py:83:8:83:61 | ControlFlowNode for Attribute() |
|
||||
isSink
|
||||
| test.py:4:8:4:8 | ControlFlowNode for x | test-sink |
|
||||
| test.py:7:17:7:17 | ControlFlowNode for x | test-sink |
|
||||
@@ -36,6 +38,9 @@ isSink
|
||||
| test.py:76:22:76:22 | ControlFlowNode for x | test-sink |
|
||||
| test.py:77:22:77:22 | ControlFlowNode for y | test-sink |
|
||||
| test.py:78:22:78:22 | ControlFlowNode for z | test-sink |
|
||||
| test.py:81:8:81:47 | ControlFlowNode for Attribute() | test-sink |
|
||||
| test.py:82:8:82:54 | ControlFlowNode for Attribute() | test-sink |
|
||||
| test.py:83:8:83:61 | ControlFlowNode for Attribute() | test-sink |
|
||||
isSource
|
||||
| test.py:3:5:3:15 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:9:8:9:14 | ControlFlowNode for alias() | test-source |
|
||||
@@ -65,6 +70,9 @@ isSource
|
||||
| test.py:71:28:71:38 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:72:36:72:46 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:75:5:75:15 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:81:36:81:46 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:82:43:82:53 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:83:50:83:60 | ControlFlowNode for getSource() | test-source |
|
||||
syntaxErrors
|
||||
| Member[foo |
|
||||
| Member[foo] .Member[bar] |
|
||||
|
||||
@@ -76,4 +76,8 @@ Steps.taintIntoCallback(
|
||||
lambda x: mySink(x), # FLOW
|
||||
lambda y: mySink(y), # FLOW
|
||||
lambda z: mySink(z) # NO FLOW
|
||||
)
|
||||
)
|
||||
|
||||
mySink(Steps.preserveArgZeroAndTwo(getSource())) # FLOW
|
||||
mySink(Steps.preserveArgZeroAndTwo("foo", getSource())) # NO FLOW
|
||||
mySink(Steps.preserveArgZeroAndTwo("foo", "bar", getSource())) # FLOW
|
||||
@@ -12,11 +12,8 @@ class Steps extends ModelInput::SummaryModelCsv {
|
||||
[
|
||||
"testlib;;Member[Steps].Member[preserveTaint];Argument[0];ReturnValue;taint",
|
||||
"testlib;;Member[Steps].Member[taintIntoCallback];Argument[0];Argument[1..2].Parameter[0];taint",
|
||||
// "testlib;;Member[Steps].Member[taintIntoCallbackThis];Argument[0];Argument[1..2].Parameter[this];taint",
|
||||
// "testlib;;Member[Steps].Member[preserveArgZeroAndTwo];Argument[0,2];ReturnValue;taint",
|
||||
"testlib;;Member[Steps].Member[preserveArgZeroAndTwo];Argument[0,2];ReturnValue;taint",
|
||||
// "testlib;;Member[Steps].Member[preserveAllButFirstArgument];Argument[1..];ReturnValue;taint",
|
||||
// "testlib;;Member[Steps].Member[preserveAllIfCall].Call;Argument[0..];ReturnValue;taint",
|
||||
// "testlib;;Member[Steps].Member[getSource].ReturnValue.Member[continue];Argument[this];ReturnValue;taint",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -56,7 +53,6 @@ class Sinks extends ModelInput::SinkModelCsv {
|
||||
}
|
||||
|
||||
// TODO: Test taint steps (include that the base path may end with ".Call")
|
||||
// TODO: // There are no API-graph edges for: ArrayElement, Element, MapKey, MapValue (remove from valid tokens list)
|
||||
class Sources extends ModelInput::SourceModelCsv {
|
||||
// package;type;path;kind
|
||||
override predicate row(string row) {
|
||||
|
||||
Reference in New Issue
Block a user