From fcbd301de86004db2cab521f55e29b01cb40efe4 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 3 Oct 2023 10:36:45 +0200 Subject: [PATCH] Java: Address review comments. --- .../lib/semmle/code/java/dataflow/FlowSources.qll | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll index 95534eab8f1..8db7917779a 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSources.qll @@ -278,10 +278,21 @@ private class FileInput extends LocalUserInput { } /** + * DEPRECATED: Use the threat models feature. + * That is, use `ThreatModelFlowSource` as the class of nodes for sources + * and set up the threat model configuration to filter source nodes. + * Alternatively, use `getThreatModel` to filter nodes to create the + * class of nodes you need. + * * A node with input from a database. */ -private class DatabaseInput extends LocalUserInput { - DatabaseInput() { this.asExpr().(MethodAccess).getMethod() instanceof ResultSetGetStringMethod } +deprecated class DatabaseInput = DbInput; + +/** + * A node with input from a database. + */ +private class DbInput extends LocalUserInput { + DbInput() { this.asExpr().(MethodAccess).getMethod() instanceof ResultSetGetStringMethod } override string getThreatModel() { result = "database" } }