Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit config #411

Merged
merged 1 commit into from Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
@@ -0,0 +1,6 @@
- id: bandit
name: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
entry: bandit
language: python
types: [python]
19 changes: 18 additions & 1 deletion README.rst
Expand Up @@ -37,7 +37,7 @@ 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
Bandit was originally developed within the OpenStack Security Project and
later rehomed to PyCQA.

Installation
Expand Down Expand Up @@ -249,6 +249,23 @@ Usage::
B703 django_mark_safe


Version control integration
---------------------------

Use `pre-commit <https://pre-commit.com/>`_. Once you `have it
installed <https://pre-commit.com/#install)>`_, add this to the
`.pre-commit-config.yaml` in your repository
(be sure to update `rev` to point to a real git tag/revision!)::

repos:
- repo: https://github.com/PyCQA/bandit
rev: '' # Update me!
hooks:
- id: bandit


Then run `pre-commit install` and you're ready to go.

Configuration
-------------
An optional config file may be supplied and may include:
Expand Down