From aa10ad6a8a91ec72de4920a6e303e8c89325d2f2 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 19 Jan 2022 17:22:44 +0100 Subject: [PATCH] Python: Fix RegexInjection query, add old deprecated versions --- .../lib/semmle/python/security/injection/RegexInjection.qll | 6 ++++++ .../security/injection/RegexInjectionCustomizations.qll | 6 ++++++ python/ql/src/Security/CWE-730/RegexInjection.ql | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 python/ql/lib/semmle/python/security/injection/RegexInjection.qll create mode 100644 python/ql/lib/semmle/python/security/injection/RegexInjectionCustomizations.qll diff --git a/python/ql/lib/semmle/python/security/injection/RegexInjection.qll b/python/ql/lib/semmle/python/security/injection/RegexInjection.qll new file mode 100644 index 00000000000..c0c0f42dbd6 --- /dev/null +++ b/python/ql/lib/semmle/python/security/injection/RegexInjection.qll @@ -0,0 +1,6 @@ +/** DEPRECATED: use semmle.python.security.dataflow.RegexInjection instead. */ + +private import semmle.python.security.dataflow.RegexInjection as New + +/** DEPRECATED: use semmle.python.security.dataflow.RegexInjection instead. */ +deprecated module RegexInjection = New::RegexInjection; diff --git a/python/ql/lib/semmle/python/security/injection/RegexInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/injection/RegexInjectionCustomizations.qll new file mode 100644 index 00000000000..0738f2b58b6 --- /dev/null +++ b/python/ql/lib/semmle/python/security/injection/RegexInjectionCustomizations.qll @@ -0,0 +1,6 @@ +/** DEPRECATED: use semmle.python.security.dataflow.RegexInjectionCustomizations instead. */ + +private import semmle.python.security.dataflow.RegexInjectionCustomizations as New + +/** DEPRECATED: use semmle.python.security.dataflow.RegexInjectionCustomizations instead. */ +deprecated module RegexInjection = New::RegexInjection; diff --git a/python/ql/src/Security/CWE-730/RegexInjection.ql b/python/ql/src/Security/CWE-730/RegexInjection.ql index 0dfb5b00d52..cc814a9b5d0 100644 --- a/python/ql/src/Security/CWE-730/RegexInjection.ql +++ b/python/ql/src/Security/CWE-730/RegexInjection.ql @@ -14,7 +14,7 @@ import python private import semmle.python.Concepts -import semmle.python.security.injection.RegexInjection +import semmle.python.security.dataflow.RegexInjection import DataFlow::PathGraph from