Learn to catch bugs before they reach production with UBS.
What Is UBS?
UBS (Ultimate Bug Scanner) is your safety net before every commit. It scans your code for common bugs, security issues, and anti-patterns that might slip through during development.
Think of it as a code review bot that catches issues in seconds, not hours.
Security Scanning
XSS, injection, and OWASP vulnerabilities
Bug Detection
Null safety, async/await, type issues
Fast Feedback
Scan a file in under 1 second
Multi-Language
TypeScript, Python, Rust, Go, and more
The Golden Rule
Run ubs before every commit.
Exit 0 = safe to commit. Exit >0 = fix issues first.
Essential Commands
ubs file.ts runs in under 1 second, while ubs . may take 30+ seconds.Understanding Output
UBS output follows a consistent format:
β οΈ Null Safety (3 errors)src/api/users.ts:42:5 β Possible null dereferenceπ‘ Use optional chaining: user?.profilesrc/api/users.ts:87:12 β Unchecked array accessπ‘ Add bounds check before accessing array[i]β οΈ Security (1 error)src/api/auth.ts:23:8 β SQL injection riskπ‘ Use parameterized queries instead of string concatExit code: 1
file:line:colβExact location of the issueπ‘βSuggested fixExit code 0/1βPass (safe) / Fail (needs fixes)Bug Severity Guide
Critical
- Null safety violations
- XSS/Injection vulnerabilities
- Async/await issues
- Memory leaks
Always fix immediately
Important
- Type narrowing issues
- Division by zero risks
- Resource leaks
- Missing error handling
Fix before production
Contextual
- TODO/FIXME comments
- Console.log statements
- Unused variables
- Magic numbers
Use judgment
The Fix Workflow
Read finding
Understand the category and fix suggestion
Navigate to location
Go to file:line:col
Verify it's real
Not all findings are bugsβsome are false positives
Fix root cause
Don't just mask the symptom
Re-run UBS
Confirm the fix worked (exit 0)
Commit
Now you're safe to commit!
Pre-Commit Integration
For maximum safety, add UBS to your pre-commit workflow:
1# In your workflow:2$ git add .3$ ubs $(git diff --name-only --cached)4# If exit 0: proceed with commit5# If exit 1: fix issues first67$ git commit -m "feat: add user auth"
ubs automatically before committing. You get this protection by default!Try It Now
1# View session logs2$ ubs sessions --entries 134# Scan your project5$ ubs .67# Get help8$ ubs --help