From 4d70b7e6bb9ba56b5cd9b9ba807a537ab1f544c5 Mon Sep 17 00:00:00 2001 From: Wireghoul Date: Tue, 9 Apr 2024 13:45:12 +1000 Subject: [PATCH] Updated python rules --- signatures/python.db | 10 ++++++++++ signatures/python/django.db | 1 + signatures/python/jinja.db | 1 + signatures/python/nosql.db | 6 ++++++ signatures/python/sql.db | 2 ++ 5 files changed, 20 insertions(+) create mode 100644 signatures/python/django.db create mode 100644 signatures/python/jinja.db create mode 100644 signatures/python/nosql.db create mode 100644 signatures/python/sql.db diff --git a/signatures/python.db b/signatures/python.db index 764b5af..027b134 100644 --- a/signatures/python.db +++ b/signatures/python.db @@ -1,5 +1,13 @@ +csrf[\._]exempt \.NamedTemporaryFile\(.*\) \.execute[[:space:]]*\([\"\'].*%.*[\"\'][[:space:]]*%.*\) +autoescape[[:space:]]*=[[:space:]]*[Ff][Aa][Ll][Ss][Ee] +\.insert(_one|_many)?[[:space:]]*\( +\.find(_one|_many)?[[:space:]]*\( +\.replace(_one|_many)?[[:space:]]*\( +\.drop_database[[:space:]]*\( +\.create_index[[:space:]]*\( +\.remove[[:space:]]*\( access[[:space:]]*\( assert[[:space:]]*\( mkfifo @@ -68,5 +76,7 @@ zipfile [[:space:]]+compiler yaml urllib3.disable_warnings +[Ww][Hh][Ee][Rr][Ee][[:space:]]+.*=[[:space:]]*\{\} +[Aa][Nn][Dd][[:space:]]+.*=[[:space:]]*\{\} \.startswith\( \.urlopen\( diff --git a/signatures/python/django.db b/signatures/python/django.db new file mode 100644 index 0000000..48880c7 --- /dev/null +++ b/signatures/python/django.db @@ -0,0 +1 @@ +csrf[\._]exempt diff --git a/signatures/python/jinja.db b/signatures/python/jinja.db new file mode 100644 index 0000000..2335fbb --- /dev/null +++ b/signatures/python/jinja.db @@ -0,0 +1 @@ +autoescape[[:space:]]*=[[:space:]]*[Ff][Aa][Ll][Ss][Ee] diff --git a/signatures/python/nosql.db b/signatures/python/nosql.db new file mode 100644 index 0000000..a226fd3 --- /dev/null +++ b/signatures/python/nosql.db @@ -0,0 +1,6 @@ +\.insert(_one|_many)?[[:space:]]*\( +\.find(_one|_many)?[[:space:]]*\( +\.replace(_one|_many)?[[:space:]]*\( +\.drop_database[[:space:]]*\( +\.create_index[[:space:]]*\( +\.remove[[:space:]]*\( diff --git a/signatures/python/sql.db b/signatures/python/sql.db new file mode 100644 index 0000000..7de74fa --- /dev/null +++ b/signatures/python/sql.db @@ -0,0 +1,2 @@ +[Ww][Hh][Ee][Rr][Ee][[:space:]]+.*=[[:space:]]*\{\} +[Aa][Nn][Dd][[:space:]]+.*=[[:space:]]*\{\}