mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Ruby: Remove redundant .getExpr()
This commit is contained in:
@@ -118,12 +118,7 @@ class CallNode extends LocalSourceNode, ExprNode {
|
||||
.asExpr()
|
||||
.(CfgNodes::ExprNodes::HashLiteralCfgNode)
|
||||
.getAKeyValuePair() and
|
||||
exprNode(pair.getKey())
|
||||
.getALocalSource()
|
||||
.asExpr()
|
||||
.getExpr()
|
||||
.getConstantValue()
|
||||
.isStringlikeValue(name) and
|
||||
exprNode(pair.getKey()).getALocalSource().asExpr().getConstantValue().isStringlikeValue(name) and
|
||||
result.asExpr() = pair.getValue()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ class ExconHttpRequest extends HTTP::Client::Request::Range, DataFlow::CallNode
|
||||
.getArgument(0)
|
||||
.getALocalSource()
|
||||
.asExpr()
|
||||
.getExpr()
|
||||
.getConstantValue()
|
||||
.isStringlikeValue("ssl_verify_peer") and
|
||||
disablingNode = disableCall.getArgument(1) and
|
||||
|
||||
@@ -65,7 +65,7 @@ class FaradayHttpRequest extends HTTP::Client::Request::Range, DataFlow::CallNod
|
||||
exists(CfgNodes::ExprNodes::PairCfgNode p, DataFlow::Node key |
|
||||
p = sslValue.asExpr().(CfgNodes::ExprNodes::HashLiteralCfgNode).getAKeyValuePair() and
|
||||
key.asExpr() = p.getKey() and
|
||||
key.getALocalSource().asExpr().getExpr().getConstantValue().isStringlikeValue(argName) and
|
||||
key.getALocalSource().asExpr().getConstantValue().isStringlikeValue(argName) and
|
||||
result.asExpr() = p.getValue()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -86,11 +86,7 @@ class OpenUriKernelOpenRequest extends HTTP::Client::Request::Range, DataFlow::C
|
||||
optionsNode.flowsTo(this.getArgument(any(int i | i > 0))) and
|
||||
p = optionsNode.asExpr().(CfgNodes::ExprNodes::HashLiteralCfgNode).getAKeyValuePair() and
|
||||
key.asExpr() = p.getKey() and
|
||||
key.getALocalSource()
|
||||
.asExpr()
|
||||
.getExpr()
|
||||
.getConstantValue()
|
||||
.isStringlikeValue("ssl_verify_mode") and
|
||||
key.getALocalSource().asExpr().getConstantValue().isStringlikeValue("ssl_verify_mode") and
|
||||
result.asExpr() = p.getValue()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user