mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: CallExpr -> Call.
This commit is contained in:
@@ -107,9 +107,9 @@ module HardcodedCryptographicValue {
|
|||||||
|
|
||||||
HeuristicSinks() {
|
HeuristicSinks() {
|
||||||
// any argument going to a parameter whose name matches a credential name
|
// any argument going to a parameter whose name matches a credential name
|
||||||
exists(CallExprBase fc, Function f, int argIndex, string argName |
|
exists(Call c, Function f, int argIndex, string argName |
|
||||||
fc.getArg(argIndex) = this.asExpr() and
|
c.getPositionalArgument(argIndex) = this.asExpr() and
|
||||||
fc.getStaticTarget() = f and
|
c.getStaticTarget() = f and
|
||||||
f.getParam(argIndex).getPat().(IdentPat).getName().getText() = argName and
|
f.getParam(argIndex).getPat().(IdentPat).getName().getText() = argName and
|
||||||
(
|
(
|
||||||
argName = "password" and kind = "password"
|
argName = "password" and kind = "password"
|
||||||
@@ -123,7 +123,7 @@ module HardcodedCryptographicValue {
|
|||||||
// note: matching "key" results in too many false positives
|
// note: matching "key" results in too many false positives
|
||||||
) and
|
) and
|
||||||
// don't duplicate modeled sinks
|
// don't duplicate modeled sinks
|
||||||
not exists(ModelsAsDataSinks s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = fc)
|
not exists(ModelsAsDataSinks s | s.(Node::FlowSummaryNode).getSinkElement().getCall() = c)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user