Antigravity CLI Migration: OWASP Scans and Auto-Fixes in the Terminal
Move a Gemini CLI security extension to Antigravity CLI, run local OWASP and dependency scans that support ISO 27001 controls, and let the agent patch an SQL injection.
This article is published in English.
Google has turned Gemini CLI into Antigravity CLI, part of the wider Antigravity 2.0 ecosystem. Anyone who spent the past year tuning a terminal around Gemini CLI extensions may reasonably ask whether custom workflows and automated security audits survive the change. They do, and the migration is short. The sections below cover why local OWASP scanning matters for compliance, how to carry a security extension across, and how the agent can fix findings without leaving the shell.
Why compliance cares about local scanning
Enterprise buyers, and the compliance officers inside them, tend to ask one question sooner or later: does the team follow secure coding standards? Usually that's a check against ISO/IEC 27001, the international standard for information security management. Three controls in the 2022 revision apply directly to development work:
- A.8.25, secure development life cycle: rules and guidelines that establish security across the whole software lifecycle.
- A.8.28, secure coding: principles that keep common software vulnerabilities out of the code.
- A.8.29, security testing in development: planning and carrying out security tests while building, including SAST and dependency analysis.
Meeting these without drowning in paperwork is easiest by tying coding rules to the OWASP Top 10, the widely recognized catalogue of web vulnerabilities. A team that can show it scans and fixes code against that list continuously gives an auditor a lot of comfort.
From Gemini CLI to Antigravity CLI
Until recently, Google's lightweight terminal assistant was the open-source Gemini CLI, which had an official Security Extension for running AI-based SAST audits. Under Gemini CLI, the install command was:
gemini extensions install https://github.com/gemini-cli-extensions/security
Antigravity 2.0 merges the visual tool and the CLI into one harness. The CLI offers multi-step reasoning, multi-file edits, sandboxed execution and tool calling straight from the shell, under the binary alias agy.
Existing Gemini extensions come across easily, thanks to a built-in one-shot importer:
agy plugin import gemini
The command reads the old ~/.gemini/ directory, picks up the security extension along with any other custom ones, repackages them in the new Plugins format under ~/.gemini/antigravity-cli/plugins/ and translates settings.json to the new schema. Original files stay untouched until confirmation, so the upgrade takes seconds and is easy to back out of.
A fresh Antigravity install can skip the import and install the plugin directly:
agy plugin install https://github.com/gemini-cli-extensions/security
Why not leave it all to CI?
A mature team usually already runs a heavy CI/CD pipeline with enterprise scanners:
- Static analysis (SAST): tools like SonarQube, Semgrep, or CodeQL under GitHub Advanced Security.
- Dependency scanning (SCA): Snyk and Mend are common picks.
- Dynamic testing (DAST): StackHawk, or OWASP ZAP for something free.
They make excellent production guardrails, with one big drawback: they're slow and they act late. Picture committing code, opening a PR and fetching coffee, then getting a failure fifteen minutes on because a scanner flagged an insecure CORS setting or a SQL injection. The developer switches context, pulls the branch, fixes it, pushes and waits again. Call it the Pipeline Wait of Shame.
It gets worse for personal projects, quick prototypes in Google AI Studio or legacy codebases with no pipeline at all. A security plugin that runs locally closes that gap, giving AI-driven scans before anyone types git push.
A worked example in C
Take a typical ASP.NET Core controller. In a hurry to ship, a developer writes this query in Controllers/UserController.cs:
[HttpGet("{id}")]
public async Task<IActionResult> GetUser(string id)
{
// [VULNERABILITY] Classic raw string concatenation SQL Injection!
string query = "SELECT * FROM Users WHERE Id = '" + id + "'";
using (var connection = new SqlConnection(_connectionString))
{
var command = new SqlCommand(query, connection);
connection.Open(); using (var reader = await command.ExecuteReaderAsync())
{
// Read user info and return...
}
}
}
It's a textbook OWASP A03:2021 Injection flaw, since user input is concatenated straight into the SQL string.
To catch it locally, move into the project directory and start the CLI:
agy
Inside the interactive session, a native Antigravity security plugin runs the full analysis with this command:
/security:analyze
A setup imported from Gemini CLI gets a namespace prefix instead, which prevents command collisions:
/gemini-cli-security:analyze
Both reach the same engine. The prefixed form simply keeps existing setups intact, including any hardcoded terminal scripts that call the old command. The plugin starts an AI-powered static scan and, within seconds, prints a formatted report:
[HIGH] SQL Injection Vulnerability Detected
File: Controllers/UserController.cs, Line 5
Severity: High (OWASP A03:2021-Injection)
Description: The query is constructed by concatenating untrusted user input directly. An attacker can manipulate the 'id' parameter to execute arbitrary SQL commands.
Checking dependencies
Third-party packages need scanning too, and the plugin ships a dedicated command for that. The native version looks like this:
/security:scan-deps
The imported version carries the prefix:
/gemini-cli-security:scan-deps
It parses .csproj or package.json and cross-checks the contents against OSV.dev, Google's open source vulnerability database. The result names the insecure packages with known CVEs and the version to upgrade to.
One difference from Gemini CLI is worth knowing. There, MCP-related skills appeared automatically as slash commands. Antigravity CLI doesn't do that, and they have to be formatted as commands explicitly. Because the OSV-Scanner MCP is installed with the security bundle, a conversational request works in the meantime, as the screenshot shows.
Letting the agent fix it
Traditional scanners are backseat drivers. They warn about a crash and never touch the wheel, then leave a report in an inbox and push the refactoring onto the developer.
Antigravity CLI is agentic. It can see workspace files, run commands in a secure container sandbox and reason through multi-step changes. After /security:analyze or /gemini-cli-security:analyze flags the injection, there's no need to hand-edit the ADO.NET query. A plain request is enough, such as asking the agent to remediate the SQL injection found in UserController.cs.
The agent reads the file, plans the fix and rewrites the code with a parameterized query:
[HttpGet("{id}")]
public async Task<IActionResult> GetUser(string id)
{
// [REMEDIATED] Secure parameterized query!
string query = "SELECT * FROM Users WHERE Id = @Id";
using (var connection = new SqlConnection(_connectionString))
{
var command = new SqlCommand(query, connection);
command.Parameters.AddWithValue("@Id", id);
connection.Open(); using (var reader = await command.ExecuteReaderAsync())
{
// Read user info and return...
}
}
}
Review-driven development is the default, so the agent doesn't blindly overwrite anything. It shows a diff in the terminal and asks for confirmation:
Antigravity Agent applied changes to Controllers/UserController.cs.
Do you want to accept these changes?
> Yes, apply changes.
No, undo changes.
Press Enter and the change lands, ready for audit with no context switch and no pipeline wait.
What changes for a team
Moving from Gemini CLI to Antigravity CLI turns a linter-style assistant into an autonomous security agent that lives in the terminal. Three practical gains follow:
- Continuous compliance. Local OWASP scanning supports the secure coding controls in standards such as ISO 27001 without slowing delivery.
- Painless migration. Legacy Gemini extensions become Antigravity plugins with
agy plugin import gemini. - Shifting left, agent style. Vulnerabilities aren't merely spotted locally. The agent can repair them on the spot.
The simplest way to judge it is to try it on a local project: import the old security extension, run an analysis and let the agent propose a fix.