mirror of
https://github.com/github/codeql.git
synced 2026-02-01 15:52:59 +01:00
Remove io.Writer model from io/ioutil
This commit is contained in:
@@ -38,19 +38,4 @@ module IoIoutil {
|
||||
input = inp and output = outp
|
||||
}
|
||||
}
|
||||
|
||||
private class MethodModels extends TaintTracking::FunctionModel, Method {
|
||||
FunctionInput inp;
|
||||
FunctionOutput outp;
|
||||
|
||||
MethodModels() {
|
||||
// signature: func (Writer).Write(p []byte) (n int, err error)
|
||||
this.implements("io", "Writer", "Write") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input = inp and output = outp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,6 @@ func TaintStepTest_IoIoutilReadAll_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
return intoByte650
|
||||
}
|
||||
|
||||
func TaintStepTest_IoWriterWrite_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte784 := sourceCQL.([]byte)
|
||||
var intoWriter957 io.Writer
|
||||
intoWriter957.Write(fromByte784)
|
||||
return intoWriter957
|
||||
}
|
||||
|
||||
func RunAllTaints_IoIoutil() {
|
||||
{
|
||||
source := newSource(0)
|
||||
@@ -37,9 +30,4 @@ func RunAllTaints_IoIoutil() {
|
||||
out := TaintStepTest_IoIoutilReadAll_B0I0O0(source)
|
||||
sink(1, out)
|
||||
}
|
||||
{
|
||||
source := newSource(2)
|
||||
out := TaintStepTest_IoWriterWrite_B0I0O0(source)
|
||||
sink(2, out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user