https://github.com/chaluvadis/safe-to-send
safe-to-send is a minimal VS Code extension to scan selected code (or full file) for sensitive data before copying for manual AI usage.
https://github.com/chaluvadis/safe-to-send
agent-skills agents ai clipboard security sensitive-data typescript utilities utility vscode-extension
Last synced: 20 days ago
JSON representation
safe-to-send is a minimal VS Code extension to scan selected code (or full file) for sensitive data before copying for manual AI usage.
- Host: GitHub
- URL: https://github.com/chaluvadis/safe-to-send
- Owner: chaluvadis
- License: mit
- Created: 2026-04-23T05:07:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-28T07:41:32.000Z (3 months ago)
- Last Synced: 2026-04-28T09:29:14.232Z (3 months ago)
- Topics: agent-skills, agents, ai, clipboard, security, sensitive-data, typescript, utilities, utility, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=chaluvadis.safe-send
- Size: 223 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Safe Send
[](https://marketplace.visualstudio.com/items?itemName=nomad-in-code.safe-send)
[](https://opensource.org/licenses/MIT)
**Safe Send** prevents accidental leakage of sensitive data when copying code to AI tools. It scans for secrets (API keys, passwords, tokens) and sanitizes them before they reach your clipboard.
---
## ๐ Quick Start
1. **Install** from VS Code Extensions (`Ctrl+Shift+X` โ Search "Safe Send")
2. **Select code** in your editor
3. **Right-click** โ **"Safe Send: Scan & Copy for AI"**
4. **Review results** โ Copy safely!
---
## ๐ What It Does
### Detects 9 Types of Secrets
| Type | Example | Replaced With |
|------|---------|---------------|
| OpenAI Keys | `sk-1234...` | `` |
| AWS Keys | `AKIA...` | `` |
| GitHub Tokens | `ghp_...` | `` |
| JWT Tokens | `eyJhbGc...` | `` |
| Private Keys | `-----BEGIN...` | `` |
| IP Addresses | `192.168.1.1` | `` |
| Emails | `user@domain.com` | `` |
| Passwords | `password = "secret"` | `` |
| Anthropic Keys | `sk-ant-...` | `` |
### Risk Levels
- ๐ข **LOW** (0-29): No warning (emails, IPs)
- ๐ก **MEDIUM** (30-59): Warning (passwords)
- ๐ด **HIGH** (60-100): Warning (API keys, tokens)
---
## ๐ป Usage Examples
### Example 1: Clean Code โ Auto Copy
```javascript
// Before: No secrets detected
const greeting = "Hello World";
```
โ
**Result**: Copied automatically (no warning)
---
### Example 2: Secret Detected โ Warning
```javascript
// Before: Contains API key
const apiKey = "sk-1234567890abcdef";
```
โ ๏ธ **Dialog appears**:
- Risk: 60/100 (HIGH)
- Detected: OpenAI API key
- Options: **Sanitize & Copy** | Copy Anyway | Cancel
โ
**After Sanitizing**:
```javascript
const apiKey = "";
```
---
### Example 3: Multiple Secrets
```javascript
// Before: Multiple secrets
const config = {
apiKey: "sk-1234567890",
password: "secret123",
email: "admin@company.com"
};
```
โ ๏ธ **Risk**: 100/100 (HIGH - maximum)
โ
**After**:
```javascript
const config = {
apiKey: "",
password: "",
email: ""
};
```
---
## ๐ธ Screenshots
See **[SCREENSHOTS.md](SCREENSHOTS.md)** for visual examples of:
1. โ
Clean code copy (no secrets)
2. โ ๏ธ Single secret warning
3. โ ๏ธ Multiple secrets warning
4. ๐งผ Sanitized output
5. ๐ Status bar indicators
6. โ๏ธ Settings configuration
7. ๐ Ignore for file feature
8. ๐ Clipboard monitoring
9. ๐ Path-based risk adjustment
10. ๐จ Command palette access
---
## โ๏ธ Configuration
### Custom Patterns
Add your own detectors in VS Code Settings:
```json
{
"safeSend.customPatterns": [
{
"id": "company_key",
"label": "Company Key",
"regex": "COMPANY_[A-Z0-9]{24}",
"placeholder": "",
"riskScore": 60,
"critical": true
}
]
}
```
### Repository Config
Create `.safe-send.json` in your project:
```json
{
"patterns": [
{
"id": "internal_token",
"label": "Internal Token",
"regex": "INTERNAL_[A-Z0-9]{32}"
}
]
}
```
---
## ๐ ๏ธ Commands
| Command | Shortcut |
|---------|----------|
| Scan & Copy | `Ctrl+Shift+P` โ "Safe Send" |
| Context Menu | Right-click in editor |
| Settings | `Ctrl+,` โ Search "Safe Send" |
---
## ๐ Clipboard Monitoring
Safe Send automatically monitors your clipboard:
- โ
Scans every 200ms
- โ
Warns for MEDIUM/HIGH risk
- โ
Ignores LOW risk (emails, IPs)
- โ
Never blocks clipboard
**Disable in Settings**: `safeSend.clipboard.monitor`
---
## ๐ Quality Metrics
| Metric | Value |
|--------|-------|
| Tests Passing | 80/80 โ
|
| Test Coverage | 100% |
| Compile Errors | 0 |
| Breaking Changes | 0 |
| Lines of Code | 7,484 |
---
## ๐ Quick Commands
```bash
# Install locally
npm run install:local
# Remove local install
npm run remove:local
# Run tests
npm test
# Build
pnpm run build
```
---
## ๐ Safety & Privacy
- โ
No data collection
- โ
No network access
- โ
100% offline
- โ
Open source (MIT)
- โ
Max 200KB file size
---
## ๐ Documentation
- **[Architecture](docs/ARCHITECTURE.md)** - Technical design
- **[Test Scenarios](docs/Test_Data.md)** - 100+ examples
- **[User Guide](docs/USER_TESTING_GUIDE.md)** - Testing instructions
- **[QA System](reports/IMPLEMENTATION_SUMMARY.md)** - Autonomous testing
---
## ๐ป Development
```bash
# Setup
git clone https://github.com/chaluvadis/safe-send-to-ai.git
cd safe-to-send
pnpm install
pnpm run dev:setup
```
---
Stay safe. Sanitize before you share.
---