Skip to content

Commit

Permalink
Merge pull request #645 from DrGFreeman/644-noqa-rendered-in-docs
Browse files Browse the repository at this point in the history
Fix # noqa rendering in docs
  • Loading branch information
lukehinds committed Nov 19, 2020
2 parents b78c938 + 7765e77 commit 539da77
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions bandit/plugins/app_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
.. [1] http://flask.pocoo.org/docs/1.0/quickstart/#debug-mode
.. [2] http://werkzeug.palletsprojects.com/en/0.15.x/debug/
.. [3] http://labs.detectify.com/post/130332638391/how-patreon-got-hacked-publicly-exposed-werkzeug # noqa
.. [3] http://labs.detectify.com/post/130332638391/how-patreon-got-hacked-publicly-exposed-werkzeug
.. versionadded:: 0.15.0
"""
""" # noqa: E501

import bandit
from bandit.core import test_properties as test
Expand Down
4 changes: 2 additions & 2 deletions bandit/plugins/general_bad_file_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
.. seealso::
- https://security.openstack.org/guidelines/dg_apply-restrictive-file-permissions.html # noqa
- https://security.openstack.org/guidelines/dg_apply-restrictive-file-permissions.html
- https://en.wikipedia.org/wiki/File_system_permissions
- https://security.openstack.org
.. versionadded:: 0.9.0
"""
""" # noqa: E501

import stat

Expand Down
4 changes: 2 additions & 2 deletions bandit/plugins/general_hardcoded_tmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
.. seealso::
- https://security.openstack.org/guidelines/dg_using-temporary-files-securely.html # noqa
- https://security.openstack.org/guidelines/dg_using-temporary-files-securely.html
.. versionadded:: 0.9.0
"""
""" # noqa: E501

import bandit
from bandit.core import test_properties as test
Expand Down
20 changes: 10 additions & 10 deletions bandit/plugins/injection_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ def subprocess_popen_with_shell_equals_true(context, config):
.. seealso::
- https://security.openstack.org
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
- https://security.openstack.org/guidelines/dg_avoid-shell-true.html
.. versionadded:: 0.9.0
"""
""" # noqa: E501
if config and context.call_function_name_qual in config['subprocess']:
if has_shell(context):
if len(context.call_args) > 0:
Expand Down Expand Up @@ -277,12 +277,12 @@ def subprocess_without_shell_equals_true(context, config):
.. seealso::
- https://security.openstack.org
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
- https://security.openstack.org/guidelines/dg_avoid-shell-true.html
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
.. versionadded:: 0.9.0
"""
""" # noqa: E501
if config and context.call_function_name_qual in config['subprocess']:
if not has_shell(context):
return bandit.Issue(
Expand Down Expand Up @@ -357,10 +357,10 @@ def any_other_function_with_shell_equals_true(context, config):
.. seealso::
- https://security.openstack.org/guidelines/dg_avoid-shell-true.html
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html # noqa
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
.. versionadded:: 0.9.0
"""
""" # noqa: E501
if config and context.call_function_name_qual not in config['subprocess']:
if has_shell(context):
return bandit.Issue(
Expand Down Expand Up @@ -440,11 +440,11 @@ def start_process_with_a_shell(context, config):
- https://security.openstack.org
- https://docs.python.org/3/library/os.html#os.system
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
.. versionadded:: 0.10.0
"""
""" # noqa: E501
if config and context.call_function_name_qual in config['shell']:
if len(context.call_args) > 0:
sev = _evaluate_shell_call(context)
Expand Down Expand Up @@ -538,11 +538,11 @@ def start_process_with_no_shell(context, config):
- https://security.openstack.org
- https://docs.python.org/3/library/os.html#os.system
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
.. versionadded:: 0.10.0
"""
""" # noqa: E501

if config and context.call_function_name_qual in config['no_shell']:
return bandit.Issue(
Expand Down
4 changes: 2 additions & 2 deletions bandit/plugins/injection_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
.. seealso::
- https://www.owasp.org/index.php/SQL_Injection
- https://security.openstack.org/guidelines/dg_parameterize-database-queries.html # noqa
- https://security.openstack.org/guidelines/dg_parameterize-database-queries.html
.. versionadded:: 0.9.0
"""
""" # noqa: E501

import ast
import re
Expand Down

0 comments on commit 539da77

Please sign in to comment.