Skip to content

Commit 3016798

Browse files
committed
Merge branch 'master' into copymove
2 parents c57c016 + d297ce2 commit 3016798

File tree

530 files changed

+15303
-5261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

530 files changed

+15303
-5261
lines changed

change-notes/1.25/analysis-cpp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The following changes in version 1.25 affect C/C++ analysis in all applications.
1313

1414
| **Query** | **Expected impact** | **Change** |
1515
|----------------------------|------------------------|------------------------------------------------------------------|
16+
| Uncontrolled format string (`cpp/tainted-format-string`) | | This query is now displayed by default on LGTM. |
17+
| Uncontrolled format string (through global variable) (`cpp/tainted-format-string-through-global`) | | This query is now displayed by default on LGTM. |
1618

1719
## Changes to libraries
1820

change-notes/1.25/analysis-javascript.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@
66
- [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
77
- [bluebird](http://bluebirdjs.com/)
88
- [express](https://www.npmjs.com/package/express)
9+
- [fancy-log](https://www.npmjs.com/package/fancy-log)
910
- [fastify](https://www.npmjs.com/package/fastify)
1011
- [fstream](https://www.npmjs.com/package/fstream)
1112
- [jGrowl](https://github.com/stanlemon/jGrowl)
1213
- [jQuery](https://jquery.com/)
1314
- [marsdb](https://www.npmjs.com/package/marsdb)
15+
- [micro](https://www.npmjs.com/package/micro/)
1416
- [minimongo](https://www.npmjs.com/package/minimongo/)
1517
- [mssql](https://www.npmjs.com/package/mssql)
1618
- [mysql](https://www.npmjs.com/package/mysql)
19+
- [npmlog](https://www.npmjs.com/package/npmlog)
1720
- [pg](https://www.npmjs.com/package/pg)
1821
- [sequelize](https://www.npmjs.com/package/sequelize)
1922
- [spanner](https://www.npmjs.com/package/spanner)
2023
- [sqlite](https://www.npmjs.com/package/sqlite)
2124
- [ssh2-streams](https://www.npmjs.com/package/ssh2-streams)
2225
- [ssh2](https://www.npmjs.com/package/ssh2)
26+
- [yargs](https://www.npmjs.com/package/yargs)
27+
- [webpack-dev-server](https://www.npmjs.com/package/webpack-dev-server)
2328

2429
* TypeScript 3.9 is now supported.
2530

@@ -30,10 +35,17 @@
3035

3136
| **Query** | **Tags** | **Purpose** |
3237
|---------------------------------------------------------------------------------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
33-
| Cross-site scripting through DOM (`js/xss-through-dom`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities where existing text from the DOM is used as HTML. Results are not shown on LGTM by default. |
38+
| DOM text reinterpreted as HTML (`js/xss-through-dom`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities where existing text from the DOM is used as HTML. Results are shown on LGTM by default. |
3439
| Incomplete HTML attribute sanitization (`js/incomplete-html-attribute-sanitization`) | security, external/cwe/cwe-20, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities due to incomplete sanitization of HTML meta-characters. Results are shown on LGTM by default. |
3540
| Unsafe expansion of self-closing HTML tag (`js/unsafe-html-expansion`) | security, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights potential XSS vulnerabilities caused by unsafe expansion of self-closing HTML tags. |
3641
| Unsafe shell command constructed from library input (`js/shell-command-constructed-from-input`) | correctness, security, external/cwe/cwe-078, external/cwe/cwe-088 | Highlights potential command injections due to a shell command being constructed from library inputs. Results are shown on LGTM by default. |
42+
| Download of sensitive file through insecure connection (`js/insecure-download`) | security, external/cwe/cwe-829 | Highlights downloads of sensitive files through an unencrypted protocol. Results are shown on LGTM by default. |
43+
| Exposure of private files (`js/exposure-of-private-files`) | security, external/cwe/cwe-200 | Highlights servers that serve private files. Results are shown on LGTM by default. |
44+
| Creating biased random numbers from a cryptographically secure source (`js/biased-cryptographic-random`) | security, external/cwe/cwe-327 | Highlights mathematical operations on cryptographically secure numbers that can create biased results. Results are shown on LGTM by default. |
45+
| Storage of sensitive information in build artifact (`js/build-artifact-leak`) | security, external/cwe/cwe-312 | Highlights storage of sensitive information in build artifacts. Results are shown on LGTM by default. |
46+
| Improper code sanitization (`js/bad-code-sanitization`) | security, external/cwe/cwe-094, external/cwe/cwe-079, external/cwe/cwe-116 | Highlights string concatenation where code is constructed without proper sanitization. Results are shown on LGTM by default. |
47+
| Disabling certificate validation (`js/disabling-certificate-validation`) | security, external/cwe-295 | Highlights locations where SSL certificate validation is disabled. Results are shown on LGTM by default. |
48+
| Incomplete multi-character sanitization (`js/incomplete-multi-character-sanitization`) | correctness, security, external/cwe/cwe-20, external/cwe/cwe-116 | Highlights sanitizers that fail to remove dangerous substrings completely. Results are shown on LGTM by default. |
3749

3850
## Changes to existing queries
3951

@@ -42,15 +54,18 @@
4254
| Client-side cross-site scripting (`js/xss`) | Fewer results | This query now recognizes additional safe patterns of constructing HTML. |
4355
| Client-side URL redirect (`js/client-side-unvalidated-url-redirection`) | Fewer results | This query now recognizes additional safe patterns of doing URL redirects. |
4456
| Code injection (`js/code-injection`) | More results | More potential vulnerabilities involving NoSQL code operators are now recognized. |
57+
| Exception text reinterpreted as HTML (`js/exception-xss`) | Rephrased and changed visibility | Rephrased name and alert message. Severity lowered from error to warning. Results are now shown on LGTM by default. |
4558
| Expression has no effect (`js/useless-expression`) | Fewer results | This query no longer flags an expression when that expression is the only content of the containing file. |
4659
| Hard-coded credentials (`js/hardcoded-credentials`) | More results | This query now recognizes hard-coded credentials sent via HTTP authorization headers. |
4760
| Incomplete URL scheme check (`js/incomplete-url-scheme-check`) | More results | This query now recognizes additional url scheme checks. |
61+
| Insecure randomness (`js/insecure-randomness`) | Fewer results | This query now recognizes when an insecure random value is used as a fallback when secure random values are unsupported. |
4862
| Misspelled variable name (`js/misspelled-variable-name`) | Message changed | The message for this query now correctly identifies the misspelled variable in additional cases. |
4963
| Non-linear pattern (`js/non-linear-pattern`) | Fewer duplicates and message changed | This query now generates fewer duplicate alerts and has a clearer explanation in case of type annotations used in a pattern. |
5064
| Prototype pollution in utility function (`js/prototype-pollution-utility`) | More results | This query now recognizes additional utility functions as vulnerable to prototype polution. |
5165
| Uncontrolled command line (`js/command-line-injection`) | More results | This query now recognizes additional command execution calls. |
5266
| Uncontrolled data used in path expression (`js/path-injection`) | More results | This query now recognizes additional file system calls. |
5367
| Unknown directive (`js/unknown-directive`) | Fewer results | This query no longer flags directives generated by the Babel compiler. |
68+
| Unneeded defensive code (`js/unneeded-defensive-code`) | Fewer false-positive results | This query now recognizes checks meant to handle the `document.all` object. |
5469
| Unused property (`js/unused-property`) | Fewer results | This query no longer flags properties of objects that are operands of `yield` expressions. |
5570
| Zip Slip (`js/zipslip`) | More results | This query now recognizes additional vulnerabilities. |
5671

@@ -86,3 +101,4 @@ The following low-precision queries are no longer run by default on LGTM (their
86101
- `ParameterNode.asExpr()` and `.getAstNode()` now gets the parameter's AST node, whereas previously it had no result.
87102
- `Expr.flow()` now has a more meaningful result for destructuring patterns. Previously this node was disconnected from the data flow graph. Now it represents the values being destructured by the pattern.
88103
* The global data-flow and taint-tracking libraries now model indirect parameter accesses through the `arguments` object in some cases, which may lead to additional results from some of the security queries, particularly "Prototype pollution in utility function".
104+
* The predicates `Type.getProperty()` and variants of `Type.getMethod()` have been deprecated due to lack of use-cases. Looking up a named property of a static type is no longer supported, favoring faster extraction times instead.

cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* or data representation problems.
66
* @kind path-problem
77
* @problem.severity warning
8-
* @precision medium
8+
* @precision high
99
* @id cpp/tainted-format-string
1010
* @tags reliability
1111
* security

cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* or data representation problems.
66
* @kind path-problem
77
* @problem.severity warning
8-
* @precision medium
8+
* @precision high
99
* @id cpp/tainted-format-string-through-global
1010
* @tags reliability
1111
* security

cpp/ql/src/experimental/semmle/code/cpp/rangeanalysis/ArrayLengthAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import semmle.code.cpp.ir.IR
2020
private import semmle.code.cpp.ir.ValueNumbering
2121
private import semmle.code.cpp.ir.internal.CppType
2222
private import semmle.code.cpp.models.interfaces.Allocation
23-
private import semmle.code.cpp.rangeanalysis.RangeUtils
23+
private import experimental.semmle.code.cpp.rangeanalysis.RangeUtils
2424

2525
private newtype TLength =
2626
TZeroLength() or

cpp/ql/src/experimental/semmle/code/cpp/rangeanalysis/InBoundsPointerDeref.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
private import experimental.semmle.code.cpp.rangeanalysis.ArrayLengthAnalysis
16-
private import semmle.code.cpp.rangeanalysis.RangeAnalysis
16+
private import experimental.semmle.code.cpp.rangeanalysis.RangeAnalysis
1717

1818
/**
1919
* Gets the instruction that computes the address of memory that `i` accesses.

0 commit comments

Comments
 (0)