File tree Expand file tree Collapse file tree
go/ql/lib/semmle/go/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,20 @@ import semmle.go.frameworks.stdlib.TextTabwriter
4444import semmle.go.frameworks.stdlib.TextTemplate
4545import semmle.go.frameworks.stdlib.Unsafe
4646
47+ // This is modelled using TaintTracking::FunctionModel because it doesn't have a real type signature,
48+ // and therefore currently has an InvalidType, not a SignatureType, which breaks Models as Data.
49+ /**
50+ * A model of the built-in `append` function, which propagates taint from its arguments to its
51+ * result.
52+ */
53+ private class AppendFunction extends TaintTracking:: FunctionModel {
54+ AppendFunction ( ) { this = Builtin:: append ( ) }
55+
56+ override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
57+ inp .isParameter ( _) and outp .isResult ( )
58+ }
59+ }
60+
4761/** Provides a class for modeling functions which convert strings into integers. */
4862module IntegerParser {
4963 /**
You can’t perform that action at this time.
0 commit comments