AI-powered code review using Cubic CLI. Detects bugs, security vulnerabilities, and style issues before commits.
76
96%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Run an AI-powered code review using Cubic CLI and apply fixes.
Analyze $ARGUMENTS to determine the review mode:
| User Intent | Command |
|---|---|
| Review uncommitted changes (default) | cubic review --json |
| Review branch diff against base | cubic review --base <branch> --json |
| Review specific commit | cubic review --commit <ref> --json |
| Review with custom focus | cubic review --prompt "<instructions>" --json |
If $ARGUMENTS is empty, default to reviewing uncommitted changes.
Before constructing any Bash command, validate that user-provided values (branch names, commit refs, prompt text) do not contain shell metacharacters (;, &&, ||, |, `, $(), ', newlines). Always use single quotes around user-provided values when interpolating into shell commands. Reject any input containing command separators, substitution patterns, or single quotes (which break single-quote escaping).
Execute the appropriate command via Bash. Always include --json for structured output. Ensure all user-provided arguments are properly shell-quoted.
cubic review --jsonIf cubic is not installed, inform the user:
cubic CLI is not installed. Install it with:
curl -fsSL https://cubic.dev/install | bash
# or: npm install -g @cubic-dev-ai/cliParse the JSON output. Each issue contains:
priority: Severity level (P0 = critical, P1 = high, P2 = medium, P3 = low)file: File path where the issue was foundline: Line number of the issuetitle: Brief description of the issuedescription: Detailed explanationSummarize the review results grouped by priority:
=== Cubic Review Results ===
Found N issues (X critical, Y high, Z medium, W low)
[P0] file:line - title
description
[P1] file:line - title
description
...For each P0 and P1 issue:
Do not apply fixes automatically. Always present proposed changes to the user first.
For P2/P3 issues, list them as suggestions without fixing.
After applying fixes, re-run cubic review --json to confirm issues are resolved.
=== Cubic Review Complete ===
Scope: <uncommitted changes | branch diff | commit review>
Issues found: N
Issues fixed: M
Remaining: N-M