Skip to main content

A Bandit formatter for the Static Analysis Results Interchange Format (SARIF) Version 2.1.0 file format.

Project description

SARIF formatter for Bandit


bandit_sarif_formatter is a report formatter for Bandit, a security analyzer for Python. It produces output in the Static Analysis Results Interchange Format (SARIF) Version 2.1.0 file format, an OASIS Committee Specification.

To learn more about SARIF and find resources for working with it, you can visit the SARIF Home Page.


To build the bandit_sarif_formatter package, see the Python Packaging Authority’s instructions for Packaging Python Projects, in particular the section “Generating distribution archives.”

Briefly: run the following commands from the project root directory:

python -m pip install --user --upgrade setuptools wheel
python sdist bdist_wheel

The source distribution (.tar.gz) and wheel-style built distribution (.whl) packages appear in the dist/ directory.


To publish the bandit_sarif_formatter package, see the section “Uploading the distribution archives” and “Next steps” in Packaging Python Projects.

Briefly: log in to with the TODO account, and then run the following commands from the project root directory:

python -m pip install --user --upgrade twine
python -m twine upload dist/*


To install the bandit_sarif_formatter package, run the command:

python -m pip install bandit_sarif_formatter


To generate SARIF output from Bandit, run the command:

bandit --format sarif [targets [targets ...]] --output out.sarif


This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact with any additional questions or comments.

Project details

Download files

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

Files for bandit-sarif-formatter, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size bandit_sarif_formatter-1.1.1.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View
Filename, size bandit_sarif_formatter-1.1.1-py3-none-any.whl (8.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page