███ █ █ ███ ████ ████
█ █ █ █ █ █ █ █ █
█ ██ █ █ █████ ████ █ █
█ █ █ █ █ █ █ █ █ █
███ ███ █ █ █ █ ████
⚠️ Work in progress — APIs and output formats may change.
A static analysis security tool for any codebase built in Rust. Guard uses AST traversal (via OXC) for JS/TS and tree-sitter for other languages to detect security vulnerabilities with higher accuracy than regex-based approaches. Results are viewable directly in the terminal or through a local Flutter dashboard.
- SQL Injection — detects raw SQL in template literals, string concatenations, and direct string args
- Eval & Dangerous Calls — flags
eval(),Function(), and similar dangerous call expressions - Hardcoded Secrets — catches API keys, tokens, and credentials embedded in source code
- AST-based — fewer false positives than regex scanners
- CI/CD friendly CLI with clean exit codes
- Local web dashboard for browsing findings
This example shows the JavaScript scan flow. Other languages follow the same high-level path with a language-specific parser and analyzer.
CLI scan path
└── parse code with language-specific parser (OXC for JS/TS, tree-sitter for Go, etc.)
└── build AST
└── query/traverse AST for security patterns
└── report() → push to findings Vec
└── store in AppState
└── serve via GET /api/results/{scan_id}
└── Flutter dashboard renders findings
localhost:3000/
├── /api/results/{scan_id} # JSON findings endpoint
├── /app # Flutter SPA (base-href: /app/)
└── / # redirects → /app
guard scan path/to/(file or any dir)This will:
- Start a local server on
http://localhost:3000 - Run the scan against the provided file
- Open the dashboard automatically at the results page
- Keep running until
Ctrl+C
Guard can export scan results in SARIF format, which is compatible with GitHub Code Scanning, VS Code SARIF Viewer, and other SARIF tools.
guard analyze path/to/(file or dir)guard scan path/to/(file or dir) --sarifThis will:
- Run the scan as usual
- Generate a SARIF report from the findings
- Save it to a file automatically
- Output file naming
If no output path is provided, Guard generates a default file like guard-20260615_142355-report.sarif
checkout examples to see the sample SARIF output.
Guard SARIF output is compatible with:
- GitHub Code Scanning
- VS Code SARIF Viewer
- Other SARIF-compliant tools
guard serve# build the rust CLI
cargo build --release
# build the flutter dashboard
cd dashboard
flutter build web --base-href /app/| Type | Example |
|---|---|
| SQL Injection | `SELECT * FROM ${table}` |
| Eval | eval(userInput) |
| Hardcoded Secret | const API_KEY = "sk-..." |
- Resolution of Symbol and Calls
- Call Graph (cross file referencing)
- Taint Analysis
- Python support
- Java support
- JavaScript support
- TypeScript support
- Go support
- SARIF output format (GitHub Code Scanning compatible)
- SymbolTable and CallTable extraction