mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
C#: Avoid generating new source models on 'file' kind sources.
This commit is contained in:
@@ -234,6 +234,7 @@ string captureSource(TargetApi api) {
|
||||
config.hasFlow(source, sink) and
|
||||
ExternalFlow::sourceNode(source, kind) and
|
||||
api = sink.getEnclosingCallable() and
|
||||
isRelevantSourceKind(kind) and
|
||||
result = asSourceModel(api, returnNodeAsOutput(sink), kind)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -259,3 +259,9 @@ predicate isRelevantSinkKind(string kind) {
|
||||
not kind.matches("regex-use%") and
|
||||
not kind = "write-file"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `kind` is a relevant source kind for creating source models.
|
||||
*/
|
||||
bindingset[kind]
|
||||
predicate isRelevantSourceKind(string kind) { any() }
|
||||
|
||||
Reference in New Issue
Block a user