Skip to main content

Automated security testing with bandit and flake8.

Project description

flake8-bandit

Build Status

Automated security testing built right into your workflow!

You already use flake8 to lint all your code for errors, ensure docstrings are formatted correctly, sort your imports correctly, and much more... so why not ensure you are writing secure code while you're at it? If you already have flake8 installed all it takes is pip install flake8-bandit.

Configuration

To include or exclude tests, use the standard .bandit configuration file. An example valid .bandit config file:

[bandit]
exclude = /frontend,/scripts,/tests,/venv
tests: B101

In this case, we've specified to ignore a number of paths, and to only test for B101.

Note: flake8-bugbear uses bandit default prefix 'B' so this plugin replaces the 'B' with an 'S' for Security. For more information, see https://github.com/PyCQA/flake8-bugbear/issues/37

How's it work?

We use the bandit package from PyCQA for all the security testing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_bandit-4.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

flake8_bandit-4.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file flake8_bandit-4.1.1.tar.gz.

File metadata

  • Download URL: flake8_bandit-4.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for flake8_bandit-4.1.1.tar.gz
Algorithm Hash digest
SHA256 068e09287189cbfd7f986e92605adea2067630b75380c6b5733dab7d87f9a84e
MD5 c2eacee092edd70b3382ecbd5636b58a
BLAKE2b-256 771c4f66a7a52a246d6c64312b5c40da3af3630cd60b27af81b137796af3c0bc

See more details on using hashes here.

File details

Details for the file flake8_bandit-4.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_bandit-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8a53eb48f23d4ef1e59293657181a3c989d0077c9952717e98a0eace43e06d
MD5 30296c61848c08b4a31f1350dfd12c0c
BLAKE2b-256 e75f55bab0ac89f9ad9f4c6e38087faa80c252daec4ccb7776b4dac216ca9e3f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page