mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Python : Add query to detect Server Side Template Injection
This commit is contained in:
3
python/ql/test/query-tests/Security/lib/airspeed.py
Normal file
3
python/ql/test/query-tests/Security/lib/airspeed.py
Normal file
@@ -0,0 +1,3 @@
|
||||
class Template:
|
||||
def __init__(self, content, filename="<string>"):
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
class Template(object):
|
||||
pass
|
||||
6
python/ql/test/query-tests/Security/lib/chevron.py
Normal file
6
python/ql/test/query-tests/Security/lib/chevron.py
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
def render(template='', data={}, partials_path='.', partials_ext='mustache',
|
||||
partials_dict={}, padding='', def_ldel='{{', def_rdel='}}',
|
||||
scopes=None):
|
||||
pass
|
||||
@@ -28,3 +28,6 @@ def make_response(rv):
|
||||
|
||||
def escape(txt):
|
||||
return Markup.escape(txt)
|
||||
|
||||
def render_template_string(source, **context):
|
||||
pass
|
||||
@@ -18,3 +18,6 @@ class FileSystemLoader(object):
|
||||
|
||||
def __init__(self, searchpath):
|
||||
pass
|
||||
|
||||
def from_string(source, globals=None, template_class=None):
|
||||
pass
|
||||
Reference in New Issue
Block a user