lory review and lory fix provide deep static and dynamic security analysis of application source code using Lorikeet Security's real-time AI security analyst.
Analyze single files, folders, or entire repositories:
# Review current directory
lory review .
# Review specific directory or file
lory review src/auth/login.ts
# Review multiple targets
lory review cmd/ api/ pkg/| Flag | Description | Default |
|---|---|---|
--fix |
Automatically apply suggested code fixes to files | false |
--stream |
Stream findings in real-time as they are synthesized | true |
--min-severity |
Minimum severity threshold: critical, high, medium, low, info |
low |
--max-lines |
Maximum line count for a file before skipping | 1500 |
--format |
Output format: table or json |
table |
--base-url |
Lorikeet platform endpoint | https://lorikeetsecurity.com |
--token |
Lorikeet token override | Stored session |
When connected to the Lorikeet Security platform, lory review connects to:
POST /ptaas/ajax/lory-code-review.php
Accept: text/event-stream
- Code chunks are submitted with language and line context metadata.
- The server processes code through the Lory ReAct multi-agent security orchestrator.
- As vulnerabilities are synthesized, findings are pushed down the SSE connection as
data: {...}events. - The CLI TUI immediately renders each finding in real time with an animated spinner, preventing long wait times on large files.
{
"total_findings": 1,
"findings": [
{
"id": "LOR-0001",
"file_path": "src/db/users.py",
"line": 42,
"end_line": 42,
"severity": "critical",
"title": "SQL Injection in User Query Handler",
"detail": "Vulnerability sink detected: SQL Injection with unparameterized input.",
"confidence": "high",
"cwe": "CWE-89",
"fix": "query = \"SELECT * FROM users WHERE email = %s\"\ncursor.execute(query, (user_input,))",
"fix_note": "Use parameterized queries with prepared statements."
}
],
"results": [
{
"FilePath": "src/db/users.py",
"Language": "python",
"Lines": 55,
"Findings": [...]
}
]
}The lory fix command executes an AI code review and automatically applies verified remediation patches directly to the source files on disk:
# Automatically fix vulnerabilities across the project
lory fix .
# Fix a specific file
lory fix src/handlers/auth.golory fix is equivalent to running lory review --fix.
loryextracts the line range containing the vulnerability.- It verifies that the existing snippet matches the expected AST node.
- Performs atomic replacement of the vulnerable snippet with the synthesized patch.
- Preserves surrounding indentation, line breaks, and unrelated comments.
- Prints a unified diff summary of all applied modifications.
Evaluate only files and lines modified in your local working tree or between git commits:
# Review uncommitted working tree changes
lory diff
# Review staged changes
lory diff --cached
# Review changes against main branch
lory diff origin/main...HEADThis is ideal for pre-commit hooks, pull request validation, and rapid local iteration.
lory natively understands 25+ programming languages and frameworks:
- Web & Backend: Go, TypeScript, JavaScript, Python, Rust, Java, C#, PHP, Ruby, Kotlin, Swift
- Systems: C, C++, Zig
- Frontend Frameworks: React, Vue, Next.js, Svelte, Angular
- Infrastructure & Config: Terraform, Dockerfile, Kubernetes YAML, GitHub Actions YAML, CloudFormation, Helm
If a specific finding is an accepted risk or known false positive, you can suppress it directly in source code using comments:
# lory:ignore CWE-89 User input is sanitized by custom WAF middleware
query = f"SELECT * FROM logs WHERE tag = '{tag}'"// lory:suppress-start LOR-XSS-002 Internal admin dashboard with trusted HTML
element.innerHTML = sanitizedMarkup;
// lory:suppress-endCreate a .loryignore file in the root of your repository:
# Ignore generated code and vendor libraries
vendor/
node_modules/
dist/
*.min.js
# Ignore specific test suites
test/fixtures/vulnerable_samples/