A CLI tool to help you guard your sensitive information from being pushed to a remote repository
Project description
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
--help
option 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-info
directory is created in your root directory for you to use the tool locally. Get started by running the following command:
key-guard -i
- the
--help
option 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.
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
key_guard-0.1.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file key_guard-0.1.tar.gz
.
File metadata
- Download URL: key_guard-0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2fcd25082a1df4a06e2d5aff5dcbb73e4e85b52304038c1e426987b3b399f07 |
|
MD5 | fdc82a0854def962c49c7e2842cefdf9 |
|
BLAKE2b-256 | ff48a23d6b81bb7bab1634384afcdd810684b6f3de293a8a499e721ee939db5a |
File details
Details for the file key_guard-0.1-py3-none-any.whl
.
File metadata
- Download URL: key_guard-0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 562989eeb10a64d5098caecd464ae797301b7923c67c3dd0e116238a99f8dac0 |
|
MD5 | 695a185080084d73339e94191a13e8af |
|
BLAKE2b-256 | 26ac58a944e62489e2704fcf6e036ac30ab83bd5c3950533dee7e6b76e6518e5 |