@@ -308,19 +308,36 @@ module CodeExecution {
308308 }
309309}
310310
311- /** DEPRECATED: Use `SqlExecution` instead. */
312- deprecated class SqlConstruction extends DataFlow:: Node instanceof SqlConstruction:: Range {
311+ /**
312+ * A data-flow node that constructs an SQL statement.
313+ *
314+ * Often, it is worthy of an alert if an SQL statement is constructed such that
315+ * executing it would be a security risk.
316+ *
317+ * If it is important that the SQL statement is indeed executed, then use `SQLExecution`.
318+ *
319+ * Extend this class to refine existing API models. If you want to model new APIs,
320+ * extend `SqlConstruction::Range` instead.
321+ */
322+ class SqlConstruction extends DataFlow:: Node instanceof SqlConstruction:: Range {
313323 /** Gets the argument that specifies the SQL statements to be constructed. */
314324 DataFlow:: Node getSql ( ) { result = super .getSql ( ) }
315325}
316326
317- /**
318- * DEPRECATED: Use `SqlExecution` instead.
319- * Provides a class for modeling new SQL execution APIs.
320- */
321- deprecated module SqlConstruction {
322- /** DEPRECATED: Use `SqlExecution::Range` instead. */
323- abstract deprecated class Range extends DataFlow:: Node {
327+ /** Provides a class for modeling new SQL execution APIs. */
328+ module SqlConstruction {
329+ /**
330+ * A data-flow node that constructs an SQL statement.
331+ *
332+ * Often, it is worthy of an alert if an SQL statement is constructed such that
333+ * executing it would be a security risk.
334+ *
335+ * If it is important that the SQL statement is indeed executed, then use `SQLExecution`.
336+ *
337+ * Extend this class to model new APIs. If you want to refine existing API models,
338+ * extend `SqlConstruction` instead.
339+ */
340+ abstract class Range extends DataFlow:: Node {
324341 /** Gets the argument that specifies the SQL statements to be constructed. */
325342 abstract DataFlow:: Node getSql ( ) ;
326343 }
@@ -329,6 +346,9 @@ deprecated module SqlConstruction {
329346/**
330347 * A data-flow node that executes SQL statements.
331348 *
349+ * If the context of interest is such that merely constructing an SQL statement
350+ * would be valuabe to report, then consider using `SqlConstruction`.
351+ *
332352 * Extend this class to refine existing API models. If you want to model new APIs,
333353 * extend `SqlExecution::Range` instead.
334354 */
@@ -342,6 +362,9 @@ module SqlExecution {
342362 /**
343363 * A data-flow node that executes SQL statements.
344364 *
365+ * If the context of interest is such that merely constructing an SQL statement
366+ * would be valuabe to report, then consider using `SqlConstruction`.
367+ *
345368 * Extend this class to model new APIs. If you want to refine existing API models,
346369 * extend `SqlExecution` instead.
347370 */
0 commit comments