File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
javascript/ql/src/semmle/javascript/security/dataflow Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ module InsecureDownload {
40
40
*/
41
41
abstract class Sanitizer extends DataFlow:: Node { }
42
42
43
+ /**
44
+ * Flow-labels for reasoning about download of sensitive file through insecure connection.
45
+ */
43
46
module Label {
44
47
/**
45
48
* A flow-label for file URLs that are both sensitive and downloaded over an insecure connection.
@@ -48,6 +51,9 @@ module InsecureDownload {
48
51
SensitiveInsecureURL ( ) { this = "sensitiveInsecure" }
49
52
}
50
53
54
+ /**
55
+ * A flow-label for a URL that is downloaded over an insecure connection.
56
+ */
51
57
class InsecureURL extends DataFlow:: FlowLabel {
52
58
InsecureURL ( ) { this = "insecure" }
53
59
}
@@ -114,7 +120,7 @@ module InsecureDownload {
114
120
}
115
121
116
122
/**
117
- * Gets a node for the response from `request`, type-tracked using `t`.
123
+ * Gets a node for the response from `request`, type-tracked using `t`.
118
124
*/
119
125
DataFlow:: SourceNode clientRequestResponse ( DataFlow:: TypeTracker t , ClientRequest request ) {
120
126
t .start ( ) and
@@ -132,7 +138,7 @@ module InsecureDownload {
132
138
133
139
FileWriteSink ( ) {
134
140
this = request .getUrl ( ) and
135
- clientRequestResponse ( DataFlow:: TypeTracker:: end ( ) , request ) .flowsTo ( write .getADataNode ( ) ) and
141
+ clientRequestResponse ( DataFlow:: TypeTracker:: end ( ) , request ) .flowsTo ( write .getADataNode ( ) ) and
136
142
hasUnsafeExtension ( write .getAPathArgument ( ) .getStringValue ( ) )
137
143
}
138
144
You can’t perform that action at this time.
0 commit comments