mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Merge pull request #15470 from github/koesie10/add-summary-neutral-ruby-supported
Ruby: Correctly report supported status of summary and neutral models
This commit is contained in:
@@ -104,7 +104,7 @@ class MethodEndpoint extends Endpoint instanceof DataFlow::MethodNode {
|
|||||||
|
|
||||||
/** Holds if this API has a supported summary. */
|
/** Holds if this API has a supported summary. */
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
predicate hasSummary() { none() }
|
predicate hasSummary() { this.getNode() instanceof SummaryCallable }
|
||||||
|
|
||||||
/** Holds if this API is a known source. */
|
/** Holds if this API is a known source. */
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
@@ -116,7 +116,7 @@ class MethodEndpoint extends Endpoint instanceof DataFlow::MethodNode {
|
|||||||
|
|
||||||
/** Holds if this API is a known neutral. */
|
/** Holds if this API is a known neutral. */
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
predicate isNeutral() { none() }
|
predicate isNeutral() { this.getNode() instanceof NeutralCallable }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if this API is supported by existing CodeQL libraries, that is, it is either a
|
* Holds if this API is supported by existing CodeQL libraries, that is, it is either a
|
||||||
@@ -183,6 +183,30 @@ class SourceCallable extends DataFlow::CallableNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callable where there exists a MaD summary model that applies to it.
|
||||||
|
*/
|
||||||
|
class SummaryCallable extends DataFlow::CallableNode {
|
||||||
|
SummaryCallable() {
|
||||||
|
exists(string type, string path |
|
||||||
|
Util::pathToMethod(this, type, path) and
|
||||||
|
summaryModel(type, path, _, _, _)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callable where there exists a MaD neutral model that applies to it.
|
||||||
|
*/
|
||||||
|
class NeutralCallable extends DataFlow::CallableNode {
|
||||||
|
NeutralCallable() {
|
||||||
|
exists(string type, string path |
|
||||||
|
Util::pathToMethod(this, type, path) and
|
||||||
|
neutralModel(type, path, _)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A module defined in source code
|
* A module defined in source code
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user