mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Swift: Add syntax for selecting PostUpdateNodes in CSV rows.
This commit is contained in:
@@ -200,14 +200,19 @@ predicate interpretOutputSpecific(string c, InterpretNode mid, InterpretNode nod
|
||||
}
|
||||
|
||||
predicate interpretInputSpecific(string c, InterpretNode mid, InterpretNode node) {
|
||||
// Allow fields to be picked as input nodes.
|
||||
exists(Node n, AstNode ast, MemberRefExpr e |
|
||||
n = node.asNode() and
|
||||
ast = mid.asElement()
|
||||
|
|
||||
c = "" and
|
||||
e.getBase() = n.asExpr() and
|
||||
ast = mid.asElement() and
|
||||
e.getMember() = ast
|
||||
|
|
||||
// Allow fields to be picked as input nodes.
|
||||
c = "" and
|
||||
e.getBase() = n.asExpr()
|
||||
or
|
||||
// Allow post update nodes to be picked as input nodes when the `input` column
|
||||
// of the row is `PostUpdate`.
|
||||
c = "PostUpdate" and
|
||||
e.getBase() = n.(PostUpdateNode).getPreUpdateNode().asExpr()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ private class TlsExtensionsSinks extends SinkModelCsv {
|
||||
row =
|
||||
[
|
||||
// TLS-related properties of `URLSessionConfiguration`
|
||||
";URLSessionConfiguration;false;tlsMinimumSupportedProtocolVersion;;;;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMinimumSupportedProtocol;;;;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMaximumSupportedProtocolVersion;;;;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMaximumSupportedProtocol;;;;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMinimumSupportedProtocolVersion;;;PostUpdate;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMinimumSupportedProtocol;;;PostUpdate;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMaximumSupportedProtocolVersion;;;PostUpdate;tls-protocol-version",
|
||||
";URLSessionConfiguration;false;tlsMaximumSupportedProtocol;;;PostUpdate;tls-protocol-version",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,5 @@ private class TlsExtensionsSinks extends SinkModelCsv {
|
||||
* A sink defined in a CSV model.
|
||||
*/
|
||||
private class DefaultTlsExtensionsSink extends InsecureTlsExtensionsSink {
|
||||
DefaultTlsExtensionsSink() {
|
||||
sinkNode(this.(DataFlow::PostUpdateNode).getPreUpdateNode(), "tls-protocol-version")
|
||||
}
|
||||
DefaultTlsExtensionsSink() { sinkNode(this, "tls-protocol-version") }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user