DOCUMENTATION
Complete guide to Vibe-Guard's security scanning capabilities, installation, and usage.
Installation
Installing Vibe-Guard globally makes it available across all your projects without per-project setup. The tool requires no Docker containers, complex dependencies, or configuration files to start scanning. Global installation enables seamless CI/CD integration and consistent command availability.
Prerequisites
- Node.js 16.0 or higher
- npm, yarn, or pnpm package manager
- Access to the target codebase
Alternative Installation Methods
Verify Installation
Common Issues
- Command not found: ensure global npm bin is on PATH (npm bin -g)
- Permission denied: use a Node version manager instead of sudo
- Proxy/firewall: configure npm registry or use a different network
Basic Usage
Learn the fundamentals of security scanning with Vibe-Guard's command interface. This section covers how to interpret scan results, understand exit codes, and establish workflows for different development scenarios.
Common Commands
Understanding the Output
- Rule: Identifier and severity
- Location: File path and line number
- Snippet: Context around the finding
- Remediation: Concrete fix guidance
Exit Codes
Typical Workflows
- Local dev:
vibe-guard scan --severity highbefore commit - CI check:
vibe-guard scan --format json --output-file results.jsongate merges - Audit:
vibe-guard scan --format html --output-file report.htmlfor sharing
CLI Options
Command-line flags customize scan behavior, output formats, and performance. Learn when and how to combine flags effectively to improve scan relevance, reduce noise, and optimize execution time.
| Option | Description | Default |
|---|---|---|
| --format, -f | Output format (table, json, sarif, html) | table |
| --output-file, -o | Write output to file | stdout |
| --verbose, -v | Verbose output | false |
| --severity, -s | Minimum severity level (critical, high, medium, low) | all levels |
| --config, -c | Path to configuration file | auto-detected |
| --parallel | Enable parallel processing | false |
| --max-files | Maximum files to process concurrently | unlimited |
| --exclude | Directories or files to exclude | node_modules, .git |
| --include | Specific files or patterns to include | all files |
When To Use Which Flag
Practical Combos
--format json --output-file results.jsonfor CI artifacts--severity high --parallelfor fast red/green feedback--exclude node_modules dist --include "src/**/*.ts"targeted scans
Security Rules
Security rules target specific vulnerability patterns found in real-world applications. Rules are categorized by severity to help teams prioritize fixes. Understanding why patterns are dangerous and how to fix them reduces security debt and prevents future vulnerabilities.
Critical Severity
- • SQL Injection
- • Exposed Secrets
- • Hardcoded Credentials
- • AI Data Leakage
High Severity
- • XSS Detection
- • Directory Traversal
- • CSRF Protection
- • Broken Access Control
Scanning Engine
The scanning engine uses pattern matching and AST analysis to balance speed with accuracy. This approach minimizes false positives while maintaining fast scan times on large codebases. Understanding the engine's methods helps you interpret results and tune scans effectively.
Supported File Types
Plus C++, C#, PHP, Swift, Dart, Scala, and more...
- Pattern matching for fast, broad coverage
- AST hints to reduce common false positives
- Context-aware exclusions (tests, mocks, fixtures)
- Bias toward signal with actionable remediation
- Keep scans fast; fail quickly on high risk
- Make tuning easy per project via config
Output Formats
Choose the right output format for your workflow. Tables work well for local development, JSON for automation and CI/CD, SARIF for security platforms, and HTML for detailed reports. Each format serves different integration needs.
CLI Output
Human-readable output with color coding and severity indicators.
⚠️ 2 medium issues found
Security Score: 85/100
JSON Output
Machine-readable format for CI/CD integration and automation.
"issues": [...],
"summary": {...}
}
HTML Report
Detailed visual report with code snippets and remediation guidance.
<body>
Security Report
</body>
</html>
How to Consume
Configuration
Configuration files ensure consistent scan behavior across team members and environments. They reduce command-line complexity and adapt to project needs like monorepos, legacy code exclusions, and team risk tolerance. Environment variables provide flexibility for CI/CD deployments.
Also supported: .vibe-guard.json, vibe-guard.config.json. CLI flags override config.
Practical Configurations
"severity": "high",
"exclude": ["node_modules", "dist"],
"verbose": false
}
"severity": "medium",
"outputFormat": "json",
"rules": { "xss-detection": { "enabled": true } }
}
"include": ["packages/*/src/**/*.ts"],
"exclude": ["**/fixtures/**", "**/mocks/**"]
}
Environment Variables
Performance & Benchmarks
Performance optimization maintains developer productivity and enables practical CI/CD integration. Vibe-Guard prioritizes speed through parallel processing, intelligent file filtering, and optimized pattern matching. Understanding tuning options helps achieve optimal scan times while maintaining accuracy.
💡 Performance Tip
Use the --parallel flag to utilize all CPU cores for faster scanning on large codebases.
Tuning Recipes
- I/O bound:
--parallel --max-files 8to cap concurrency - CPU bound:
--parallel --max-files 2x coresfor throughput - Noise reduction: exclude generated/vendor dirs; include only source globs
Troubleshooting
Most problems stem from file system permissions, memory constraints, or overly broad scan patterns. This section provides systematic approaches to diagnosing issues, interpreting error messages, and optimizing scan parameters for reliable operation.
Scan is taking too long
Large codebases can take time to scan. Try these solutions:
- Use
--excludeto skip unnecessary directories - Enable parallel processing with
--parallel - Scan specific directories instead of entire codebase
Too many false positives
Adjust sensitivity and create custom rules:
- Increase minimum severity with
--severity high - Create custom rule exclusions in configuration
- Use
--ignore-patternsfor specific cases
Memory issues on large projects
Optimize memory usage:
- Use
--max-filesto limit concurrent file processing - Enable streaming mode with
--stream - Scan in smaller batches
--max-files to avoid I/O spikes--severity high and save full JSON to fileCI/CD Integration
CI/CD integration transforms security scanning from occasional audits into continuous protection. Successful integration requires balancing thoroughness with build performance and implementing appropriate gating strategies. This section covers platform-specific configurations and proven patterns.
Pipeline Integration Patterns
exit_code=$?
if [ $exit_code -eq 1 ]; then
echo "Security gate failed"
exit 1
fi
--output-file security.json \
|| true
# Always upload artifacts
Automation Tips
GitLab CI ✓ Tested
CircleCI (Untested)
⚠️ Note
This CircleCI configuration is a theoretical example and has not been tested. Vibe-Guard works as a standard CLI tool, but this specific integration pattern requires verification in your CircleCI environment.
Gating Strategies
- Fail builds only on
--severity highinitially; tighten later - Produce JSON artifacts for auditing even when passing
- Schedule full scans nightly using broader include patterns