You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate.
95
95
The first five values identify the function (in this case a method) to be modeled as a sink.
96
96
97
97
- The first value ``database/sql`` is the package name.
98
98
- The second value ``DB`` is the name of the type that the method is associated with.
99
-
- The third value ``False`` is a flag that indicates whether or not the sink also applies to all overrides of the method.
99
+
- The third value ``True`` is a flag that indicates whether or not the sink also applies to subtypes. This includes when the subtype embeds the given type, so that the method or field is promoted to be a method or field of the subtype. For interface methods it also includes types which implement the interface type.
100
100
- The fourth value ``Prepare`` is the method name.
101
101
- The fifth value ``""`` is the method input type signature. For Go it should always be an empty string. It is needed for other languages where multiple functions or methods may have the same name and they need to be distinguished by the number and types of the arguments.
102
102
@@ -137,7 +137,7 @@ The first five values identify the function to be modeled as a source.
137
137
138
138
- The first value ``net/http`` is the package name.
139
139
- The second value ``Request`` is the type name, since the function is a method of the ``Request`` type.
140
-
- The third value ``True`` is a flag that indicates whether or not the source also applies to all overrides of the method.
140
+
- The third value ``True`` is a flag that indicates whether or not the sink also applies to subtypes. This includes when the subtype embeds the given type, so that the method or field is promoted to be a method or field of the subtype. For interface methods it also includes types which implement the interface type.
141
141
- The fourth value ``FormValue`` is the function name.
142
142
- The fifth value ``""`` is the function input type signature. For Go it should always be an empty string. It is needed for other languages where multiple functions or methods may have the same name and they need to be distinguished by the number and types of the arguments.
143
143
@@ -183,7 +183,7 @@ These are the same for both of the rows above as we are adding two summaries for
183
183
184
184
- The first value ``strings`` is the package name.
185
185
- The second value ``""`` is left blank, since the function is not a method of a type.
186
-
- The third value ``False`` is a flag that indicates whether or not the summary also applies to all overrides of the method.
186
+
- The third value ``False`` is a flag that indicates whether or not the sink also applies to subtypes. This has no effect for non-method functions.
187
187
- The fourth value ``Join`` is the function name.
188
188
- The fifth value ``""`` is left blank, since specifying the signature is optional and Go does not allow multiple signature overloads for the same function.
189
189
@@ -238,7 +238,7 @@ The first five values identify the function (in this case a method) to be modele
238
238
239
239
- The first value ``net/url`` is the package name.
240
240
- The second value ``URL`` is the receiver type.
241
-
- The third value ``True`` is a flag that indicates whether or not the summary also applies to all overrides of the method.
241
+
- The third value ``True`` is a flag that indicates whether or not the sink also applies to subtypes. This includes when the subtype embeds the given type, so that the method or field is promoted to be a method or field of the subtype. For interface methods it also includes types which implement the interface type.
242
242
- The fourth value ``Hostname`` is the method name.
243
243
- The fifth value ``""`` is left blank, since specifying the signature is optional and Go does not allow multiple signature overloads for the same function.
244
244
@@ -277,7 +277,7 @@ The first five values identify the field to be modeled as a source.
277
277
278
278
- The first value ``net/http`` is the package name.
279
279
- The second value ``Request`` is the name of the type that the field is associated with.
280
-
- The third value ``True`` is a flag that indicates whether or not the source also applies to all overrides of the field.
280
+
- The third value ``True`` is a flag that indicates whether or not the sink also applies to subtypes. For fields this means when the field is accessed as a promoted field in another type.
281
281
- The fourth value ``Body`` is the field name.
282
282
- The fifth value ``""`` is blank since it is a field access and field accesses do not have method signatures in Go.
0 commit comments