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 # noqa rendering in docs #645

Merged
merged 1 commit into from
Nov 19, 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
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