File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,11 @@ module HTTP {
298
298
* extend `RequestInputAccess::Range` instead.
299
299
*/
300
300
class RequestInputAccess extends DataFlow:: Node instanceof RequestInputAccess:: Range {
301
+ /**
302
+ * Gets a string that describes the type of this input.
303
+ *
304
+ * This is typically the name of the method that gives rise to this input.
305
+ */
301
306
string getSourceType ( ) { result = super .getSourceType ( ) }
302
307
}
303
308
@@ -310,6 +315,11 @@ module HTTP {
310
315
* extend `RequestInputAccess` instead.
311
316
*/
312
317
abstract class Range extends DataFlow:: Node {
318
+ /**
319
+ * Gets a string that describes the type of this input.
320
+ *
321
+ * This is typically the name of the method that gives rise to this input.
322
+ */
313
323
abstract string getSourceType ( ) ;
314
324
}
315
325
}
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ import codeql.ruby.DataFlow
9
9
import codeql.ruby.dataflow.RemoteFlowSources
10
10
import codeql.ruby.Concepts
11
11
12
+ /**
13
+ * Provides default sources, sinks and sanitizers for reasoning about
14
+ * writing user-controlled data to files, as well as extension points
15
+ * for adding your own.
16
+ */
12
17
module HttpToFileAccess {
13
18
/**
14
19
* A data flow source for writing user-controlled data to files.
@@ -25,9 +30,15 @@ module HttpToFileAccess {
25
30
*/
26
31
abstract class Sanitizer extends DataFlow:: Node { }
27
32
28
- /** A source of remote user input, considered as a flow source for writing user-controlled data to files. */
29
- class RemoteFlowSourceAsSource extends Source {
30
- RemoteFlowSourceAsSource ( ) { this instanceof RemoteFlowSource }
33
+ /**
34
+ * An access to a user-controlled HTTP request input, considered as a flow source for writing user-controlled data to files
35
+ */
36
+ private class RequestInputAccessAsSource extends Source instanceof HTTP:: Server:: RequestInputAccess {
37
+ }
38
+
39
+ /** A response from an outgoing HTTP request, considered as a flow source for writing user-controlled data to files. */
40
+ private class HttpResponseAsSource extends Source {
41
+ HttpResponseAsSource ( ) { this = any ( HTTP:: Client:: Request r ) .getResponseBody ( ) }
31
42
}
32
43
33
44
/** A sink that represents file access method (write, append) argument */
You can’t perform that action at this time.
0 commit comments