mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Model additions to encoding in Go 1.24
Add models for `BinaryAppender` and `TextAppender`.
This commit is contained in:
committed by
Owen Mansel-Chan
parent
a21dfc9a3b
commit
2806e07760
@@ -3,7 +3,11 @@ extensions:
|
||||
pack: codeql/go-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["encoding", "BinaryAppender", True, "AppendBinary", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "BinaryAppender", True, "AppendBinary", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "BinaryMarshaler", True, "MarshalBinary", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "BinaryUnmarshaler", True, "UnmarshalBinary", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
|
||||
- ["encoding", "TextAppender", True, "AppendText", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "TextAppender", True, "AppendText", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "TextMarshaler", True, "MarshalText", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
|
||||
- ["encoding", "TextUnmarshaler", True, "UnmarshalText", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// Code generated by https://github.com/gagliardetto/codebox. DO NOT EDIT.
|
||||
|
||||
package main
|
||||
|
||||
import "encoding"
|
||||
@@ -30,6 +28,34 @@ func TaintStepTest_EncodingTextUnmarshalerUnmarshalText_B0I0O0(sourceCQL interfa
|
||||
return intoTextUnmarshaler443
|
||||
}
|
||||
|
||||
func TaintStepTest_EncodingBinaryAppenderAppendBinary_manual1(sourceCQL interface{}) interface{} {
|
||||
fromBinaryAppender := sourceCQL.(encoding.BinaryAppender)
|
||||
var arg0 []byte
|
||||
intoByte, _ := fromBinaryAppender.AppendBinary(arg0)
|
||||
return intoByte
|
||||
}
|
||||
|
||||
func TaintStepTest_EncodingBinaryAppenderAppendBinary_manual2(sourceCQL interface{}) interface{} {
|
||||
var recv encoding.BinaryAppender
|
||||
fromByteSlice := sourceCQL.([]byte)
|
||||
intoByte, _ := recv.AppendBinary(fromByteSlice)
|
||||
return intoByte
|
||||
}
|
||||
|
||||
func TaintStepTest_EncodingTextAppenderAppendText_manual1(sourceCQL interface{}) interface{} {
|
||||
fromTextAppender := sourceCQL.(encoding.TextAppender)
|
||||
var arg0 []byte
|
||||
intoByte, _ := fromTextAppender.AppendText(arg0)
|
||||
return intoByte
|
||||
}
|
||||
|
||||
func TaintStepTest_EncodingTextAppenderAppendText_manual2(sourceCQL interface{}) interface{} {
|
||||
var recv encoding.TextAppender
|
||||
fromByteSlice := sourceCQL.([]byte)
|
||||
intoByte, _ := recv.AppendText(fromByteSlice)
|
||||
return intoByte
|
||||
}
|
||||
|
||||
func RunAllTaints_Encoding() {
|
||||
{
|
||||
source := newSource(0)
|
||||
@@ -51,4 +77,24 @@ func RunAllTaints_Encoding() {
|
||||
out := TaintStepTest_EncodingTextUnmarshalerUnmarshalText_B0I0O0(source)
|
||||
sink(3, out)
|
||||
}
|
||||
{
|
||||
source := newSource(4)
|
||||
out := TaintStepTest_EncodingBinaryAppenderAppendBinary_manual1(source)
|
||||
sink(4, out)
|
||||
}
|
||||
{
|
||||
source := newSource(5)
|
||||
out := TaintStepTest_EncodingBinaryAppenderAppendBinary_manual2(source)
|
||||
sink(5, out)
|
||||
}
|
||||
{
|
||||
source := newSource(6)
|
||||
out := TaintStepTest_EncodingTextAppenderAppendText_manual1(source)
|
||||
sink(6, out)
|
||||
}
|
||||
{
|
||||
source := newSource(7)
|
||||
out := TaintStepTest_EncodingTextAppenderAppendText_manual2(source)
|
||||
sink(7, out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user