Security layer for vibe-coded apps
Features β’ Installation β’ Usage β’ AI Integration β’ Network Security
vibecurb prevents insecure vibe coding from happening. Instead of scanning apps after they're built, it acts as a security layer that catches secrets before they reach your codebase.
"We don't scan vibe-coded apps. We prevent insecure vibe coding from happening."
- β API Keys - Generic, AWS, GitHub, Stripe, Google
- β Authentication - Bearer tokens, JWT, passwords, private keys
- β Database - Connection strings (MongoDB, PostgreSQL, MySQL, Redis)
- β Communication - Slack tokens, email addresses
- β Smart Filtering - Ignores test data (FAKE_ prefix) and placeholders
Detect sensitive data exposure in:
- π Console Logging - User objects, auth headers, API responses
- π HTTP Requests - Hardcoded auth in fetch/axios, API keys in URLs
- π API Responses - Full user objects, database documents, stack traces
- π Error Handling - Raw errors exposed to clients
- π CORS Configuration - Wildcard origins, insecure headers
- π§ Extract secrets to
.envfiles automatically - π§ Replace code with
process.envreferences - π§ Create backups before modifying files
- π§ Update .gitignore to exclude .env files
- π€ Universal AI support - Works with Cursor, GitHub Copilot, Claude, etc.
- π€ AI instructions included for all major tools
- π€ Prevents secrets at generation time
# Global install
npm install -g vibecurb
# Or local install
npm install --save-dev vibecurb# Scan current directory
vibecurb scan
# Scan specific path
vibecurb scan ./src
# Auto-fix detected secrets
vibecurb scan --fix
# Preview fixes without applying
vibecurb scan --dry-run
# Filter by severity
vibecurb scan --severity error
# JSON output for CI/CD
vibecurb scan --json# Scan for logging/API exposure issues
vibecurb scan-network
# Scan specific directory
vibecurb scan-network ./src
# Output as JSON
vibecurb scan-network --jsonExample output:
π Scanning network security: ./src
β ERROR [logging]
π api.js:15
Console logging may expose user data
Match: console.log(user)
Fix: Use a structured logger with data redaction
β ERROR [request]
π config.js:8
Hardcoded authorization header in fetch request
Match: fetch("/api", { headers: { Authorization: "Bearer token123" } })
Fix: Use environment variables for tokens
β οΈ WARNING [response]
π routes.js:42
API response may expose full user object
Match: res.json({ user: req.user })
Fix: Select only necessary fields before sending response
π Summary by Category:
logging: 1
request: 1
response: 1
error-handling: 0
π Overall:
β 2 error(s) found
β οΈ 1 warning(s) found
vibecurb scan # Full name
vibe scan # Short & memorable
vibe scan-network # Short aliasNote
By default, vibecurb ignores node_modules, dist, build, .git, coverage, .env, .env.local, and .next directories.
vibecurb provides security instructions for AI coding assistants:
- β
Cursor -
.cursorrulesfile - β
GitHub Copilot -
.github/copilot-instructions.md - β
Claude -
AI_INSTRUCTIONS.md - β Antigravity - Via instructions file
- β Wildsurf - Via instructions file
- β Any AI - Universal instructions included
- Copy AI instructions to your project:
cp node_modules/vibecurb/.cursorrules ./.cursorrules
cp node_modules/vibecurb/.github/copilot-instructions.md ./.github/- AI will now:
- Use environment variables for secrets
- Never log sensitive data
- Suggest vibecurb before committing
Before committing code, vibecurb checks for:
Secrets:
- No API keys in code
- No database passwords
- No private keys
- No hardcoded tokens
Network:
- No console.log of user data
- No auth headers in logs
- No full objects in API responses
- No stack traces in error responses
Best Practices:
- All secrets in .env
- .env in .gitignore
- No debugger statements
- Proper CORS configuration
Use FAKE_ prefix in tests:
// β
Safe - will be ignored
const apiKey = "FAKE_API_KEY_001";
const email = "FAKE_EMAIL_001@test.com";
// β Will be detected
const apiKey = "sk-live-actual-secret-key";# Clone repository
git clone https://github.com/Mofuhidy/vibecurb.git
cd vibecurb
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run in development
npm run devCreate .vibecurbrc.json:
{
"extensions": [".js", ".ts", ".jsx", ".tsx"],
"exclude": ["node_modules", "dist", "build"],
"severity": "all"
}# Install globally
npm install -g vibecurb
# Use immediately
vibecurb scanContributions welcome! Please read our Contributing Guide.
MIT Β© Mofuhidy
- Inspired by truffleHog and GitGuardian
- Built for the vibe-coding era
- Security-first by design