@goldensheepai/shepscan
v0.1.1
Published
AI-native secret detection CLI for scanning repositories
Maintainers
Readme
Quick Start • Features • Documentation • GitHub
🎯 Why ShepScan?
$4.45 million — the average cost of a data breach in 2023. Many start with a single leaked API key.
ShepScan catches secrets before they reach your repository. Built for developers who ship fast and need security that doesn't slow them down.
⚡ Quick Start
# Run instantly with npx (no install needed)
npx @goldensheepai/shepscan scan ./your-project
# Or install globally
npm install -g @goldensheepai/shepscan
shepscan scan ./your-projectUsage
Scan Current Directory
shepscanScan a Specific Directory
shepscan scan ./my-projectScan a GitHub Repository
shepscan repo https://github.com/username/repoOptions
shepscan [path] [options]
Options:
-v, --verbose Show detailed output with snippets
-o, --output <file> Save results to JSON file
-V, --version Output version number
-h, --help Display helpExamples
# Scan with verbose output
shepscan scan ./src --verbose
# Save results to JSON
shepscan scan ./src -o results.json
# Scan a public GitHub repo
shepscan repo https://github.com/streaak/keyhacks
# List all detection patterns
shepscan patterns✨ Features
13+ Secret Patterns Detected
Critical
- AWS Keys
- GitHub Tokens
- Stripe Keys
- Database URLs
- Private Keys (RSA, SSH)
High
- Google API Keys
- Slack Tokens
- Discord Tokens
- OpenAI Keys
- JWT Secrets
Medium
- Generic API Keys
- Passwords
- Environment Secrets
Smart Detection
- Zero Config — Works out of the box
- Fast Scanning — Processes thousands of files per second
- Low False Positives — Filters test/example patterns
- Exit Codes — Perfect for CI/CD pipelines
🔧 Programmatic Usage
import { scanDirectory, scanSingleFile } from '@goldensheepai/shepscan';
// Scan a directory
const result = scanDirectory('./my-project');
console.log(`Found ${result.totalSecrets} secrets`);
console.log(`Overall severity: ${result.overallSeverity}`);
for (const secret of result.secrets) {
console.log(`${secret.filePath}:${secret.lineNumber} - ${secret.secretType}`);
}
// Scan a single file
const fileResult = scanSingleFile('./config.js');Exit Codes
0— No secrets found, or only low/medium severity1— Critical or high severity secrets found
Use in CI/CD:
shepscan scan . || echo "Secrets detected!"🤝 Contributing
We welcome contributions! ShepScan is open source and community-driven.
See CONTRIBUTING.md for guidelines.
📄 License
MIT License © Golden Sheep AI
