зеркало из https://github.com/github/codeql.git
Java/Go/Swift: Sync changes.
This commit is contained in:
Родитель
d24f032d97
Коммит
70c6744944
|
@ -299,8 +299,8 @@ predicate hasExternalSpecification(Function f) {
|
|||
f = any(SummarizedCallable sc).asFunction()
|
||||
or
|
||||
exists(SourceSinkInterpretationInput::SourceOrSinkElement e | f = e.asEntity() |
|
||||
SourceSinkInterpretationInput::sourceElement(e, _, _) or
|
||||
SourceSinkInterpretationInput::sinkElement(e, _, _)
|
||||
SourceSinkInterpretationInput::sourceElement(e, _, _, _) or
|
||||
SourceSinkInterpretationInput::sinkElement(e, _, _, _)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -103,11 +103,13 @@ module SourceSinkInterpretationInput implements
|
|||
* Holds if an external source specification exists for `e` with output specification
|
||||
* `output`, kind `kind`, and provenance `provenance`.
|
||||
*/
|
||||
predicate sourceElement(SourceOrSinkElement e, string output, string kind) {
|
||||
predicate sourceElement(
|
||||
SourceOrSinkElement e, string output, string kind, Public::Provenance provenance
|
||||
) {
|
||||
exists(
|
||||
string package, string type, boolean subtypes, string name, string signature, string ext
|
||||
|
|
||||
sourceModel(package, type, subtypes, name, signature, ext, output, kind, _) and
|
||||
sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance) and
|
||||
e = interpretElement(package, type, subtypes, name, signature, ext)
|
||||
)
|
||||
}
|
||||
|
@ -116,11 +118,13 @@ module SourceSinkInterpretationInput implements
|
|||
* Holds if an external sink specification exists for `e` with input specification
|
||||
* `input`, kind `kind` and provenance `provenance`.
|
||||
*/
|
||||
predicate sinkElement(SourceOrSinkElement e, string input, string kind) {
|
||||
predicate sinkElement(
|
||||
SourceOrSinkElement e, string input, string kind, Public::Provenance provenance
|
||||
) {
|
||||
exists(
|
||||
string package, string type, boolean subtypes, string name, string signature, string ext
|
||||
|
|
||||
sinkModel(package, type, subtypes, name, signature, ext, input, kind, _) and
|
||||
sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance) and
|
||||
e = interpretElement(package, type, subtypes, name, signature, ext)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -192,12 +192,12 @@ module SourceSinkInterpretationInput implements
|
|||
|
||||
class Element = J::Element;
|
||||
|
||||
predicate sourceElement(Element e, string output, string kind) {
|
||||
predicate sourceElement(Element e, string output, string kind, Public::Provenance provenance) {
|
||||
exists(
|
||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||
SourceOrSinkElement baseSource, string originalOutput
|
||||
|
|
||||
sourceModel(namespace, type, subtypes, name, signature, ext, originalOutput, kind, _) and
|
||||
sourceModel(namespace, type, subtypes, name, signature, ext, originalOutput, kind, provenance) and
|
||||
baseSource = interpretElement(namespace, type, subtypes, name, signature, ext) and
|
||||
(
|
||||
e = baseSource and output = originalOutput
|
||||
|
@ -207,12 +207,12 @@ module SourceSinkInterpretationInput implements
|
|||
)
|
||||
}
|
||||
|
||||
predicate sinkElement(Element e, string input, string kind) {
|
||||
predicate sinkElement(Element e, string input, string kind, Public::Provenance provenance) {
|
||||
exists(
|
||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||
SourceOrSinkElement baseSink, string originalInput
|
||||
|
|
||||
sinkModel(namespace, type, subtypes, name, signature, ext, originalInput, kind, _) and
|
||||
sinkModel(namespace, type, subtypes, name, signature, ext, originalInput, kind, provenance) and
|
||||
baseSink = interpretElement(namespace, type, subtypes, name, signature, ext) and
|
||||
(
|
||||
e = baseSink and originalInput = input
|
||||
|
|
|
@ -8,7 +8,7 @@ private import ModelEditor
|
|||
* A class of effectively public callables from source code.
|
||||
*/
|
||||
class PublicEndpointFromSource extends Endpoint, ModelApi {
|
||||
override predicate isSource() { SourceSinkInterpretationInput::sourceElement(this, _, _) }
|
||||
override predicate isSource() { SourceSinkInterpretationInput::sourceElement(this, _, _, _) }
|
||||
|
||||
override predicate isSink() { SourceSinkInterpretationInput::sinkElement(this, _, _) }
|
||||
override predicate isSink() { SourceSinkInterpretationInput::sinkElement(this, _, _, _) }
|
||||
}
|
||||
|
|
|
@ -119,11 +119,13 @@ module SourceSinkInterpretationInput implements
|
|||
* Holds if an external source specification exists for `e` with output specification
|
||||
* `output`, kind `kind`, and provenance `provenance`.
|
||||
*/
|
||||
predicate sourceElement(SourceOrSinkElement e, string output, string kind) {
|
||||
predicate sourceElement(
|
||||
SourceOrSinkElement e, string output, string kind, Public::Provenance provenance
|
||||
) {
|
||||
exists(
|
||||
string namespace, string type, boolean subtypes, string name, string signature, string ext
|
||||
|
|
||||
sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, _) and
|
||||
sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance) and
|
||||
e = interpretElement(namespace, type, subtypes, name, signature, ext)
|
||||
)
|
||||
}
|
||||
|
@ -132,11 +134,13 @@ module SourceSinkInterpretationInput implements
|
|||
* Holds if an external sink specification exists for `e` with input specification
|
||||
* `input`, kind `kind` and provenance `provenance`.
|
||||
*/
|
||||
predicate sinkElement(SourceOrSinkElement e, string input, string kind) {
|
||||
predicate sinkElement(
|
||||
SourceOrSinkElement e, string input, string kind, Public::Provenance provenance
|
||||
) {
|
||||
exists(
|
||||
string package, string type, boolean subtypes, string name, string signature, string ext
|
||||
|
|
||||
sinkModel(package, type, subtypes, name, signature, ext, input, kind, _) and
|
||||
sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance) and
|
||||
e = interpretElement(package, type, subtypes, name, signature, ext)
|
||||
)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче