@@ -212,8 +212,7 @@ module FileSystemWriteAccess {
212212 * Extend this class to refine existing API models. If you want to model new APIs,
213213 * extend `FileSystemPermissionModification::Range` instead.
214214 */
215- class FileSystemPermissionModification extends DataFlow:: Node instanceof FileSystemPermissionModification:: Range
216- {
215+ class FileSystemPermissionModification extends DataFlow:: Node instanceof FileSystemPermissionModification:: Range {
217216 /**
218217 * Gets an argument to this permission modification that is interpreted as a
219218 * set of permissions.
@@ -469,8 +468,7 @@ module Http {
469468 }
470469 }
471470
472- private class RequestInputAccessAsRemoteFlowSource extends RemoteFlowSource:: Range instanceof RequestInputAccess
473- {
471+ private class RequestInputAccessAsRemoteFlowSource extends RemoteFlowSource:: Range instanceof RequestInputAccess {
474472 override string getSourceType ( ) { result = this .( RequestInputAccess ) .getSourceType ( ) }
475473 }
476474
@@ -959,8 +957,7 @@ module Path {
959957 * Extend this class to refine existing API models. If you want to model new APIs,
960958 * extend `CookieSecurityConfigurationSetting::Range` instead.
961959 */
962- class CookieSecurityConfigurationSetting extends DataFlow:: Node instanceof CookieSecurityConfigurationSetting:: Range
963- {
960+ class CookieSecurityConfigurationSetting extends DataFlow:: Node instanceof CookieSecurityConfigurationSetting:: Range {
964961 /**
965962 * Gets a description of how this cookie setting may weaken application security.
966963 * This predicate has no results if the setting is considered to be safe.
@@ -1040,8 +1037,7 @@ module Cryptography {
10401037 * Extend this class to refine existing API models. If you want to model new APIs,
10411038 * extend `CryptographicOperation::Range` instead.
10421039 */
1043- class CryptographicOperation extends SC:: CryptographicOperation instanceof CryptographicOperation:: Range
1044- {
1040+ class CryptographicOperation extends SC:: CryptographicOperation instanceof CryptographicOperation:: Range {
10451041 /** DEPRECATED: Use `getAlgorithm().isWeak() or getBlockMode().isWeak()` instead */
10461042 deprecated predicate isWeak ( ) { super .isWeak ( ) }
10471043 }
@@ -1129,3 +1125,69 @@ module TemplateRendering {
11291125 abstract DataFlow:: Node getTemplate ( ) ;
11301126 }
11311127}
1128+
1129+ /**
1130+ * A data-flow node that constructs a LDAP query.
1131+ *
1132+ * Often, it is worthy of an alert if an LDAP query is constructed such that
1133+ * executing it would be a security risk.
1134+ *
1135+ * If it is important that the query is executed, use `LdapExecution`.
1136+ *
1137+ * Extend this class to refine existing API models. If you want to model new APIs,
1138+ * extend `LdapConstruction::Range` instead.
1139+ */
1140+ class LdapConstruction extends DataFlow:: Node instanceof LdapConstruction:: Range {
1141+ /** Gets the argument that specifies the query to be constructed. */
1142+ DataFlow:: Node getQuery ( ) { result = super .getQuery ( ) }
1143+ }
1144+
1145+ /** Provides a class for modeling new LDAP query construction APIs. */
1146+ module LdapConstruction {
1147+ /**
1148+ * A data-flow node that constructs a LDAP query.
1149+ *
1150+ * Often, it is worthy of an alert if an LDAP query is constructed such that
1151+ * executing it would be a security risk.
1152+ *
1153+ * If it is important that the query is executed, use `LdapExecution`.
1154+ *
1155+ * Extend this class to model new APIs. If you want to refine existing API models,
1156+ * extend `LdapConstruction` instead.
1157+ */
1158+ abstract class Range extends DataFlow:: Node {
1159+ /** Gets the argument that specifies the query to be constructed. */
1160+ abstract DataFlow:: Node getQuery ( ) ;
1161+ }
1162+ }
1163+
1164+ /**
1165+ * A data-flow node that executes LDAP queries.
1166+ *
1167+ * If the context of interest is such that merely constructing a LDAP query
1168+ * would be valuable to report, consider using `LdapConstruction`.
1169+ *
1170+ * Extend this class to refine existing API models. If you want to model new APIs,
1171+ * extend `LdapExecution::Range` instead.
1172+ */
1173+ class LdapExecution extends DataFlow:: Node instanceof LdapExecution:: Range {
1174+ /** Gets the argument that specifies the query to be executed. */
1175+ DataFlow:: Node getQuery ( ) { result = super .getQuery ( ) }
1176+ }
1177+
1178+ /** Provides a class for modeling new LDAP query execution APIs. */
1179+ module LdapExecution {
1180+ /**
1181+ * A data-flow node that executes LDAP queries.
1182+ *
1183+ * If the context of interest is such that merely constructing a LDAP query
1184+ * would be valuable to report, consider using `LdapConstruction`.
1185+ *
1186+ * Extend this class to model new APIs. If you want to refine existing API models,
1187+ * extend `LdapExecution` instead.
1188+ */
1189+ abstract class Range extends DataFlow:: Node {
1190+ //** Gets the argument that specifies the query to be executed. */
1191+ abstract DataFlow:: Node getQuery ( ) ;
1192+ }
1193+ }
0 commit comments