mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Add taint-tracking for package "bytes"
This commit is contained in:
@@ -6,6 +6,7 @@ import go
|
||||
import semmle.go.frameworks.stdlib.ArchiveTar
|
||||
import semmle.go.frameworks.stdlib.ArchiveZip
|
||||
import semmle.go.frameworks.stdlib.Bufio
|
||||
import semmle.go.frameworks.stdlib.Bytes
|
||||
|
||||
/** A `String()` method. */
|
||||
class StringMethod extends TaintTracking::FunctionModel, Method {
|
||||
@@ -74,17 +75,6 @@ module PathFilePath {
|
||||
}
|
||||
}
|
||||
|
||||
/** Provides models of commonly used functions in the `bytes` package. */
|
||||
private module Bytes {
|
||||
private class BufferBytes extends TaintTracking::FunctionModel, Method {
|
||||
BufferBytes() { this.hasQualifiedName("bytes", "Buffer", ["Bytes", "String"]) }
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input.isReceiver() and output.isResult()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Provides models of commonly used functions in the `fmt` package. */
|
||||
module Fmt {
|
||||
/** The `Sprint` function or one of its variants. */
|
||||
|
||||
239
ql/src/semmle/go/frameworks/stdlib/Bytes.qll
Normal file
239
ql/src/semmle/go/frameworks/stdlib/Bytes.qll
Normal file
@@ -0,0 +1,239 @@
|
||||
/**
|
||||
* Provides classes modeling security-relevant aspects of the `bytes` package.
|
||||
*/
|
||||
|
||||
import go
|
||||
|
||||
/** Provides models of commonly used functions in the `bytes` package. */
|
||||
module Bytes {
|
||||
private class FunctionModels extends TaintTracking::FunctionModel {
|
||||
FunctionInput inp;
|
||||
FunctionOutput outp;
|
||||
|
||||
FunctionModels() {
|
||||
// signature: func Fields(s []byte) [][]byte
|
||||
hasQualifiedName("bytes", "Fields") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func FieldsFunc(s []byte, f func(rune) bool) [][]byte
|
||||
hasQualifiedName("bytes", "FieldsFunc") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func Join(s [][]byte, sep []byte) []byte
|
||||
hasQualifiedName("bytes", "Join") and
|
||||
(inp.isParameter(_) and outp.isResult())
|
||||
or
|
||||
// signature: func Map(mapping func(r rune) rune, s []byte) []byte
|
||||
hasQualifiedName("bytes", "Map") and
|
||||
(inp.isParameter(1) and outp.isResult())
|
||||
or
|
||||
// signature: func NewBuffer(buf []byte) *Buffer
|
||||
hasQualifiedName("bytes", "NewBuffer") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func NewBufferString(s string) *Buffer
|
||||
hasQualifiedName("bytes", "NewBufferString") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func NewReader(b []byte) *Reader
|
||||
hasQualifiedName("bytes", "NewReader") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func Repeat(b []byte, count int) []byte
|
||||
hasQualifiedName("bytes", "Repeat") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func Replace(s []byte, old []byte, new []byte, n int) []byte
|
||||
hasQualifiedName("bytes", "Replace") and
|
||||
(inp.isParameter([0, 2]) and outp.isResult())
|
||||
or
|
||||
// signature: func ReplaceAll(s []byte, old []byte, new []byte) []byte
|
||||
hasQualifiedName("bytes", "ReplaceAll") and
|
||||
(inp.isParameter([0, 2]) and outp.isResult())
|
||||
or
|
||||
// signature: func Runes(s []byte) []rune
|
||||
hasQualifiedName("bytes", "Runes") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func Split(s []byte, sep []byte) [][]byte
|
||||
hasQualifiedName("bytes", "Split") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func SplitAfter(s []byte, sep []byte) [][]byte
|
||||
hasQualifiedName("bytes", "SplitAfter") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func SplitAfterN(s []byte, sep []byte, n int) [][]byte
|
||||
hasQualifiedName("bytes", "SplitAfterN") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func SplitN(s []byte, sep []byte, n int) [][]byte
|
||||
hasQualifiedName("bytes", "SplitN") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func Title(s []byte) []byte
|
||||
hasQualifiedName("bytes", "Title") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func ToLower(s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToLower") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func ToLowerSpecial(c unicode.SpecialCase, s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToLowerSpecial") and
|
||||
(inp.isParameter(1) and outp.isResult())
|
||||
or
|
||||
// signature: func ToTitle(s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToTitle") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func ToTitleSpecial(c unicode.SpecialCase, s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToTitleSpecial") and
|
||||
(inp.isParameter(1) and outp.isResult())
|
||||
or
|
||||
// signature: func ToUpper(s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToUpper") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func ToUpperSpecial(c unicode.SpecialCase, s []byte) []byte
|
||||
hasQualifiedName("bytes", "ToUpperSpecial") and
|
||||
(inp.isParameter(1) and outp.isResult())
|
||||
or
|
||||
// signature: func ToValidUTF8(s []byte, replacement []byte) []byte
|
||||
hasQualifiedName("bytes", "ToValidUTF8") and
|
||||
(inp.isParameter(_) and outp.isResult())
|
||||
or
|
||||
// signature: func Trim(s []byte, cutset string) []byte
|
||||
hasQualifiedName("bytes", "Trim") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimFunc(s []byte, f func(r rune) bool) []byte
|
||||
hasQualifiedName("bytes", "TrimFunc") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimLeft(s []byte, cutset string) []byte
|
||||
hasQualifiedName("bytes", "TrimLeft") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimLeftFunc(s []byte, f func(r rune) bool) []byte
|
||||
hasQualifiedName("bytes", "TrimLeftFunc") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimPrefix(s []byte, prefix []byte) []byte
|
||||
hasQualifiedName("bytes", "TrimPrefix") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimRight(s []byte, cutset string) []byte
|
||||
hasQualifiedName("bytes", "TrimRight") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimRightFunc(s []byte, f func(r rune) bool) []byte
|
||||
hasQualifiedName("bytes", "TrimRightFunc") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimSpace(s []byte) []byte
|
||||
hasQualifiedName("bytes", "TrimSpace") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
or
|
||||
// signature: func TrimSuffix(s []byte, suffix []byte) []byte
|
||||
hasQualifiedName("bytes", "TrimSuffix") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input = inp and output = outp
|
||||
}
|
||||
}
|
||||
|
||||
private class MethodModels extends TaintTracking::FunctionModel, Method {
|
||||
FunctionInput inp;
|
||||
FunctionOutput outp;
|
||||
|
||||
MethodModels() {
|
||||
// Methods:
|
||||
// signature: func (*Buffer).Bytes() []byte
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "Bytes") and
|
||||
(inp.isReceiver() and outp.isResult())
|
||||
or
|
||||
// signature: func (*Buffer).Next(n int) []byte
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "Next") and
|
||||
(inp.isReceiver() and outp.isResult())
|
||||
or
|
||||
// signature: func (*Buffer).Read(p []byte) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "Read") and
|
||||
(inp.isReceiver() and outp.isParameter(0))
|
||||
or
|
||||
// signature: func (*Buffer).ReadByte() (byte, error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "ReadByte") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Buffer).ReadBytes(delim byte) (line []byte, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "ReadBytes") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Buffer).ReadFrom(r io.Reader) (n int64, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "ReadFrom") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Buffer).ReadRune() (r rune, size int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "ReadRune") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Buffer).ReadString(delim byte) (line string, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "ReadString") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Buffer).String() string
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "String") and
|
||||
(inp.isReceiver() and outp.isResult())
|
||||
or
|
||||
// signature: func (*Buffer).Write(p []byte) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "Write") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Buffer).WriteByte(c byte) error
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "WriteByte") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Buffer).WriteRune(r rune) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "WriteRune") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Buffer).WriteString(s string) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "WriteString") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Buffer).WriteTo(w io.Writer) (n int64, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Buffer", "WriteTo") and
|
||||
(inp.isReceiver() and outp.isParameter(0))
|
||||
or
|
||||
// signature: func (*Reader).Read(b []byte) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "Read") and
|
||||
(inp.isReceiver() and outp.isParameter(0))
|
||||
or
|
||||
// signature: func (*Reader).ReadAt(b []byte, off int64) (n int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "ReadAt") and
|
||||
(inp.isReceiver() and outp.isParameter(0))
|
||||
or
|
||||
// signature: func (*Reader).ReadByte() (byte, error)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "ReadByte") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Reader).ReadRune() (ch rune, size int, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "ReadRune") and
|
||||
(inp.isReceiver() and outp.isResult(0))
|
||||
or
|
||||
// signature: func (*Reader).Reset(b []byte)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "Reset") and
|
||||
(inp.isParameter(0) and outp.isReceiver())
|
||||
or
|
||||
// signature: func (*Reader).WriteTo(w io.Writer) (n int64, err error)
|
||||
this.(Method).hasQualifiedName("bytes", "Reader", "WriteTo") and
|
||||
(inp.isReceiver() and outp.isParameter(0))
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
|
||||
input = inp and output = outp
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,638 @@
|
||||
// Code generated by https://github.com/gagliardetto/codebox. DO NOT EDIT.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
)
|
||||
|
||||
func TaintStepTest_BytesFields_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte656 := sourceCQL.([]byte)
|
||||
intoByte414 := bytes.Fields(fromByte656)
|
||||
return intoByte414
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesFieldsFunc_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte518 := sourceCQL.([]byte)
|
||||
intoByte650 := bytes.FieldsFunc(fromByte518, nil)
|
||||
return intoByte650
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesJoin_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte784 := sourceCQL.([][]byte)
|
||||
intoByte957 := bytes.Join(fromByte784, nil)
|
||||
return intoByte957
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesJoin_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
fromByte520 := sourceCQL.([]byte)
|
||||
intoByte443 := bytes.Join(nil, fromByte520)
|
||||
return intoByte443
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesMap_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte127 := sourceCQL.([]byte)
|
||||
intoByte483 := bytes.Map(nil, fromByte127)
|
||||
return intoByte483
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesNewBuffer_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte989 := sourceCQL.([]byte)
|
||||
intoBuffer982 := bytes.NewBuffer(fromByte989)
|
||||
return intoBuffer982
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesNewBufferString_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromString417 := sourceCQL.(string)
|
||||
intoBuffer584 := bytes.NewBufferString(fromString417)
|
||||
return intoBuffer584
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesNewReader_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte991 := sourceCQL.([]byte)
|
||||
intoReader881 := bytes.NewReader(fromByte991)
|
||||
return intoReader881
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesRepeat_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte186 := sourceCQL.([]byte)
|
||||
intoByte284 := bytes.Repeat(fromByte186, 0)
|
||||
return intoByte284
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReplace_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte908 := sourceCQL.([]byte)
|
||||
intoByte137 := bytes.Replace(fromByte908, nil, nil, 0)
|
||||
return intoByte137
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReplace_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
fromByte494 := sourceCQL.([]byte)
|
||||
intoByte873 := bytes.Replace(nil, nil, fromByte494, 0)
|
||||
return intoByte873
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReplaceAll_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte599 := sourceCQL.([]byte)
|
||||
intoByte409 := bytes.ReplaceAll(fromByte599, nil, nil)
|
||||
return intoByte409
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReplaceAll_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
fromByte246 := sourceCQL.([]byte)
|
||||
intoByte898 := bytes.ReplaceAll(nil, nil, fromByte246)
|
||||
return intoByte898
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesRunes_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte598 := sourceCQL.([]byte)
|
||||
intoRune631 := bytes.Runes(fromByte598)
|
||||
return intoRune631
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesSplit_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte165 := sourceCQL.([]byte)
|
||||
intoByte150 := bytes.Split(fromByte165, nil)
|
||||
return intoByte150
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesSplitAfter_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte340 := sourceCQL.([]byte)
|
||||
intoByte471 := bytes.SplitAfter(fromByte340, nil)
|
||||
return intoByte471
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesSplitAfterN_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte290 := sourceCQL.([]byte)
|
||||
intoByte758 := bytes.SplitAfterN(fromByte290, nil, 0)
|
||||
return intoByte758
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesSplitN_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte396 := sourceCQL.([]byte)
|
||||
intoByte707 := bytes.SplitN(fromByte396, nil, 0)
|
||||
return intoByte707
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTitle_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte912 := sourceCQL.([]byte)
|
||||
intoByte718 := bytes.Title(fromByte912)
|
||||
return intoByte718
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToLower_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte972 := sourceCQL.([]byte)
|
||||
intoByte633 := bytes.ToLower(fromByte972)
|
||||
return intoByte633
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToLowerSpecial_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte316 := sourceCQL.([]byte)
|
||||
intoByte145 := bytes.ToLowerSpecial(nil, fromByte316)
|
||||
return intoByte145
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToTitle_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte817 := sourceCQL.([]byte)
|
||||
intoByte474 := bytes.ToTitle(fromByte817)
|
||||
return intoByte474
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToTitleSpecial_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte832 := sourceCQL.([]byte)
|
||||
intoByte378 := bytes.ToTitleSpecial(nil, fromByte832)
|
||||
return intoByte378
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToUpper_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte541 := sourceCQL.([]byte)
|
||||
intoByte139 := bytes.ToUpper(fromByte541)
|
||||
return intoByte139
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToUpperSpecial_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte814 := sourceCQL.([]byte)
|
||||
intoByte768 := bytes.ToUpperSpecial(nil, fromByte814)
|
||||
return intoByte768
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToValidUTF8_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte468 := sourceCQL.([]byte)
|
||||
intoByte736 := bytes.ToValidUTF8(fromByte468, nil)
|
||||
return intoByte736
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesToValidUTF8_B0I1O0(sourceCQL interface{}) interface{} {
|
||||
fromByte516 := sourceCQL.([]byte)
|
||||
intoByte246 := bytes.ToValidUTF8(nil, fromByte516)
|
||||
return intoByte246
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrim_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte679 := sourceCQL.([]byte)
|
||||
intoByte736 := bytes.Trim(fromByte679, "")
|
||||
return intoByte736
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimFunc_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte839 := sourceCQL.([]byte)
|
||||
intoByte273 := bytes.TrimFunc(fromByte839, nil)
|
||||
return intoByte273
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimLeft_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte982 := sourceCQL.([]byte)
|
||||
intoByte458 := bytes.TrimLeft(fromByte982, "")
|
||||
return intoByte458
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimLeftFunc_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte506 := sourceCQL.([]byte)
|
||||
intoByte213 := bytes.TrimLeftFunc(fromByte506, nil)
|
||||
return intoByte213
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimPrefix_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte468 := sourceCQL.([]byte)
|
||||
intoByte219 := bytes.TrimPrefix(fromByte468, nil)
|
||||
return intoByte219
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimRight_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte265 := sourceCQL.([]byte)
|
||||
intoByte971 := bytes.TrimRight(fromByte265, "")
|
||||
return intoByte971
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimRightFunc_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte320 := sourceCQL.([]byte)
|
||||
intoByte545 := bytes.TrimRightFunc(fromByte320, nil)
|
||||
return intoByte545
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimSpace_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte566 := sourceCQL.([]byte)
|
||||
intoByte497 := bytes.TrimSpace(fromByte566)
|
||||
return intoByte497
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesTrimSuffix_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte274 := sourceCQL.([]byte)
|
||||
intoByte783 := bytes.TrimSuffix(fromByte274, nil)
|
||||
return intoByte783
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferBytes_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer905 := sourceCQL.(bytes.Buffer)
|
||||
intoByte389 := fromBuffer905.Bytes()
|
||||
return intoByte389
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferNext_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer198 := sourceCQL.(bytes.Buffer)
|
||||
intoByte477 := fromBuffer198.Next(0)
|
||||
return intoByte477
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferRead_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer544 := sourceCQL.(bytes.Buffer)
|
||||
var intoByte382 []byte
|
||||
fromBuffer544.Read(intoByte382)
|
||||
return intoByte382
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferReadByte_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer715 := sourceCQL.(bytes.Buffer)
|
||||
intoByte179, _ := fromBuffer715.ReadByte()
|
||||
return intoByte179
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferReadBytes_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer366 := sourceCQL.(bytes.Buffer)
|
||||
intoByte648, _ := fromBuffer366.ReadBytes(0)
|
||||
return intoByte648
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferReadFrom_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader544 := sourceCQL.(io.Reader)
|
||||
var intoBuffer484 bytes.Buffer
|
||||
intoBuffer484.ReadFrom(fromReader544)
|
||||
return intoBuffer484
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferReadRune_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer824 := sourceCQL.(bytes.Buffer)
|
||||
intoRune754, _, _ := fromBuffer824.ReadRune()
|
||||
return intoRune754
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferReadString_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer680 := sourceCQL.(bytes.Buffer)
|
||||
intoString722, _ := fromBuffer680.ReadString(0)
|
||||
return intoString722
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferString_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer506 := sourceCQL.(bytes.Buffer)
|
||||
intoString121 := fromBuffer506.String()
|
||||
return intoString121
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferWrite_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte293 := sourceCQL.([]byte)
|
||||
var intoBuffer151 bytes.Buffer
|
||||
intoBuffer151.Write(fromByte293)
|
||||
return intoBuffer151
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferWriteByte_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte849 := sourceCQL.(byte)
|
||||
var intoBuffer322 bytes.Buffer
|
||||
intoBuffer322.WriteByte(fromByte849)
|
||||
return intoBuffer322
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferWriteRune_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromRune339 := sourceCQL.(rune)
|
||||
var intoBuffer478 bytes.Buffer
|
||||
intoBuffer478.WriteRune(fromRune339)
|
||||
return intoBuffer478
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferWriteString_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromString399 := sourceCQL.(string)
|
||||
var intoBuffer426 bytes.Buffer
|
||||
intoBuffer426.WriteString(fromString399)
|
||||
return intoBuffer426
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesBufferWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromBuffer628 := sourceCQL.(bytes.Buffer)
|
||||
var intoWriter197 io.Writer
|
||||
fromBuffer628.WriteTo(intoWriter197)
|
||||
return intoWriter197
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderRead_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader216 := sourceCQL.(bytes.Reader)
|
||||
var intoByte742 []byte
|
||||
fromReader216.Read(intoByte742)
|
||||
return intoByte742
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderReadAt_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader906 := sourceCQL.(bytes.Reader)
|
||||
var intoByte620 []byte
|
||||
fromReader906.ReadAt(intoByte620, 0)
|
||||
return intoByte620
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderReadByte_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader158 := sourceCQL.(bytes.Reader)
|
||||
intoByte353, _ := fromReader158.ReadByte()
|
||||
return intoByte353
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderReadRune_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader625 := sourceCQL.(bytes.Reader)
|
||||
intoRune340, _, _ := fromReader625.ReadRune()
|
||||
return intoRune340
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderReset_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromByte741 := sourceCQL.([]byte)
|
||||
var intoReader199 bytes.Reader
|
||||
intoReader199.Reset(fromByte741)
|
||||
return intoReader199
|
||||
}
|
||||
|
||||
func TaintStepTest_BytesReaderWriteTo_B0I0O0(sourceCQL interface{}) interface{} {
|
||||
fromReader873 := sourceCQL.(bytes.Reader)
|
||||
var intoWriter304 io.Writer
|
||||
fromReader873.WriteTo(intoWriter304)
|
||||
return intoWriter304
|
||||
}
|
||||
|
||||
func RunAllTaints_Bytes() {
|
||||
{
|
||||
source := newSource(0)
|
||||
out := TaintStepTest_BytesFields_B0I0O0(source)
|
||||
sink(0, out)
|
||||
}
|
||||
{
|
||||
source := newSource(1)
|
||||
out := TaintStepTest_BytesFieldsFunc_B0I0O0(source)
|
||||
sink(1, out)
|
||||
}
|
||||
{
|
||||
source := newSource(2)
|
||||
out := TaintStepTest_BytesJoin_B0I0O0(source)
|
||||
sink(2, out)
|
||||
}
|
||||
{
|
||||
source := newSource(3)
|
||||
out := TaintStepTest_BytesJoin_B0I1O0(source)
|
||||
sink(3, out)
|
||||
}
|
||||
{
|
||||
source := newSource(4)
|
||||
out := TaintStepTest_BytesMap_B0I0O0(source)
|
||||
sink(4, out)
|
||||
}
|
||||
{
|
||||
source := newSource(5)
|
||||
out := TaintStepTest_BytesNewBuffer_B0I0O0(source)
|
||||
sink(5, out)
|
||||
}
|
||||
{
|
||||
source := newSource(6)
|
||||
out := TaintStepTest_BytesNewBufferString_B0I0O0(source)
|
||||
sink(6, out)
|
||||
}
|
||||
{
|
||||
source := newSource(7)
|
||||
out := TaintStepTest_BytesNewReader_B0I0O0(source)
|
||||
sink(7, out)
|
||||
}
|
||||
{
|
||||
source := newSource(8)
|
||||
out := TaintStepTest_BytesRepeat_B0I0O0(source)
|
||||
sink(8, out)
|
||||
}
|
||||
{
|
||||
source := newSource(9)
|
||||
out := TaintStepTest_BytesReplace_B0I0O0(source)
|
||||
sink(9, out)
|
||||
}
|
||||
{
|
||||
source := newSource(10)
|
||||
out := TaintStepTest_BytesReplace_B0I1O0(source)
|
||||
sink(10, out)
|
||||
}
|
||||
{
|
||||
source := newSource(11)
|
||||
out := TaintStepTest_BytesReplaceAll_B0I0O0(source)
|
||||
sink(11, out)
|
||||
}
|
||||
{
|
||||
source := newSource(12)
|
||||
out := TaintStepTest_BytesReplaceAll_B0I1O0(source)
|
||||
sink(12, out)
|
||||
}
|
||||
{
|
||||
source := newSource(13)
|
||||
out := TaintStepTest_BytesRunes_B0I0O0(source)
|
||||
sink(13, out)
|
||||
}
|
||||
{
|
||||
source := newSource(14)
|
||||
out := TaintStepTest_BytesSplit_B0I0O0(source)
|
||||
sink(14, out)
|
||||
}
|
||||
{
|
||||
source := newSource(15)
|
||||
out := TaintStepTest_BytesSplitAfter_B0I0O0(source)
|
||||
sink(15, out)
|
||||
}
|
||||
{
|
||||
source := newSource(16)
|
||||
out := TaintStepTest_BytesSplitAfterN_B0I0O0(source)
|
||||
sink(16, out)
|
||||
}
|
||||
{
|
||||
source := newSource(17)
|
||||
out := TaintStepTest_BytesSplitN_B0I0O0(source)
|
||||
sink(17, out)
|
||||
}
|
||||
{
|
||||
source := newSource(18)
|
||||
out := TaintStepTest_BytesTitle_B0I0O0(source)
|
||||
sink(18, out)
|
||||
}
|
||||
{
|
||||
source := newSource(19)
|
||||
out := TaintStepTest_BytesToLower_B0I0O0(source)
|
||||
sink(19, out)
|
||||
}
|
||||
{
|
||||
source := newSource(20)
|
||||
out := TaintStepTest_BytesToLowerSpecial_B0I0O0(source)
|
||||
sink(20, out)
|
||||
}
|
||||
{
|
||||
source := newSource(21)
|
||||
out := TaintStepTest_BytesToTitle_B0I0O0(source)
|
||||
sink(21, out)
|
||||
}
|
||||
{
|
||||
source := newSource(22)
|
||||
out := TaintStepTest_BytesToTitleSpecial_B0I0O0(source)
|
||||
sink(22, out)
|
||||
}
|
||||
{
|
||||
source := newSource(23)
|
||||
out := TaintStepTest_BytesToUpper_B0I0O0(source)
|
||||
sink(23, out)
|
||||
}
|
||||
{
|
||||
source := newSource(24)
|
||||
out := TaintStepTest_BytesToUpperSpecial_B0I0O0(source)
|
||||
sink(24, out)
|
||||
}
|
||||
{
|
||||
source := newSource(25)
|
||||
out := TaintStepTest_BytesToValidUTF8_B0I0O0(source)
|
||||
sink(25, out)
|
||||
}
|
||||
{
|
||||
source := newSource(26)
|
||||
out := TaintStepTest_BytesToValidUTF8_B0I1O0(source)
|
||||
sink(26, out)
|
||||
}
|
||||
{
|
||||
source := newSource(27)
|
||||
out := TaintStepTest_BytesTrim_B0I0O0(source)
|
||||
sink(27, out)
|
||||
}
|
||||
{
|
||||
source := newSource(28)
|
||||
out := TaintStepTest_BytesTrimFunc_B0I0O0(source)
|
||||
sink(28, out)
|
||||
}
|
||||
{
|
||||
source := newSource(29)
|
||||
out := TaintStepTest_BytesTrimLeft_B0I0O0(source)
|
||||
sink(29, out)
|
||||
}
|
||||
{
|
||||
source := newSource(30)
|
||||
out := TaintStepTest_BytesTrimLeftFunc_B0I0O0(source)
|
||||
sink(30, out)
|
||||
}
|
||||
{
|
||||
source := newSource(31)
|
||||
out := TaintStepTest_BytesTrimPrefix_B0I0O0(source)
|
||||
sink(31, out)
|
||||
}
|
||||
{
|
||||
source := newSource(32)
|
||||
out := TaintStepTest_BytesTrimRight_B0I0O0(source)
|
||||
sink(32, out)
|
||||
}
|
||||
{
|
||||
source := newSource(33)
|
||||
out := TaintStepTest_BytesTrimRightFunc_B0I0O0(source)
|
||||
sink(33, out)
|
||||
}
|
||||
{
|
||||
source := newSource(34)
|
||||
out := TaintStepTest_BytesTrimSpace_B0I0O0(source)
|
||||
sink(34, out)
|
||||
}
|
||||
{
|
||||
source := newSource(35)
|
||||
out := TaintStepTest_BytesTrimSuffix_B0I0O0(source)
|
||||
sink(35, out)
|
||||
}
|
||||
{
|
||||
source := newSource(36)
|
||||
out := TaintStepTest_BytesBufferBytes_B0I0O0(source)
|
||||
sink(36, out)
|
||||
}
|
||||
{
|
||||
source := newSource(37)
|
||||
out := TaintStepTest_BytesBufferNext_B0I0O0(source)
|
||||
sink(37, out)
|
||||
}
|
||||
{
|
||||
source := newSource(38)
|
||||
out := TaintStepTest_BytesBufferRead_B0I0O0(source)
|
||||
sink(38, out)
|
||||
}
|
||||
{
|
||||
source := newSource(39)
|
||||
out := TaintStepTest_BytesBufferReadByte_B0I0O0(source)
|
||||
sink(39, out)
|
||||
}
|
||||
{
|
||||
source := newSource(40)
|
||||
out := TaintStepTest_BytesBufferReadBytes_B0I0O0(source)
|
||||
sink(40, out)
|
||||
}
|
||||
{
|
||||
source := newSource(41)
|
||||
out := TaintStepTest_BytesBufferReadFrom_B0I0O0(source)
|
||||
sink(41, out)
|
||||
}
|
||||
{
|
||||
source := newSource(42)
|
||||
out := TaintStepTest_BytesBufferReadRune_B0I0O0(source)
|
||||
sink(42, out)
|
||||
}
|
||||
{
|
||||
source := newSource(43)
|
||||
out := TaintStepTest_BytesBufferReadString_B0I0O0(source)
|
||||
sink(43, out)
|
||||
}
|
||||
{
|
||||
source := newSource(44)
|
||||
out := TaintStepTest_BytesBufferString_B0I0O0(source)
|
||||
sink(44, out)
|
||||
}
|
||||
{
|
||||
source := newSource(45)
|
||||
out := TaintStepTest_BytesBufferWrite_B0I0O0(source)
|
||||
sink(45, out)
|
||||
}
|
||||
{
|
||||
source := newSource(46)
|
||||
out := TaintStepTest_BytesBufferWriteByte_B0I0O0(source)
|
||||
sink(46, out)
|
||||
}
|
||||
{
|
||||
source := newSource(47)
|
||||
out := TaintStepTest_BytesBufferWriteRune_B0I0O0(source)
|
||||
sink(47, out)
|
||||
}
|
||||
{
|
||||
source := newSource(48)
|
||||
out := TaintStepTest_BytesBufferWriteString_B0I0O0(source)
|
||||
sink(48, out)
|
||||
}
|
||||
{
|
||||
source := newSource(49)
|
||||
out := TaintStepTest_BytesBufferWriteTo_B0I0O0(source)
|
||||
sink(49, out)
|
||||
}
|
||||
{
|
||||
source := newSource(50)
|
||||
out := TaintStepTest_BytesReaderRead_B0I0O0(source)
|
||||
sink(50, out)
|
||||
}
|
||||
{
|
||||
source := newSource(51)
|
||||
out := TaintStepTest_BytesReaderReadAt_B0I0O0(source)
|
||||
sink(51, out)
|
||||
}
|
||||
{
|
||||
source := newSource(52)
|
||||
out := TaintStepTest_BytesReaderReadByte_B0I0O0(source)
|
||||
sink(52, out)
|
||||
}
|
||||
{
|
||||
source := newSource(53)
|
||||
out := TaintStepTest_BytesReaderReadRune_B0I0O0(source)
|
||||
sink(53, out)
|
||||
}
|
||||
{
|
||||
source := newSource(54)
|
||||
out := TaintStepTest_BytesReaderReset_B0I0O0(source)
|
||||
sink(54, out)
|
||||
}
|
||||
{
|
||||
source := newSource(55)
|
||||
out := TaintStepTest_BytesReaderWriteTo_B0I0O0(source)
|
||||
sink(55, out)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user