mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Ruby: Add AdditionalJumpStep class
This commit is contained in:
@@ -1157,6 +1157,8 @@ predicate jumpStep(Node pred, Node succ) {
|
||||
succ.asExpr().getExpr().(ConstantReadAccess).getValue() = pred.asExpr().getExpr()
|
||||
or
|
||||
FlowSummaryImpl::Private::Steps::summaryJumpStep(pred, succ)
|
||||
or
|
||||
any(AdditionalJumpStep s).step(pred, succ)
|
||||
}
|
||||
|
||||
private ContentSet getKeywordContent(string name) {
|
||||
@@ -1484,3 +1486,15 @@ ContentApprox getContentApprox(Content c) {
|
||||
or
|
||||
result = TNonElementContentApprox(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* A unit class for adding additional jump steps.
|
||||
*
|
||||
* Extend this class to add additional jump steps.
|
||||
*/
|
||||
class AdditionalJumpStep extends Unit {
|
||||
/**
|
||||
* Holds if data can flow from `pred` to `succ` in a way that discards call contexts.
|
||||
*/
|
||||
abstract predicate step(Node pred, Node succ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user