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

Revert "Revert "Update python documentation links for version 3 counterparts"" #540

Merged
merged 2 commits into from
Sep 23, 2019
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
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Usage::
"{relpath:20.20s}: {line:03}: {test_id:^8}: DEFECT: {msg:>20}"

See python documentation for more information about formatting style:
https://docs.python.org/3.4/library/string.html
https://docs.python.org/3/library/string.html

The following tests were discovered and loaded:
-----------------------------------------------
Expand Down Expand Up @@ -254,10 +254,10 @@ Usage::

Baseline
--------
Bandit allows specifying the path of a baseline report to compare against using the base line argument (i.e. ``-b BASELINE`` or ``--baseline BASELINE``).
Bandit allows specifying the path of a baseline report to compare against using the base line argument (i.e. ``-b BASELINE`` or ``--baseline BASELINE``).

::

bandit -b BASELINE

This is useful for ignoring known vulnerabilities that you believe are non-issues (e.g. a cleartext password in a unit test). To generate a baseline report simply run Bandit with the output format set to ``json`` (only JSON-formatted files are accepted as a baseline) and output file path specified:
Expand Down Expand Up @@ -471,7 +471,7 @@ References

Bandit docs: https://bandit.readthedocs.io/en/latest/

Python AST module documentation: https://docs.python.org/2/library/ast.html
Python AST module documentation: https://docs.python.org/3/library/ast.html

Green Tree Snakes - the missing Python AST docs:
https://greentreesnakes.readthedocs.org/en/latest/
Expand Down
1 change: 1 addition & 0 deletions bandit/blacklists/calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@

For further information:
https://docs.python.org/2.7/library/os.html#os.tempnam
https://docs.python.org/3/whatsnew/3.0.html?highlight=tempnam
https://bugs.python.org/issue17880

+------+---------------------+------------------------------------+-----------+
Expand Down
2 changes: 1 addition & 1 deletion bandit/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def main():
"{relpath:20.20s}: {line:03}: {test_id:^8}: DEFECT: {msg:>20}"

See python documentation for more information about formatting style:
https://docs.python.org/3.4/library/string.html
https://docs.python.org/3/library/string.html

The following tests were discovered and loaded:
-----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion bandit/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# We don't handle the case of user-defined classes being false.
# These are only useful when we have a constant in code. If we
# have a variable we cannot determine if False.
# See https://docs.python.org/2/library/stdtypes.html#truth-value-testing
# See https://docs.python.org/3/library/stdtypes.html#truth-value-testing
FALSE_VALUES = [None, False, 'False', 0, 0.0, 0j, '', (), [], {}]

# override with "log_format" option in config file
Expand Down
4 changes: 2 additions & 2 deletions bandit/plugins/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
of assert is also considered as general bad practice in OpenStack codebases.

Please see
https://docs.python.org/2/reference/simple_stmts.html#the-assert-statement for
https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement for
more info on ``assert``

:Example:
Expand All @@ -44,7 +44,7 @@

- https://bugs.launchpad.net/juniperopenstack/+bug/1456193
- https://bugs.launchpad.net/heat/+bug/1397883
- https://docs.python.org/2/reference/simple_stmts.html#the-assert-statement
- https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement

.. versionadded:: 0.11.0

Expand Down
3 changes: 2 additions & 1 deletion bandit/plugins/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@

.. seealso::

- https://docs.python.org/2.0/ref/exec.html
- https://docs.python.org/2/reference/simple_stmts.html#exec
- https://docs.python.org/3/library/functions.html#exec
- https://www.python.org/dev/peps/pep-0551/#background
- https://www.python.org/dev/peps/pep-0578/#suggested-audit-hook-locations

Expand Down
14 changes: 7 additions & 7 deletions bandit/plugins/injection_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def subprocess_popen_with_shell_equals_true(context, config):
.. seealso::

- https://security.openstack.org
- https://docs.python.org/2/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html
- https://security.openstack.org/guidelines/dg_avoid-shell-true.html

Expand Down Expand Up @@ -287,7 +287,7 @@ def subprocess_without_shell_equals_true(context, config):
.. seealso::

- https://security.openstack.org
- https://docs.python.org/2/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://security.openstack.org/guidelines/dg_avoid-shell-true.html
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html

Expand Down Expand Up @@ -449,8 +449,8 @@ def start_process_with_a_shell(context, config):
.. seealso::

- https://security.openstack.org
- https://docs.python.org/2/library/os.html#os.system
- https://docs.python.org/2/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/os.html#os.system
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html

.. versionadded:: 0.10.0
Expand Down Expand Up @@ -547,8 +547,8 @@ def start_process_with_no_shell(context, config):
.. seealso::

- https://security.openstack.org
- https://docs.python.org/2/library/os.html#os.system
- https://docs.python.org/2/library/subprocess.html#frequently-used-arguments # noqa
- https://docs.python.org/3/library/os.html#os.system
- https://docs.python.org/3/library/subprocess.html#frequently-used-arguments # noqa
- https://security.openstack.org/guidelines/dg_use-subprocess-securely.html

.. versionadded:: 0.10.0
Expand Down Expand Up @@ -633,7 +633,7 @@ def start_process_with_partial_path(context, config):
.. seealso::

- https://security.openstack.org
- https://docs.python.org/2/library/os.html#process-management
- https://docs.python.org/3/library/os.html#process-management

.. versionadded:: 0.13.0
"""
Expand Down
2 changes: 1 addition & 1 deletion doc/source/man/bandit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Example usage:
"{relpath:20.20s}: {line:03}: {test_id:^8}: DEFECT: {msg:>20}"

See python documentation for more information about formatting style:
https://docs.python.org/3.4/library/string.html
https://docs.python.org/3/library/string.html

FILES
=====
Expand Down