Skip to main content

Python implementation of git-secrets

Project description

A pure Python library providing git-secrets functionality.

We don’t plan to do everything that 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.

Included in this repository are AWS credentials solely used for testing purposes. These are not valid AWS credentials, they were marked invalid immediately after creating in the AWS console.

Requirements

  • 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

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

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

python-git-secrets-0.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_git_secrets-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file python-git-secrets-0.0.1.tar.gz.

File metadata

File hashes

Hashes for python-git-secrets-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e9c8016344adb1c309847181e10a0e0dc13050b41651daaea46453b768d37cf4
MD5 c764b670ec31b2b2ee68f49d093ed9b1
BLAKE2b-256 6ccc0859248b4648df9ac7abfef055516367832780d664071f4a0f9d9555c72c

See more details on using hashes here.

File details

Details for the file python_git_secrets-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_git_secrets-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a34eada2763034cf123e5d1c296123306eb70f08944c2ccdbba54cba05b5c07
MD5 11ed235a6eec6e9e3dbbd9ea269cd789
BLAKE2b-256 0a8790064142f973c720a9056e2218414da379e8f8adf1970bd2265a558229f4

See more details on using hashes here.

Supported by

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