Files
codeql/go/ql/test/experimental/frameworks/CleverGo/TaintTracking.go
Owen Mansel-Chan a4df20da85 Rename UntrustedFlowSource to RemoteFlowSource
Relaxed match case requirement. Again skipped one instance in an old
change note.
2024-04-17 21:40:46 +01:00

88 lines
2.6 KiB
Go

// Code generated by https://github.com/gagliardetto. DO NOT EDIT.
package main
import (
"io"
"net/http"
"clevergo.tech/clevergo"
)
// Package clevergo.tech/clevergo@v0.5.2
func TaintTracking_ClevergoTechClevergoV052() {
// Taint-tracking through functions.
{
// func CleanPath(p string) string
{
fromString598 := source().(string)
intoString631 := clevergo.CleanPath(fromString598)
sink(intoString631) // $ hasTaintFlow="intoString631"
}
}
// Taint-tracking through method calls.
{
// Taint-tracking through method calls on clevergo.tech/clevergo.Application.
{
// func (*Application).RouteURL(name string, args ...string) (*net/url.URL, error)
{
{
fromString165 := source().(string)
var mediumObjCQL clevergo.Application
intoURL150, _ := mediumObjCQL.RouteURL(fromString165, "")
sink(intoURL150) // $ hasTaintFlow="intoURL150"
}
{
fromString340 := source().(string)
var mediumObjCQL clevergo.Application
intoURL471, _ := mediumObjCQL.RouteURL("", fromString340)
sink(intoURL471) // $ hasTaintFlow="intoURL471"
}
}
}
// Taint-tracking through method calls on clevergo.tech/clevergo.Context.
{
// func (*Context).Context() context.Context
{
fromContext290 := source().(clevergo.Context)
intoContext758 := fromContext290.Context()
sink(intoContext758) // $ hasTaintFlow="intoContext758"
}
}
// Taint-tracking through method calls on clevergo.tech/clevergo.Params.
{
// func (Params).String(name string) string
{
fromParams396 := source().(clevergo.Params)
intoString707 := fromParams396.String("")
sink(intoString707) // $ hasTaintFlow="intoString707" remoteFlowSource
}
}
}
// Taint-tracking through interface method calls.
{
// Taint-tracking through method calls on clevergo.tech/clevergo.Decoder interface.
{
// func (Decoder).Decode(req *net/http.Request, v interface{}) error
{
fromRequest912 := source().(*http.Request)
var intoInterface718 interface{}
var mediumObjCQL clevergo.Decoder
mediumObjCQL.Decode(fromRequest912, intoInterface718)
sink(intoInterface718) // $ hasTaintFlow="intoInterface718" remoteFlowSource
}
}
// Taint-tracking through method calls on clevergo.tech/clevergo.Renderer interface.
{
// func (Renderer).Render(w io.Writer, name string, data interface{}, c *Context) error
{
fromInterface972 := source().(interface{})
var intoWriter633 io.Writer
var mediumObjCQL clevergo.Renderer
mediumObjCQL.Render(intoWriter633, "", fromInterface972, nil)
sink(intoWriter633) // $ hasTaintFlow="intoWriter633"
}
}
}
}