
Bandit é uma ferramenta projetada para encontrar problemas comuns de segurança em código Python.
.. image:: https://raw.githubusercontent.com/pycqa/bandit/main/logo/logotype-sm.png :alt: Bandit
======
.. image:: https://github.com/PyCQA/bandit/actions/workflows/pythonpackage.yml/badge.svg?branch=main :target: https://github.com/PyCQA/bandit/actions?query=workflow%3A%22Build+and+Test+Bandit%22+branch%3Amain :alt: Build Status
.. image:: https://readthedocs.org/projects/bandit/badge/?version=latest :target: https://readthedocs.org/projects/bandit/ :alt: Docs Status
.. image:: https://img.shields.io/pypi/v/bandit.svg :target: https://pypi.org/project/bandit/ :alt: Latest Version
.. image:: https://img.shields.io/pypi/pyversions/bandit.svg :target: https://pypi.org/project/bandit/ :alt: Python Versions
.. image:: https://img.shields.io/pypi/format/bandit.svg :target: https://pypi.org/project/bandit/ :alt: Format
.. image:: https://img.shields.io/badge/license-Apache%202-blue.svg :target: https://github.com/PyCQA/bandit/blob/main/LICENSE :alt: License
.. image:: https://img.shields.io/discord/825463413634891776.svg :target: https://discord.gg/qYxpadCgkx :alt: Discord
Um linter de segurança do PyCQA
Bandit é uma ferramenta projetada para encontrar problemas de segurança comuns em código Python. Para fazer isso, o Bandit processa cada arquivo, constrói uma AST a partir dele e executa plugins apropriados nos nós da AST. Após o Bandit terminar de escanear todos os arquivos, ele gera um relatório.
Bandit foi originalmente desenvolvido dentro do OpenStack Security Project e posteriormente realocado para o PyCQA.
.. image:: https://raw.githubusercontent.com/pycqa/bandit/main/bandit-terminal.png :alt: Exemplo de captura de tela do Bandit
.. image:: https://img.shields.io/badge/security-bandit-yellow.svg :target: https://github.com/PyCQA/bandit :alt: Security Status
Use nosso selo no README do seu projeto!
usando Markdown::
[](https://github.com/PyCQA/bandit)
usando RST::
.. image:: https://img.shields.io/badge/security-bandit-yellow.svg
:target: https://github.com/PyCQA/bandit
:alt: Security Status
Documentação do módulo AST do Python: https://docs.python.org/3/library/ast.html
Green Tree Snakes - as documentações Python AST que faltam: https://greentreesnakes.readthedocs.org/en/latest/
Documentação dos vários tipos de nós AST que o Bandit cobre atualmente ou pode ser estendido para cobrir: https://greentreesnakes.readthedocs.org/en/latest/nodes.html
Bandit está disponível como imagem de contêiner, construída dentro do repositório do bandit usando GitHub Actions. A imagem está disponível em ghcr.io:
.. code-block:: console
docker pull ghcr.io/pycqa/bandit/bandit
A imagem é construída para as seguintes arquiteturas:
Para baixar uma arquitetura específica, use o seguinte formato:
.. code-block:: console
docker pull --platform=<architecture> ghcr.io/pycqa/bandit/bandit:latest
Cada imagem é assinada com sigstore cosign e é possível verificar a origem usando o seguinte comando cosign:
.. code-block:: console
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
Onde <version> é a versão de lançamento do Bandit.
O desenvolvimento do Bandit é possível graças aos seguintes patrocinadores:
.. list-table:: :width: 100% :class: borderless
.. image:: https://avatars.githubusercontent.com/u/34240465?s=200&v=4 :target: https://opensource.mercedes-benz.com/ :alt: Mercedes-Benz :width: 88
.. image:: https://github.githubassets.com/assets/tidelift-8cea37dea8fc.svg :target: https://tidelift.com/lifter/search/pypi/bandit :alt: Tidelift :width: 88
.. image:: https://avatars.githubusercontent.com/u/110237746?s=200&v=4 :target: https://stacklok.com/ :alt: Stacklok :width: 88
Se você também ❤️ o Bandit, considere patrocinar.