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\ud83d\udca1→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
ubs src/utils/helpers.tsClean Code Scenario
A well-written file passes with zero findings
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