Skip to content

Commit 8e25cac

Browse files
committed
Java: Add extensible predicates.
1 parent 7b6f202 commit 8e25cac

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,14 @@ predicate summaryModel(string row) { any(SummaryModelCsv s).row(row) }
432432
/** Holds if `row` is negative summary model. */
433433
predicate negativeSummaryModel(string row) { any(NegativeSummaryModelCsv s).row(row) }
434434

435+
/**
436+
* Holds if a source model exists for the given parameters.
437+
*/
438+
extensible predicate extSourceModel(
439+
string package, string type, boolean subtypes, string name, string signature, string ext,
440+
string output, string kind, string provenance
441+
);
442+
435443
/** Holds if a source model exists for the given parameters. */
436444
predicate sourceModel(
437445
string package, string type, boolean subtypes, string name, string signature, string ext,
@@ -452,6 +460,12 @@ predicate sourceModel(
452460
)
453461
}
454462

463+
/** Holds if a sink model exists for the given parameters. */
464+
extensible predicate extSinkModel(
465+
string package, string type, boolean subtypes, string name, string signature, string ext,
466+
string input, string kind, string provenance
467+
);
468+
455469
/** Holds if a sink model exists for the given parameters. */
456470
predicate sinkModel(
457471
string package, string type, boolean subtypes, string name, string signature, string ext,
@@ -472,6 +486,12 @@ predicate sinkModel(
472486
)
473487
}
474488

489+
/** Holds if a summary model exists for the given parameters. */
490+
extensible predicate extSummaryModel(
491+
string package, string type, boolean subtypes, string name, string signature, string ext,
492+
string input, string output, string kind, string provenance
493+
);
494+
475495
/** Holds if a summary model exists for the given parameters. */
476496
predicate summaryModel(
477497
string package, string type, boolean subtypes, string name, string signature, string ext,
@@ -499,6 +519,11 @@ predicate summaryModel(
499519
row.splitAt(";", 9) = provenance
500520
}
501521

522+
/** Holds if a summary model exists indicating there is no flow for the given parameters. */
523+
extensible predicate extNegativeSummaryModel(
524+
string package, string type, string name, string signature, string provenance
525+
);
526+
502527
/** Holds if a summary model exists indicating there is no flow for the given parameters. */
503528
predicate negativeSummaryModel(
504529
string package, string type, string name, string signature, string provenance

0 commit comments

Comments
 (0)