Skip to content

Commit 695553b

Browse files
committed
Python: Deprecate old non-Query.qll dataflow defs
1 parent db86a18 commit 695553b

35 files changed

+111
-302
lines changed
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
/**
2-
* Provides a taint-tracking configuration for "Clear-text logging of sensitive information".
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `CleartextLogging::Configuration` is needed, otherwise
6-
* `CleartextLoggingCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `CleartextLoggingQuery` instead. */
82

93
private import python
104
private import semmle.python.dataflow.new.DataFlow
@@ -14,9 +8,7 @@ private import semmle.python.dataflow.new.RemoteFlowSources
148
private import semmle.python.dataflow.new.BarrierGuards
159
private import semmle.python.dataflow.new.SensitiveDataSources
1610

17-
/**
18-
* Provides a taint-tracking configuration for detecting "Clear-text logging of sensitive information".
19-
*/
20-
module CleartextLogging {
11+
/** DEPRECATED. Import `CleartextLoggingQuery` instead. */
12+
deprecated module CleartextLogging {
2113
import CleartextLoggingQuery // ignore-query-import
2214
}
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
/**
2-
* Provides a taint-tracking configuration for "Clear-text storage of sensitive information".
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `CleartextStorage::Configuration` is needed, otherwise
6-
* `CleartextStorageCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `CleartextStorageQuery` instead. */
82

93
private import python
104
private import semmle.python.dataflow.new.DataFlow
@@ -14,9 +8,7 @@ private import semmle.python.dataflow.new.RemoteFlowSources
148
private import semmle.python.dataflow.new.BarrierGuards
159
private import semmle.python.dataflow.new.SensitiveDataSources
1610

17-
/**
18-
* Provides a taint-tracking configuration for detecting "Clear-text storage of sensitive information".
19-
*/
20-
module CleartextStorage {
11+
/** DEPRECATED. Import `CleartextStorageQuery` instead. */
12+
deprecated module CleartextStorage {
2113
import CleartextStorageQuery // ignore-query-import
2214
}
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
/**
2-
* Provides a taint-tracking configuration for detecting "code injection" vulnerabilities.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `CodeInjection::Configuration` is needed, otherwise
6-
* `CodeInjectionCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `CodeInjectionQuery` instead. */
82

93
private import python
104
import semmle.python.dataflow.new.DataFlow
115
import semmle.python.dataflow.new.TaintTracking
126

13-
/**
14-
* Provides a taint-tracking configuration for detecting "code injection" vulnerabilities.
15-
*/
16-
module CodeInjection {
7+
/** DEPRECATED. Import `CodeInjectionQuery` instead. */
8+
deprecated module CodeInjection {
179
import CodeInjectionQuery // ignore-query-import
1810
}
1911

20-
/**
21-
* DEPRECATED: Don't extend this class for customization, since this will lead to bad
22-
* performance, instead use the new `CodeInjectionCustomizations.qll` file, and extend
23-
* its' classes.
24-
*/
12+
/** DEPRECATED. Import `CodeInjectionQuery` instead. */
2513
deprecated class CodeInjectionConfiguration = CodeInjection::Configuration;
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
/**
2-
* Provides a taint-tracking configuration for detecting "command injection" vulnerabilities.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `CommandInjection::Configuration` is needed, otherwise
6-
* `CommandInjectionCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `CommandInjectionQuery` instead. */
82

93
private import python
104
import semmle.python.dataflow.new.DataFlow
115
import semmle.python.dataflow.new.TaintTracking
126

13-
/**
14-
* Provides a taint-tracking configuration for detecting "command injection" vulnerabilities.
15-
*/
16-
module CommandInjection {
7+
/** DEPRECATED. Import `CommandInjectionQuery` instead. */
8+
deprecated module CommandInjection {
179
import CommandInjectionQuery // ignore-query-import
1810
}
1911

20-
/**
21-
* DEPRECATED: Don't extend this class for customization, since this will lead to bad
22-
* performance, instead use the new `CommandInjectionCustomizations.qll` file, and extend
23-
* its' classes.
24-
*/
12+
/** DEPRECATED. Import `CommandInjectionQuery` instead. */
2513
deprecated class CommandInjectionConfiguration = CommandInjection::Configuration;
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
/**
2-
* Provides taint-tracking configurations for detecting LDAP injection vulnerabilities
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `LdapInjection::Configuration` is needed, otherwise
6-
* `LdapInjectionCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `LdapInjectionQuery` instead. */
82

93
import python
104
import semmle.python.Concepts
115
import semmle.python.dataflow.new.DataFlow
126
import semmle.python.dataflow.new.TaintTracking
137
import semmle.python.dataflow.new.RemoteFlowSources
148

15-
/**
16-
* Provides aint-tracking configurations for detecting LDAP injection vulnerabilities.class
17-
*
18-
* Two configurations are provided. One is for detecting LDAP injection
19-
* via the distinguished name (DN). The other is for detecting LDAP injection
20-
* via the filter. These require different escapings.
21-
*/
22-
module LdapInjection {
9+
/** DEPRECATED. Import `LdapInjectionQuery` instead. */
10+
deprecated module LdapInjection {
2311
import LdapInjectionQuery // ignore-query-import
2412
}
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
/**
2-
* Provides a taint-tracking configuration for tracking untrusted user input used in log entries.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `LogInjection::Configuration` is needed, otherwise
6-
* `LogInjectionCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `LogInjectionQuery` instead. */
82

93
import python
104
import semmle.python.dataflow.new.DataFlow
115
import semmle.python.dataflow.new.TaintTracking
126

13-
/**
14-
* Provides a taint-tracking configuration for tracking untrusted user input used in log entries.
15-
*/
16-
module LogInjection {
7+
/** DEPRECATED. Import `LogInjectionQuery` instead. */
8+
deprecated module LogInjection {
179
import LogInjectionQuery // ignore-query-import
1810
}

python/ql/lib/semmle/python/security/dataflow/PathInjection.qll

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
1-
/**
2-
* Provides taint-tracking configurations for detecting "path injection" vulnerabilities.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `PathInjection::Configuration` is needed, otherwise
6-
* `PathInjectionCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `PathInjectionQuery` instead. */
82

93
private import python
104
private import semmle.python.Concepts
115
import semmle.python.dataflow.new.DataFlow
126
import semmle.python.dataflow.new.TaintTracking
137

14-
/**
15-
* Provides a taint-tracking configuration for detecting "path injection" vulnerabilities.
16-
*/
17-
module PathInjection {
8+
/** DEPRECATED. Import `PathInjectionQuery` instead. */
9+
deprecated module PathInjection {
1810
import PathInjectionQuery // ignore-query-import
1911
}
2012

@@ -30,7 +22,7 @@ import PathInjectionCustomizations::PathInjection
3022
// Case 1. The path is never normalized.
3123
// ---------------------------------------------------------------------------
3224
/**
33-
* DEPRECATED: Use `PathInjection::Configuration` instead
25+
* DEPRECATED: Import `PathInjectionQuery` instead.
3426
*
3527
* Configuration to find paths from sources to sinks that contain no normalization.
3628
*/
@@ -53,7 +45,7 @@ deprecated class PathNotNormalizedConfiguration extends TaintTracking::Configura
5345
}
5446

5547
/**
56-
* DEPRECATED: Use `PathInjection::Configuration` instead
48+
* DEPRECATED: Import `PathInjectionQuery` instead.
5749
*
5850
* Holds if there is a path injection from source to sink, where the (python) path is
5951
* not normalized.
@@ -66,7 +58,7 @@ deprecated predicate pathNotNormalized(CustomPathNode source, CustomPathNode sin
6658
// Case 2. The path is normalized at least once, but never checked afterwards.
6759
// ---------------------------------------------------------------------------
6860
/**
69-
* DEPRECATED: Use `PathInjection::Configuration` instead
61+
* DEPRECATED: Import `PathInjectionQuery` instead.
7062
*
7163
* Configuration to find paths from sources to normalizations that contain no prior normalizations.
7264
*/
@@ -87,7 +79,7 @@ deprecated class FirstNormalizationConfiguration extends TaintTracking::Configur
8779
}
8880

8981
/**
90-
* DEPRECATED: Use `PathInjection::Configuration` instead
82+
* DEPRECATED: Import `PathInjectionQuery` instead.
9183
*
9284
* Configuration to find paths from normalizations to sinks that do not go through a check.
9385
*/
@@ -108,7 +100,7 @@ deprecated class NormalizedPathNotCheckedConfiguration extends TaintTracking2::C
108100
}
109101

110102
/**
111-
* DEPRECATED: Use `PathInjection::Configuration` instead
103+
* DEPRECATED: Import `PathInjectionQuery` instead.
112104
*
113105
* Holds if there is a path injection from source to sink, where the (python) path is
114106
* normalized at least once, but never checked afterwards.
@@ -128,7 +120,7 @@ deprecated predicate pathNotCheckedAfterNormalization(CustomPathNode source, Cus
128120
// Query: Either case 1 or case 2.
129121
// ---------------------------------------------------------------------------
130122
/**
131-
* DEPRECATED: Use `PathInjection::Configuration` instead
123+
* DEPRECATED: Import `PathInjectionQuery` instead.
132124
*
133125
* Holds if there is a path injection from source to sink
134126
*/
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
/**
2-
* Provides a taint-tracking configuration for detecting "polynomial regular expression denial of service (ReDoS)" vulnerabilities.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `PolynomialReDoS::Configuration` is needed, otherwise
6-
* `PolynomialReDoSCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `PolynomialReDoSQuery` instead. */
82

93
private import python
104
import semmle.python.dataflow.new.DataFlow
115
import semmle.python.dataflow.new.TaintTracking
126

13-
/**
14-
* Provides a taint-tracking configuration for detecting "polynomial regular expression denial of service (ReDoS)" vulnerabilities.
15-
*/
16-
module PolynomialReDoS {
7+
/** DEPRECATED. Import `PolynomialReDoSQuery` instead. */
8+
deprecated module PolynomialReDoS {
179
import PolynomialReDoSQuery // ignore-query-import
1810
}
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
1-
/**
2-
* Provides a taint-tracking configuration for detecting "reflected server-side cross-site scripting" vulnerabilities.
3-
*
4-
* Note, for performance reasons: only import this file if
5-
* `ReflectedXSS::Configuration` is needed, otherwise
6-
* `ReflectedXSSCustomizations` should be imported instead.
7-
*/
1+
/** DEPRECATED. Import `ReflectedXSSQuery` instead. */
82

93
private import python
104
import semmle.python.dataflow.new.DataFlow
115
import semmle.python.dataflow.new.TaintTracking
126

13-
/**
14-
* Provides a taint-tracking configuration for detecting "reflected server-side cross-site scripting" vulnerabilities.
15-
*/
16-
module ReflectedXss {
7+
/** DEPRECATED. Import `ReflectedXSSQuery` instead. */
8+
deprecated module ReflectedXss {
179
import ReflectedXSSQuery // ignore-query-import
1810
}
1911

20-
/** DEPRECATED: Alias for ReflectedXss */
12+
/** DEPRECATED. Import `ReflectedXSSQuery` instead. */
2113
deprecated module ReflectedXSS = ReflectedXss;
2214

23-
/**
24-
* DEPRECATED: Don't extend this class for customization, since this will lead to bad
25-
* performance, instead use the new `ReflectedXSSCustomizations.qll` file, and extend
26-
* its' classes.
27-
*/
15+
/** DEPRECATED. Import `ReflectedXSSQuery` instead. */
2816
deprecated class ReflectedXssConfiguration = ReflectedXss::Configuration;
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
/**
2-
* Provides a taint-tracking configuration for detecting regular expression injection
3-
* vulnerabilities.
4-
*
5-
* Note, for performance reasons: only import this file if
6-
* `RegexInjection::Configuration` is needed, otherwise
7-
* `RegexInjectionCustomizations` should be imported instead.
8-
*/
1+
/** DEPRECATED. Import `RegexInjectionQuery` instead. */
92

103
private import python
114
import semmle.python.dataflow.new.DataFlow
125
import semmle.python.dataflow.new.TaintTracking
136

14-
/**
15-
* Provides a taint-tracking configuration for detecting regular expression injection
16-
* vulnerabilities.
17-
*/
18-
module RegexInjection {
7+
/** DEPRECATED. Import `RegexInjectionQuery` instead. */
8+
deprecated module RegexInjection {
199
import RegexInjectionQuery // ignore-query-import
2010
}

0 commit comments

Comments
 (0)