Skip to content

Commit aa6bd07

Browse files
author
Dave Bartolomeo
committed
Merge remote-tracking branch 'upstream/master' into dbartol/May-Must
2 parents f3b4140 + c05cc77 commit aa6bd07

File tree

163 files changed

+4728
-786
lines changed

Some content is hidden

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

163 files changed

+4728
-786
lines changed

change-notes/1.23/analysis-csharp.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ The following changes in version 1.23 affect C# analysis in all applications.
44

55
## New queries
66

7-
## New queries
8-
97
| **Query** | **Tags** | **Purpose** |
108
|-----------------------------|-----------|--------------------------------------------------------------------|
119
| Deserialized delegate (`cs/deserialized-delegate`) | security, external/cwe/cwe-502 | Finds unsafe deserialization of delegate types. |

change-notes/1.24/analysis-cpp.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Improvements to C/C++ analysis
2+
3+
The following changes in version 1.24 affect C/C++ analysis in all applications.
4+
5+
## General improvements
6+
7+
## New queries
8+
9+
| **Query** | **Tags** | **Purpose** |
10+
|-----------------------------|-----------|--------------------------------------------------------------------|
11+
12+
## Changes to existing queries
13+
14+
| **Query** | **Expected impact** | **Change** |
15+
|----------------------------|------------------------|------------------------------------------------------------------|
16+
| No space for zero terminator (`cpp/no-space-for-terminator`) | Fewer false positive results | This query has been modified to be more conservative when identifying which pointers point to null-terminated strings. This approach produces fewer, more accurate results. |
17+
18+
## Changes to libraries
19+
20+
*

change-notes/1.24/analysis-javascript.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## General improvements
44

5+
* Support for the following frameworks and libraries has been improved:
6+
- [react](https://www.npmjs.com/package/react)
7+
- [Handlebars](https://www.npmjs.com/package/handlebars)
58

69
## New queries
710

@@ -14,6 +17,8 @@
1417
| **Query** | **Expected impact** | **Change** |
1518
|--------------------------------|------------------------------|---------------------------------------------------------------------------|
1619
| Clear-text logging of sensitive information (`js/clear-text-logging`) | More results | More results involving `process.env` and indirect calls to logging methods are recognized. |
20+
| Incomplete string escaping or encoding (`js/incomplete-sanitization`) | Fewer false positive results | This query now recognizes additional cases where a single replacement is likely to be intentional. |
21+
| Unbound event handler receiver (`js/unbound-event-handler-receiver`) | Fewer false positive results | This query now recognizes additional ways event handler receivers can be bound. |
1722

1823
## Changes to libraries
1924

cpp/ql/src/Likely Bugs/Likely Typos/ExprHasNoEffect.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ where
8484
not peivc.getEnclosingFunction().isDefaulted() and
8585
not exists(Macro m | peivc = m.getAnInvocation().getAnExpandedElement()) and
8686
not peivc.isFromTemplateInstantiation(_) and
87+
not peivc.isFromUninstantiatedTemplate(_) and
8788
parent = peivc.getParent() and
8889
not parent.isInMacroExpansion() and
8990
not peivc.isUnevaluated() and

cpp/ql/src/Likely Bugs/Protocols/TlsSettingsMisconfiguration.qhelp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
<p>Using the TLS or SSLv23 protocol from the boost::asio library, but not disabling deprecated protocols may expose the software to known vulnerabilities or permit weak encryption algorithms to be used. Disabling the minimum-recommended protocols is also flagged.</p>
77
</overview>
88

9+
<recommendation>
10+
<p>When using the TLS or SSLv23 protocol, set the <code>no_tlsv1</code> and <code>no_tlsv1_1</code> options, but do not set <code>no_tlsv1_2</code>. When using the SSLv23 protocol, also set the <code>no_sslv3</code> option.</p>
11+
</recommendation>
12+
13+
<example>
14+
<p>In the following example, the <code>no_tlsv1_1</code> option has not been set. Use of TLS 1.1 is not recommended.</p>
15+
<sample src="TlsSettingsMisconfigurationBad.cpp"/>
16+
<p>In the corrected example, the <code>no_tlsv1</code> and <code>no_tlsv1_1</code> options have both been set, ensuring the use of TLS 1.2 or later.</p>
17+
<sample src="TlsSettingsMisconfigurationGood.cpp"/>
18+
</example>
19+
920
<references>
1021
<li>
1122
<a href="https://www.boost.org/doc/libs/1_71_0/doc/html/boost_asio.html">Boost.Asio documentation</a>.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
void useTLS_bad()
3+
{
4+
boost::asio::ssl::context ctx(boost::asio::ssl::context::tls);
5+
ctx.set_options(boost::asio::ssl::context::no_tlsv1); // BAD: missing no_tlsv1_1
6+
7+
// ...
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
void useTLS_good()
3+
{
4+
boost::asio::ssl::context ctx(boost::asio::ssl::context::tls);
5+
ctx.set_options(boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::no_tlsv1_1); // GOOD
6+
7+
// ...
8+
}

cpp/ql/src/Likely Bugs/Protocols/UseOfDeprecatedHardcodedProtocol.qhelp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44
<qhelp>
55
<overview>
66
<p>Using boost::asio library but specifying a deprecated hardcoded protocol.</p>
7-
<p>Using a deprecated hardcoded protocol instead of negotiting would lock your application to a protocol that has known vulnerabilities or weaknesses.</p>
87
</overview>
98

9+
<recommendation>
10+
<p>Only use modern protocols such as TLS 1.2 or TLS 1.3.</p>
11+
</recommendation>
12+
13+
<example>
14+
<p>In the following example, the <code>sslv2</code> protocol is specified. This protocol is out of date and its use is not recommended.</p>
15+
<sample src="UseOfDeprecatedHardcodedProtocolBad.cpp"/>
16+
<p>In the corrected example, the <code>tlsv13</code> protocol is used instead.</p>
17+
<sample src="UseOfDeprecatedHardcodedProtocolGood.cpp"/>
18+
</example>
19+
1020
<references>
1121
<li>
1222
<a href="https://www.boost.org/doc/libs/1_71_0/doc/html/boost_asio.html">Boost.Asio documentation</a>.
1323
</li>
1424
</references>
1525
</qhelp>
16-
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
void useProtocol_bad()
3+
{
4+
boost::asio::ssl::context ctx_sslv2(boost::asio::ssl::context::sslv2); // BAD: outdated protocol
5+
6+
// ...
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
void useProtocol_good()
3+
{
4+
boost::asio::ssl::context cxt_tlsv13(boost::asio::ssl::context::tlsv13);
5+
6+
// ...
7+
}

0 commit comments

Comments
 (0)