Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs for B610,B611,B703 #555

Merged
merged 3 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions bandit/core/extension_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def check_id(self, test):
test in self.blacklist_by_id or
test in self.builtin)


# Using entry-points and pkg_resources *can* be expensive. So let's load these
# once, store them on the object, and have a module global object for
# accessing them. After the first time this module is imported, it should save
Expand Down
8 changes: 4 additions & 4 deletions bandit/plugins/django_sql_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def django_extra_used(context):

.. seealso::

- https://docs.djangoproject.com/en/dev/topics/
security/#sql-injection-protection
- https://docs.djangoproject.com/en/dev/topics/security/\
#sql-injection-protection

.. versionadded:: 1.5.0

Expand Down Expand Up @@ -99,8 +99,8 @@ def django_rawsql_used(context):

.. seealso::

- https://docs.djangoproject.com/en/dev/topics/
security/#sql-injection-protection
- https://docs.djangoproject.com/en/dev/topics/security/\
#sql-injection-protection

.. versionadded:: 1.5.0

Expand Down
12 changes: 6 additions & 6 deletions bandit/plugins/django_xss.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ def django_mark_safe(context):

.. seealso::

- https://docs.djangoproject.com/en/dev/topics/
security/#cross-site-scripting-xss-protection
- https://docs.djangoproject.com/en/dev/
ref/utils/#module-django.utils.safestring
- https://docs.djangoproject.com/en/dev/
ref/utils/#django.utils.html.format_html
- https://docs.djangoproject.com/en/dev/topics/security/\
#cross-site-scripting-xss-protection
- https://docs.djangoproject.com/en/dev/ref/utils/\
#module-django.utils.safestring
- https://docs.djangoproject.com/en/dev/ref/utils/\
#django.utils.html.format_html

.. versionadded:: 1.5.0

Expand Down
2 changes: 1 addition & 1 deletion doc/source/plugins/b610_django_extra_used.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
B610: django_extra_used
-----------------------

.. currentmodule:: bandit.plugins.django_injection_sql
.. currentmodule:: bandit.plugins.django_sql_injection

.. autofunction:: django_extra_used
:noindex:
2 changes: 1 addition & 1 deletion doc/source/plugins/b611_django_rawsql_used.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
B611: django_rawsql_used
------------------------

.. currentmodule:: bandit.plugins.django_injection_sql
.. currentmodule:: bandit.plugins.django_sql_injection

.. autofunction:: django_rawsql_used
:noindex:
5 changes: 4 additions & 1 deletion doc/source/plugins/b703_django_mark_safe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
B703: django_mark_safe
----------------------

.. automodule:: bandit.plugins.django_mark_safe
.. currentmodule:: bandit.plugins.django_xss

.. autofunction:: django_mark_safe
:noindex: