Skip to content

Commit 15aa09f

Browse files
authored
Merge pull request github#7744 from github/henrymercer/js-atm-tweak-query-help
JS: Move experimental notice to the bottom of the ML-powered query help
2 parents 662675e + 70f7535 commit 15aa09f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

javascript/ql/experimental/adaptivethreatmodeling/src/NosqlInjectionATM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# NoSQL database query built from user-controlled sources (experimental)
2-
This is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
3-
42
If a database query (such as a SQL or NoSQL query) is built from user-provided data without sufficient sanitization, a malicious user may be able to run malicious database queries.
53

4+
Note: This CodeQL query is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
5+
66

77
## Recommendation
88
Most database connector libraries offer a way of safely embedding untrusted data into a query by means of query parameters or prepared statements.

javascript/ql/experimental/adaptivethreatmodeling/src/SqlInjectionATM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SQL database query built from user-controlled sources (experimental)
2-
This is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
3-
42
If a database query (such as a SQL or NoSQL query) is built from user-provided data without sufficient sanitization, a malicious user may be able to run malicious database queries.
53

4+
Note: This CodeQL query is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
5+
66

77
## Recommendation
88
Most database connector libraries offer a way of safely embedding untrusted data into a query by means of query parameters or prepared statements.

javascript/ql/experimental/adaptivethreatmodeling/src/TaintedPathATM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Uncontrolled data used in path expression (experimental)
2-
This is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
3-
42
Accessing files using paths constructed from user-controlled data can allow an attacker to access unexpected resources. This can result in sensitive information being revealed or deleted, or an attacker being able to influence behavior by modifying unexpected files.
53

4+
Note: This CodeQL query is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
5+
66

77
## Recommendation
88
Validate user input before using it to construct a file path, either using an off-the-shelf library like the `sanitize-filename` npm package, or by performing custom validation.

javascript/ql/experimental/adaptivethreatmodeling/src/XssATM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Client-side cross-site scripting (experimental)
2-
This is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
3-
42
Directly writing user input (for example, a URL query parameter) to a webpage without properly sanitizing the input first, allows for a cross-site scripting vulnerability.
53

64
This kind of vulnerability is also called *DOM-based* cross-site scripting, to distinguish it from other types of cross-site scripting.
75

6+
Note: This CodeQL query is an experimental query. Experimental queries generate alerts using machine learning. They might include more false positives but they will improve over time.
7+
88

99
## Recommendation
1010
To guard against cross-site scripting, consider using contextual output encoding/escaping before writing user input to the page, or one of the other solutions that are mentioned in the references.

0 commit comments

Comments
 (0)