Skip to content

Commit d9b0a59

Browse files
authored
Merge pull request #16018 from jketema/tls-precision
C++: Add precision to `cpp/boost/tls-settings-misconfiguration` and `cpp/boost/use-of-deprecated-hardcoded-security-protocol`
2 parents 1785086 + 453cdfa commit d9b0a59

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
2-
* @name Boost_asio TLS Settings Misconfiguration
2+
* @name boost::asio TLS settings misconfiguration
33
* @description Using the TLS or SSLv23 protocol from the boost::asio library, but not disabling deprecated protocols, or disabling minimum-recommended protocols.
44
* @kind problem
55
* @problem.severity error
6+
* @precision medium
67
* @security-severity 7.5
78
* @id cpp/boost/tls-settings-misconfiguration
89
* @tags security
@@ -42,10 +43,9 @@ predicate isOptionSet(ConstructorCall cc, int flag, FunctionCall fcSetOptions) {
4243
ExistsAnyFlow::flow(source, sink) and
4344
f.getACallToThisFunction() = fcSetOptions and
4445
contextSetOptions = fcSetOptions.getQualifier() and
45-
forall(Expr optionArgument, Expr optionArgumentSource |
46+
forex(Expr optionArgument |
4647
optionArgument = fcSetOptions.getArgument(0) and
47-
BoostorgAsio::SslOptionFlow::flow(DataFlow::exprNode(optionArgumentSource),
48-
DataFlow::exprNode(optionArgument))
48+
BoostorgAsio::SslOptionFlow::flowTo(DataFlow::exprNode(optionArgument))
4949
|
5050
optionArgument.getValue().toInt().bitShiftRight(16).bitAnd(flag) = flag
5151
)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
2-
* @name boost::asio Use of deprecated hardcoded Protocol
2+
* @name boost::asio use of deprecated hardcoded protocol
33
* @description Using a deprecated hard-coded protocol using the boost::asio library.
44
* @kind problem
55
* @problem.severity error
6+
* @precision medium
67
* @security-severity 7.5
78
* @id cpp/boost/use-of-deprecated-hardcoded-security-protocol
89
* @tags security
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: queryMetadata
3+
---
4+
* `@precision medium` metadata was added to the `cpp/boost/tls-settings-misconfiguration` and `cpp/boost/use-of-deprecated-hardcoded-security-protocol` queries, and these queries are now included in the security-extended suite. The `@name` metadata of these queries were also updated.

0 commit comments

Comments
 (0)