https://github.com/janpreet/pbsanitize
A clipboard utility that automatically sanitizes sensitive data
https://github.com/janpreet/pbsanitize
pbcopy sanitize
Last synced: about 1 month ago
JSON representation
A clipboard utility that automatically sanitizes sensitive data
- Host: GitHub
- URL: https://github.com/janpreet/pbsanitize
- Owner: janpreet
- License: mit
- Created: 2025-01-08T01:32:35.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-08T02:31:47.000Z (4 months ago)
- Last Synced: 2025-01-24T19:19:28.650Z (3 months ago)
- Topics: pbcopy, sanitize
- Language: C
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pbsanitize
I needed a tool to safely sanitize secrets and sensitive data before copying to clipboard, so I made this. It automatically detects and redacts things like API keys, tokens, passwords, SSH keys, and other secrets.
## Install
### On macOS
```bash
git clone https://github.com/janpreet/pbsanitize
cd pbsanitize
make
sudo make install
```### On Linux
First install xsel:
```bash
sudo apt install xsel # Ubuntu/Debian
sudo dnf install xsel # Fedora
```Then build and install:
```bash
git clone https://github.com/janpreet/pbsanitize
cd pbsanitize
make
sudo make install
```## Usage
Just pipe any text through it:
```bash
cat config.yml | pbsanitize
git config -l | pbsanitize
echo "my_api_key=secret123" | pbsanitize
```The sanitized output is automatically copied to your clipboard.
## What it catches
- API keys & secrets
- AWS keys & cloud credentials
- JWT tokens
- GitHub tokens
- Private keys & certificates
- Connection strings
- Email addresses
- Credit card numbers
- Environment variables
- IPs (v4 & v6)
- SSH keys
- OAuth tokens
- Session IDs
- Etc.## License
MIT