Development Skills
  • Development Skills
  • Server-side
    • Reverse SSH
    • Let's encrypt with Nginx
    • Miniconda
    • OpenSSL
    • Windows Skills
    • Crobtab
  • Set up Workspace
    • Setup basic environment
  • Bandit - Check your code's safeness
    • Introduction
    • Getting Started
    • Usage
    • Banditfile
    • Tailor-made testing
    • Tailor-made blacklist
    • Tailor-made formatter
    • Reference
Powered by GitBook
On this page
  • Per Project Command Line Args
  • Example of .banditfile content
  1. Bandit - Check your code's safeness

Banditfile

You can use a .banditfile to declare what tests and which folder you would like to test. Put the .banditfile into your project directory.

An optional config file may be supplied and may include:

  • lists of tests which should or shouldn’t be run

  • exclude_dirs - sections of the path, that if matched, will be excluded from scanning

  • overridden plugin settings - may provide different settings for some plugins

Per Project Command Line Args

Projects may include a .bandit file that specifies command line arguments that should be supplied for that project. The currently supported arguments are:

  • targets: comma separated list of target dirs/files to run bandit on

  • exclude: comma separated list of excluded paths

  • skips: comma separated list of tests to skip

  • tests: comma separated list of tests to run

Example of .banditfile content

[bandit]
exclude: /test
tests: B101,B102,B301
PreviousUsageNextTailor-made testing

Last updated 6 years ago