mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Use existing predicate
There already exists the predicate implements(string pkg, string tp, string name) which does exactly what this code does
This commit is contained in:
@@ -10,10 +10,8 @@ private class JsonIteratorUnmarshalFunction extends TaintTracking::FunctionModel
|
||||
JsonIteratorUnmarshalFunction() {
|
||||
this.hasQualifiedName("github.com/json-iterator/go", ["Unmarshal", "UnmarshalFromString"])
|
||||
or
|
||||
exists(Method m |
|
||||
m.hasQualifiedName("github.com/json-iterator/go", "API", ["Unmarshal", "UnmarshalFromString"]) and
|
||||
this.(Method).implements(m)
|
||||
)
|
||||
this.(Method)
|
||||
.implements("github.com/json-iterator/go", "API", ["Unmarshal", "UnmarshalFromString"])
|
||||
}
|
||||
|
||||
override DataFlow::FunctionInput getAnInput() { result.isParameter(0) }
|
||||
|
||||
Reference in New Issue
Block a user