From 33b2ff16cfbef1fb04073e0c57d0dc49dd5d2bf5 Mon Sep 17 00:00:00 2001 From: Thomas Patzke Date: Sat, 12 Aug 2017 00:44:18 +0200 Subject: [PATCH] Rule for generic Python SQL exceptuons according to PEP 249 --- .../application/app_python_sql_exceptions.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 rules/application/app_python_sql_exceptions.yml diff --git a/rules/application/app_python_sql_exceptions.yml b/rules/application/app_python_sql_exceptions.yml new file mode 100644 index 000000000..b42041e7b --- /dev/null +++ b/rules/application/app_python_sql_exceptions.yml @@ -0,0 +1,19 @@ +title: Python SQL Exceptions +description: Generic rule for SQL exceptions in Python according to PEP 249 +author: Thomas Patzke +reference: + - https://www.python.org/dev/peps/pep-0249/#exceptions +logsource: + category: application + product: python +detection: + exceptions: + - DataError + - IntegrityError + - ProgrammingError + condition: exceptions +falsepositives: + - Application bugs + - Penetration testing +level: medium +