@@ -44,58 +44,6 @@ import semmle.go.frameworks.stdlib.TextTabwriter
44
44
import semmle.go.frameworks.stdlib.TextTemplate
45
45
import semmle.go.frameworks.stdlib.Unsafe
46
46
47
- // These are modeled using TaintTracking::FunctionModel because they doesn't have real type signatures,
48
- // and therefore currently have 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
-
61
- /**
62
- * A model of the built-in `copy` function, which propagates taint from its second argument
63
- * to its first.
64
- */
65
- private class CopyFunction extends TaintTracking:: FunctionModel {
66
- CopyFunction ( ) { this = Builtin:: copy ( ) }
67
-
68
- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
69
- inp .isParameter ( 1 ) and outp .isParameter ( 0 )
70
- }
71
- }
72
-
73
- /**
74
- * A model of the built-in `min` function, which computes the smallest value of a fixed number of
75
- * arguments of ordered types. There is at least one argument and "ordered types" includes e.g.
76
- * strings, so we care about data flow through `min`.
77
- */
78
- private class MinFunction extends DataFlow:: FunctionModel {
79
- MinFunction ( ) { this = Builtin:: min_ ( ) }
80
-
81
- override predicate hasDataFlow ( FunctionInput inp , FunctionOutput outp ) {
82
- inp .isParameter ( _) and outp .isResult ( )
83
- }
84
- }
85
-
86
- /**
87
- * A model of the built-in `max` function, which computes the largest value of a fixed number of
88
- * arguments of ordered types. There is at least one argument and "ordered types" includes e.g.
89
- * strings, so we care about data flow through `max`.
90
- */
91
- private class MaxFunction extends DataFlow:: FunctionModel {
92
- MaxFunction ( ) { this = Builtin:: max_ ( ) }
93
-
94
- override predicate hasDataFlow ( FunctionInput inp , FunctionOutput outp ) {
95
- inp .isParameter ( _) and outp .isResult ( )
96
- }
97
- }
98
-
99
47
/** Provides a class for modeling functions which convert strings into integers. */
100
48
module IntegerParser {
101
49
/**
0 commit comments