Skip to content

Commit 01c4852

Browse files
authored
Merge pull request #3701 from yoff/SharedDataflow
Python: Start using the shared data flow libraries
2 parents 04a0d47 + fe9520b commit 01c4852

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8975
-8
lines changed

config/identical-files.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"DataFlow Java/C++/C#": [
2+
"DataFlow Java/C++/C#/Python": [
33
"java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll",
44
"java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll",
55
"java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll",
@@ -18,15 +18,18 @@
1818
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll",
1919
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll",
2020
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll",
21-
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll"
21+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll",
22+
"python/ql/src/experimental/dataflow/internal/DataFlowImpl.qll",
23+
"python/ql/src/experimental/dataflow/internal/DataFlowImpl2.qll"
2224
],
23-
"DataFlow Java/C++/C# Common": [
25+
"DataFlow Java/C++/C#/Python Common": [
2426
"java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll",
2527
"cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll",
2628
"cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll",
27-
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll"
29+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll",
30+
"python/ql/src/experimental/dataflow/internal/DataFlowImplCommon.qll"
2831
],
29-
"TaintTracking::Configuration Java/C++/C#": [
32+
"TaintTracking::Configuration Java/C++/C#/Python": [
3033
"cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
3134
"cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
3235
"cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
@@ -37,13 +40,15 @@
3740
"csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking4/TaintTrackingImpl.qll",
3841
"csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking5/TaintTrackingImpl.qll",
3942
"java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll",
40-
"java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll"
43+
"java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll",
44+
"python/ql/src/experimental/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
4145
],
42-
"DataFlow Java/C++/C# Consistency checks": [
46+
"DataFlow Java/C++/C#/Python Consistency checks": [
4347
"java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll",
4448
"cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll",
4549
"cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll",
46-
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll"
50+
"csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll",
51+
"python/ql/src/experimental/dataflow/internal/DataFlowImplConsistency.qll"
4752
],
4853
"C++ SubBasicBlocks": [
4954
"cpp/ql/src/semmle/code/cpp/controlflow/SubBasicBlocks.qll",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Provides a library for local (intra-procedural) and global (inter-procedural)
3+
* data flow analysis: deciding whether data can flow from a _source_ to a
4+
* _sink_.
5+
*
6+
* Unless configured otherwise, _flow_ means that the exact value of
7+
* the source may reach the sink. We do not track flow across pointer
8+
* dereferences or array indexing. To track these types of flow, where the
9+
* exact value may not be preserved, import
10+
* `experimental.dataflow.TaintTracking`.
11+
*
12+
* To use global (interprocedural) data flow, extend the class
13+
* `DataFlow::Configuration` as documented on that class. To use local
14+
* (intraprocedural) data flow, call `DataFlow::localFlow` or
15+
* `DataFlow::localFlowStep` with arguments of type `DataFlow::Node`.
16+
*/
17+
18+
import python
19+
20+
/**
21+
* Provides classes for performing local (intra-procedural) and
22+
* global (inter-procedural) data flow analyses.
23+
*/
24+
module DataFlow {
25+
import experimental.dataflow.internal.DataFlowImpl
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Provides a library for local (intra-procedural) and global (inter-procedural)
3+
* data flow analysis: deciding whether data can flow from a _source_ to a
4+
* _sink_.
5+
*
6+
* Unless configured otherwise, _flow_ means that the exact value of
7+
* the source may reach the sink. We do not track flow across pointer
8+
* dereferences or array indexing. To track these types of flow, where the
9+
* exact value may not be preserved, import
10+
* `experimental.dataflow.TaintTracking`.
11+
*
12+
* To use global (interprocedural) data flow, extend the class
13+
* `DataFlow::Configuration` as documented on that class. To use local
14+
* (intraprocedural) data flow, call `DataFlow::localFlow` or
15+
* `DataFlow::localFlowStep` with arguments of type `DataFlow::Node`.
16+
*/
17+
18+
import python
19+
20+
/**
21+
* Provides classes for performing local (intra-procedural) and
22+
* global (inter-procedural) data flow analyses.
23+
*/
24+
module DataFlow2 {
25+
import experimental.dataflow.internal.DataFlowImpl2
26+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Provides classes for performing local (intra-procedural) and
3+
* global (inter-procedural) taint-tracking analyses.
4+
*
5+
* To use global (interprocedural) taint tracking, extend the class
6+
* `TaintTracking::Configuration` as documented on that class. To use local
7+
* (intraprocedural) taint tracking, call `TaintTracking::localTaint` or
8+
* `TaintTracking::localTaintStep` with arguments of type `DataFlow::Node`.
9+
*/
10+
11+
import python
12+
13+
/**
14+
* Provides classes for performing local (intra-procedural) and
15+
* global (inter-procedural) taint-tracking analyses.
16+
*/
17+
module TaintTracking {
18+
import experimental.dataflow.internal.tainttracking1.TaintTrackingImpl
19+
}

0 commit comments

Comments
 (0)