key-guard
A python tool that checks to find exposed authentication keys in a project and throws a warning. This prevents the sharing of sensitive data and enforces the use of best practices like saving authentication keys to .env files.
Features
- Scan Project for exposed keys and passwords
- Add words to guarded_words list to look out for when scanning
- Exclude files from scanning
- Include files for scanning
Core Requirements
- Click
Using the CLI tool from Pip
- Install the tool from pip by running:
pip install key-guard
- Quickly Scan your working directory by running:
key-guard -s
- Start by initializing the tool by running:
key-guard -i
- Add the
--helpoption the command to check out the available options.
Usage: key_guard.py [OPTIONS] [PATH]
CLI tool to scan a project for any key or token
Options:
-e, --exempt TEXT exempt a file from scanning by removing from
.guard/.fileignore
-inc, --include TEXT include a word to scan by adding it to
.guard/.fileignore
-a, --add TEXT Add new words to .guard/.keyignore
-i, --init Initialize the key_guard
-l, --list List all the guarded words
-s, --scan Scan the project for any key or token
--help Show this message and exit.
Setting up the tool for local development
- Clone this repository to your local machine.
- Create a virtual environment for your project and activate it. Install all dependencies from requirements.txt file.
python3 -m venv .venv/
source .venv/bin/activate
pip install -r requirements.txt
- In the root directory of the project, develop the project locally from the setup configuration.
python3 setup.py develop
- A
*.egg-infodirectory is created in your root directory for you to use the tool locally. Get started by running the following command:
key-guard -i
- the
--helpoption the command to check out the available options.
Usage: key_guard.py [OPTIONS] [PATH]
CLI tool to scan a project for any key or token
Options:
-e, --exempt TEXT exempt a file from scanning by removing from
.guard/.fileignore
-inc, --include TEXT include a word to scan by adding it to
.guard/.fileignore
-a, --add TEXT Add new words to .guard/.keyignore
-i, --init Initialize the key_guard
-l, --list List all the guarded words
-s, --scan Scan the project for any key or token
--help Show this message and exit.
Contributing
- Fork this repository to your GitHub account.
- Clone the forked repository to your local machine.
- Create a new branch for the feature you want to work on.
- Make your contributions.
- Push your local branch to your remote repository.
- Open a pull request to the develop branch of this repository.
Metadata
Release files for key-guard 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| key_guard-0.1.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| key_guard-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / key_guard-0.1.tar.gz
| Download URL | key_guard-0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2fcd25082a1df4a06e2d5aff5dcbb73e4e85b52304038c1e426987b3b399f07
|
|
BLAKE2b-256 checksum How to use checksums |
ff48a23d6b81bb7bab1634384afcdd810684b6f3de293a8a499e721ee939db5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / key_guard-0.1-py3-none-any.whl
| Download URL | key_guard-0.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
562989eeb10a64d5098caecd464ae797301b7923c67c3dd0e116238a99f8dac0
|
|
BLAKE2b-256 checksum How to use checksums |
26ac58a944e62489e2704fcf6e036ac30ab83bd5c3950533dee7e6b76e6518e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|