mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
Merge pull request #252 from gagliardetto/patch-3
taint-tracking: String() must return a string type
This commit is contained in:
@@ -6,7 +6,11 @@ import go
|
||||
|
||||
/** A `String()` method. */
|
||||
class StringMethod extends TaintTracking::FunctionModel, Method {
|
||||
StringMethod() { getName() = "String" and getNumParameter() = 0 }
|
||||
StringMethod() {
|
||||
getName() = "String" and
|
||||
getNumParameter() = 0 and
|
||||
getResultType(0) = Builtin::string_().getType()
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp.isReceiver() and outp.isResult()
|
||||
|
||||
Reference in New Issue
Block a user