A rule based library to help identify credentials and secrets in files and strings.
Project description
Credential Sleuth
A rule driven library for detecting secrets and credentials within files and strings.
Simple Usage
Finding secrets in a string:
import credsleuth
data = """
Hello, world
Password=123
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
Goodbye
"""
print(credsleuth.check_string(data))
Finding secrets in a file:
import credsleuth
print(credsleuth.check_file("filename.txt"))
Command line usage
credsleuth filename.txt
Advanced Usage
Customizing configuration
import credsleuth
config = credsleuth.ConfigEngine()
config.verbose = True
config.rules_file = 'custom_rules.json'
credsleuth.check_file('filename.txt', config)
Installation
pip install --user credsleuth
Writing Rules
See rules.json
for an example in extending rules definitions.
Todo
- Add some comments to codebase
- Add pretty output options for command line execution.
- Write a proper read me.
- Build model to detect credentials based upon entropy
- Search multiple files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
credsleuth-0.0.16.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for credsleuth-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 978dbcf821011e6c39e1b826ae7e3a0cc5f458c48c424f679632d6321ef87707 |
|
MD5 | 4bb87bec66c472348ac28d6b2e084112 |
|
BLAKE2b-256 | f963d08d2d6aeaad3ce374b74c105fbc8a97d9b31181850425d6b7de5fdc5681 |