Skip to content

Commit 64b0d39

Browse files
author
Esben Sparre Andreasen
committed
JS: polish HttpToFileAccess.qll
1 parent df72492 commit 64b0d39

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/HttpToFileAccess.qll

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
/**
2-
* Provides taint tracking configuration for reasoning about files created from untrusted http downloads.
1+
/**
2+
* Provides a taint tracking configuration for reasoning about user-controlled data in files.
33
*/
44
import javascript
55
import semmle.javascript.security.dataflow.RemoteFlowSources
66

7-
module HttpToFileAccessFlow {
7+
module HttpToFileAccess {
8+
89
/**
9-
* A data flow source from untrusted http request to file access taint tracking configuration.
10+
* A data flow source for user-controlled data in files.
1011
*/
1112
abstract class Source extends DataFlow::Node { }
1213

1314
/**
14-
* A data flow sink for untrusted http request to file access taint tracking configuration.
15+
* A data flow sink for user-controlled data in files.
1516
*/
1617
abstract class Sink extends DataFlow::Node { }
1718

1819
/**
19-
* A sanitizer for untrusted http request to file access taint tracking configuration.
20+
* A sanitizer for user-controlled data in files.
2021
*/
2122
abstract class Sanitizer extends DataFlow::Node { }
2223

2324
/**
24-
* A taint-tracking configuration for reasoning about file access from untrusted http response body.
25+
* A taint tracking configuration for user-controlled data in files.
2526
*/
2627
class Configuration extends TaintTracking::Configuration {
27-
Configuration() { this = "HttpToFileAccessFlow" }
28+
Configuration() {
29+
this = "HttpToFileAccess"
30+
}
2831

2932
override predicate isSource(DataFlow::Node source) {
3033
source instanceof Source
@@ -39,12 +42,12 @@ module HttpToFileAccessFlow {
3942
node instanceof Sanitizer
4043
}
4144
}
42-
43-
/** A source of remote data, considered as a flow source for untrusted http data to file system access. */
45+
46+
/** A source of remote user input, considered as a flow source for user-controlled data in files. */
4447
class RemoteFlowSourceAsSource extends Source {
4548
RemoteFlowSourceAsSource() { this instanceof RemoteFlowSource }
4649
}
47-
50+
4851
/** A sink that represents file access method (write, append) argument */
4952
class FileAccessAsSink extends Sink {
5053
FileAccessAsSink () {

0 commit comments

Comments
 (0)