Skip to content

Commit e93545d

Browse files
author
Esben Sparre Andreasen
committed
JS: address more review comments
1 parent c885490 commit e93545d

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

change-notes/1.19/analysis-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| **Query** | **Tags** | **Purpose** |
1717
|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1818
| Enabling Node.js integration for Electron web content renderers (`js/enabling-electron-renderer-node-integration`) | security, frameworks/electron, external/cwe/cwe-094 | Highlights Electron web content renderer preferences with Node.js integration enabled, indicating a violation of [CWE-94](https://cwe.mitre.org/data/definitions/94.html). Results are not shown on LGTM by default. |
19-
| File data in outbound remote request | security, external/cwe/cwe-200 | Highligts locations where file data is sent in a remote request. Results are not shown on LGTM by default. |
19+
| File data in outbound remote request | security, external/cwe/cwe-200 | Highlights locations where file data is sent in a remote request. Results are not shown on LGTM by default. |
2020
| Host header poisoning in email generation | security, external/cwe/cwe-640 | Highlights code that generates emails with links that can be hijacked by HTTP host header poisoning, indicating a violation of [CWE-640](https://cwe.mitre.org/data/definitions/640.html). Results shown on LGTM by default. |
2121
| Replacement of a substring with itself (`js/identity-replacement`) | correctness, security, external/cwe/cwe-116 | Highlights string replacements that replace a string with itself, which usually indicates a mistake. Results shown on LGTM by default. |
2222
| Stored cross-site scripting (`js/stored-xss`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights uncontrolled stored values flowing into HTML content, indicating a violation of [CWE-079](https://cwe.mitre.org/data/definitions/79.html). Results shown on LGTM by default. |

javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name User-controlled data in file
2+
* @name User-controlled data written to file
33
* @description Writing user-controlled data directly to the file system allows arbitrary file upload and might indicate a backdoor.
44
* @kind problem
55
* @problem.severity warning

javascript/ql/src/semmle/javascript/frameworks/ClientRequests.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import javascript
1010
/**
1111
* A call that performs a request to a URL.
1212
*
13-
* Example: An HTTP POST request is client request that sends some
13+
* Example: An HTTP POST request is a client request that sends some
1414
* `data` to a `url`, where both the headers and the body of the request
1515
* contribute to the `data`.
1616
*/

javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ module NodeJSLib {
480480
}
481481

482482
/**
483-
* A read from the file system.
483+
* A write to the file system, using a stream.
484484
*/
485485
private class FileStreamWrite extends FileSystemWriteAccess, DataFlow::CallNode {
486486

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

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

77
module HttpToFileAccess {
88

99
/**
10-
* A data flow source for user-controlled data in files.
10+
* A data flow source for writing user-controlled data to files.
1111
*/
1212
abstract class Source extends DataFlow::Node { }
1313

1414
/**
15-
* A data flow sink for user-controlled data in files.
15+
* A data flow sink for writing user-controlled data to files.
1616
*/
1717
abstract class Sink extends DataFlow::Node { }
1818

1919
/**
20-
* A sanitizer for user-controlled data in files.
20+
* A sanitizer for writing user-controlled data to files.
2121
*/
2222
abstract class Sanitizer extends DataFlow::Node { }
2323

2424
/**
25-
* A taint tracking configuration for user-controlled data in files.
25+
* A taint tracking configuration for writing user-controlled data to files.
2626
*/
2727
class Configuration extends TaintTracking::Configuration {
2828
Configuration() {
@@ -43,7 +43,7 @@ module HttpToFileAccess {
4343
}
4444
}
4545

46-
/** A source of remote user input, considered as a flow source for user-controlled data in files. */
46+
/** A source of remote user input, considered as a flow source for writing user-controlled data to files. */
4747
class RemoteFlowSourceAsSource extends Source {
4848
RemoteFlowSourceAsSource() { this instanceof RemoteFlowSource }
4949
}

0 commit comments

Comments
 (0)