mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C#: Reduce the amount of trash flow summaries produced for StringValues.
This commit is contained in:
@@ -525,10 +525,14 @@ class StringValuesFlow extends LibraryTypeDataFlow, Struct {
|
||||
) {
|
||||
c.getDeclaringType() = this and
|
||||
(
|
||||
source instanceof CallableFlowSourceArg or
|
||||
source instanceof CallableFlowSourceQualifier
|
||||
exists(Parameter p, int i |
|
||||
p = c.getParameter(i) and
|
||||
source = TCallableFlowSourceArg(i)
|
||||
)
|
||||
or
|
||||
not c.(Method).isStatic() and source = TCallableFlowSourceQualifier()
|
||||
) and
|
||||
sink instanceof CallableFlowSinkReturn and
|
||||
sink = TCallableFlowSinkReturn() and
|
||||
preservesValue = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user