Bandit

term

programmingsecurity

Kept in this browser · My desk

An open-source static analysis tool that looks for common security issues in Python code by building each file's syntax tree and running test plugins against it.

Its tests are numbered by family, from B1xx (miscellaneous) to B7xx (cross-site scripting): B602 flags subprocess calls with shell=True, B506 yaml.load, B301 pickle, B501 Requests calls with verify=False and B507 Paramiko's AutoAddPolicy. A reviewed exception is marked on its line with a nosec comment that names the test, such as nosec B603, and settings can live in a .bandit file or a tool.bandit table in pyproject.toml. It reads patterns, not intent.

Also known as: bandit (Python), PyCQA Bandit, nosec

← Back to B Back to the glossary