File tree Expand file tree Collapse file tree 10 files changed +3
-12
lines changed
python/ql/lib/semmle/python Expand file tree Collapse file tree 10 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -872,7 +872,7 @@ class TemplateConstruction extends DataFlow::Node instanceof TemplateConstructio
872
872
DataFlow:: Node getSourceArg ( ) { result = super .getSourceArg ( ) }
873
873
}
874
874
875
- /** Provides classes for modelling template construction APIs. */
875
+ /** Provides classes for modeling template construction APIs. */
876
876
module TemplateConstruction {
877
877
/**
878
878
* A data-flow node that constructs a template in a templating engine.
@@ -886,7 +886,6 @@ module TemplateConstruction {
886
886
}
887
887
}
888
888
889
-
890
889
/** Provides classes for modeling HTTP-related APIs. */
891
890
module Http {
892
891
/** Gets an HTTP verb, in upper case */
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change @@ -3000,7 +3000,6 @@ module PrivateDjango {
3000
3000
// ---------------------------------------------------------------------------
3001
3001
// Templates
3002
3002
// ---------------------------------------------------------------------------
3003
-
3004
3003
/** A call to `django.template.Template` */
3005
3004
private class DjangoTemplateConstruction extends TemplateConstruction:: Range , API:: CallNode {
3006
3005
DjangoTemplateConstruction ( ) {
@@ -3009,6 +3008,5 @@ module PrivateDjango {
3009
3008
3010
3009
override DataFlow:: Node getSourceArg ( ) { result = this .getArg ( 0 ) }
3011
3010
}
3012
-
3013
3011
// TODO: Support `from_string` on instances of `django.template.Engine`.
3014
3012
}
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
private import semmle.python.frameworks.data.ModelsAsData
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
private import python
7
- private import semmle.python.dataflow.new.DataFlow
8
7
private import semmle.python.ApiGraphs
9
8
private import semmle.python.Concepts
10
9
Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ import semmle.python.dataflow.new.DataFlow
11
11
import semmle.python.dataflow.new.TaintTracking
12
12
import TemplateInjectionCustomizations:: TemplateInjection
13
13
14
- module TemplateInjectionConfig implements DataFlow:: ConfigSig {
14
+ private module TemplateInjectionConfig implements DataFlow:: ConfigSig {
15
15
predicate isSource ( DataFlow:: Node node ) { node instanceof Source }
16
16
17
17
predicate isSink ( DataFlow:: Node node ) { node instanceof Sink }
18
18
19
19
predicate isBarrierIn ( DataFlow:: Node node ) { node instanceof Sanitizer }
20
20
}
21
21
22
+ /** Global taint-tracking for detecting "template injection" vulnerabilities. */
22
23
module TemplateInjectionFlow = TaintTracking:: Global< TemplateInjectionConfig > ;
You can’t perform that action at this time.
0 commit comments