We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da13e6b commit c944f1dCopy full SHA for c944f1d
go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll
@@ -271,6 +271,14 @@ module SourceSinkInterpretationInput implements
271
}
272
273
274
+ /**
275
+ * Holds if method or field spec `sse` applies in the context of qualifier `qual`.
276
+ *
277
+ * Note that naively checking `sse.asEntity()`'s qualified name is not correct, because
278
+ * `Method`s and `Field`s may have multiple qualified names due to embedding. We must instead
279
+ * check that the specific name given be `sse.hasTypeInfo` refers to either `qual`'s type
280
+ * or to a type it embeds.
281
+ */
282
private predicate elementAppliesToQualifier(SourceOrSinkElement sse, DataFlow::Node qual) {
283
(
284
exists(DataFlow::CallNode cn | cn.getReceiver() = qual and cn.getTarget() = sse.asEntity())
0 commit comments