Python implementation of git-secrets
Project description
Python Git Secrets
==================
A pure Python library providing
`git-secrets <https://github.com/awslabs/git-secrets>`__
functionality.
|Build Status|
We don’t plan to do everything that
`git-secrets <https://github.com/awslabs/git-secrets>`__ does
(i.e. placing patterns in your .gitconfig file), but provide you with
the building blocks for matching patterns you don’t want exposed to the
world via Github. This will allow you to run the tool in an AWS Lambda
function with no dependence on external binaries.
There are no longer AWS credentials in this repository (at one time
there were inactive AWS credentials used for testing purposes.) Now
testing is performed by generating AWS credential strings on the fly
using the same pattern that AWS uses for their creds.
Requirements
------------
- `Dulwich <https://github.com/jelmer/dulwich>`__ - A pure Python Git
implementation.
Sample usage
------------
Run the ``python-git-secrets.py`` command to try it out:
::
(venv) [mbacchi@hostname python-git-secrets]$ python samples/python-git-secrets.py --scan flask-quotes --repository https://github.com/mbacchi/flask-quotes --use_local_repo -r
Scanning flask-quotes recursively
flask-quotes
SCANNING: flask-quotes/app.py
Found verboten string in path flask-quotes
Running Tests
-------------
To run tests, execute ``test_driver.py`` from the top level directory,
you’ll see output similar to:
::
(venv) [mbacchi@hostname python-git-secrets]$ python test_driver.py
....
----------------------------------------------------------------------
Ran 4 tests in 0.005s
OK
TODO
----
- create logging capabilities
- enable verbose output
Meta
----
Matt Bacchi - mbacchi@gmail.com
Distributed under the BSD (Simplified) license. See ``LICENSE`` for more
information.
Contributing
------------
1. Fork it (https://github.com/mbacchi/python-git-secrets/fork)
2. Create your feature branch (``git checkout -b feature/fooBar``)
3. Commit your changes (``git commit -am 'Add some fooBar'``)
4. Push to the branch (``git push origin feature/fooBar``)
5. Create a new Pull Request
.. raw:: html
<!-- Markdown link & img dfn's -->
.. |Build Status| image:: https://travis-ci.org/mbacchi/python-git-secrets.svg?branch=master
:target: https://travis-ci.org/mbacchi/python-git-secrets
==================
A pure Python library providing
`git-secrets <https://github.com/awslabs/git-secrets>`__
functionality.
|Build Status|
We don’t plan to do everything that
`git-secrets <https://github.com/awslabs/git-secrets>`__ does
(i.e. placing patterns in your .gitconfig file), but provide you with
the building blocks for matching patterns you don’t want exposed to the
world via Github. This will allow you to run the tool in an AWS Lambda
function with no dependence on external binaries.
There are no longer AWS credentials in this repository (at one time
there were inactive AWS credentials used for testing purposes.) Now
testing is performed by generating AWS credential strings on the fly
using the same pattern that AWS uses for their creds.
Requirements
------------
- `Dulwich <https://github.com/jelmer/dulwich>`__ - A pure Python Git
implementation.
Sample usage
------------
Run the ``python-git-secrets.py`` command to try it out:
::
(venv) [mbacchi@hostname python-git-secrets]$ python samples/python-git-secrets.py --scan flask-quotes --repository https://github.com/mbacchi/flask-quotes --use_local_repo -r
Scanning flask-quotes recursively
flask-quotes
SCANNING: flask-quotes/app.py
Found verboten string in path flask-quotes
Running Tests
-------------
To run tests, execute ``test_driver.py`` from the top level directory,
you’ll see output similar to:
::
(venv) [mbacchi@hostname python-git-secrets]$ python test_driver.py
....
----------------------------------------------------------------------
Ran 4 tests in 0.005s
OK
TODO
----
- create logging capabilities
- enable verbose output
Meta
----
Matt Bacchi - mbacchi@gmail.com
Distributed under the BSD (Simplified) license. See ``LICENSE`` for more
information.
Contributing
------------
1. Fork it (https://github.com/mbacchi/python-git-secrets/fork)
2. Create your feature branch (``git checkout -b feature/fooBar``)
3. Commit your changes (``git commit -am 'Add some fooBar'``)
4. Push to the branch (``git push origin feature/fooBar``)
5. Create a new Pull Request
.. raw:: html
<!-- Markdown link & img dfn's -->
.. |Build Status| image:: https://travis-ci.org/mbacchi/python-git-secrets.svg?branch=master
:target: https://travis-ci.org/mbacchi/python-git-secrets
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
Built Distribution
Close
Hashes for python_git_secrets-0.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3807aad012d929f4d37801aa8e95e3a3f3929792b53df78c5ec56cb1c40dfe0d |
|
MD5 | 069c84b6b100688a1b8abea1a1e4b089 |
|
BLAKE2b-256 | b72bbc2f0fa3d4ca6c96d92d1304c4420b559ec24fdd1914c1ef017941fdaa25 |