Security oriented static analyser for python code.
Project description
A security linter from PyCQA
Free software: Apache license
Documentation: https://bandit.readthedocs.io/en/latest/
Source: https://github.com/PyCQA/bandit
Bugs: https://github.com/PyCQA/bandit/issues
Contributing: https://github.com/PyCQA/bandit/blob/main/CONTRIBUTING.md
Overview
Bandit is a tool designed to find common security issues in Python code. To do this Bandit processes each file, builds an AST from it, and runs appropriate plugins against the AST nodes. Once Bandit has finished scanning all the files it generates a report.
Bandit was originally developed within the OpenStack Security Project and later rehomed to PyCQA.
Show Your Style
Use our badge in your project’s README!
using Markdown:
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
using RST:
.. image:: https://img.shields.io/badge/security-bandit-yellow.svg :target: https://github.com/PyCQA/bandit :alt: Security Status
References
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/
Documentation of the various types of AST nodes that Bandit currently covers or could be extended to cover: https://greentreesnakes.readthedocs.org/en/latest/nodes.html
Container Images
Bandit is available as a container image, built within the bandit repository using GitHub Actions. The image is available on ghcr.io:
docker pull ghcr.io/pycqa/bandit/bandit
The image is built for the following architectures:
amd64
arm64
armv7
armv8
To pull a specific architecture, use the following format:
docker pull --platform=<architecture> ghcr.io/pycqa/bandit/bandit:latest
Every image is signed with sigstore cosign and it is possible to verify the source of origin using the following cosign command:
cosign verify ghcr.io/pycqa/bandit/bandit:latest \
--certificate-identity https://github.com/pycqa/bandit/.github/workflows/build-publish-image.yml@refs/tags/<version> \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
Where <version> is the release version of Bandit.
Sponsors
The development of Bandit is made possible by the following sponsors:
If you also ❤️ Bandit, please consider sponsoring.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bandit-1.7.10.tar.gz
.
File metadata
- Download URL: bandit-1.7.10.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59ed5caf5d92b6ada4bf65bc6437feea4a9da1093384445fed4d472acc6cff7b |
|
MD5 | fcdc31c49375f6d431887a16dee54a51 |
|
BLAKE2b-256 | 3826bdd962d6ee781f6229c3fb83483cf9e09d87959150a9000789806d750f3c |
File details
Details for the file bandit-1.7.10-py3-none-any.whl
.
File metadata
- Download URL: bandit-1.7.10-py3-none-any.whl
- Upload date:
- Size: 130.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 665721d7bebbb4485a339c55161ac0eedde27d51e638000d91c8c2d68343ad02 |
|
MD5 | ff168db1e65549e14ada79ee73492682 |
|
BLAKE2b-256 | 9e9c491231d973d54f6465002812b4cadc663f208436407745be473254725f55 |