Guardrails for Google Antigravity, built from your own rules.
Your company's rules reach Antigravity right after each edit. What it must never do is blocked before it runs.
npx -y @cybedefend/vibedefend@latest install
Google Antigravity is writingbilling/refund.ts
export async function refund(req: Request) { const { id, amount } = await req.json(); const invoice = await db.invoices.find({ id, tenant: req.tenant, }); if (amount > 500) await approvals.second(invoice); return payments.refund(invoice, amount); }
Every query is scoped to the tenant.
rules/data-access.mdRefunds above €500 need a second approver.
Approved once by Sofia M.Checked before the commit: clean
Set up in four steps.
- Run one commandIn any terminal, on macOS, Linux or Windows. Node 18.17 or later.
- Choose your region, sign inEU or US. Your browser opens to sign in, no key to paste.
- Tick Google AntigravityThe installer finds the agents on your machine and ticks them for you.
- Code as usualOnce, in Antigravity: open Customizations, Installed, MCP Servers and click Authenticate next to
cybedefend.
What VibeDefend adds to Google Antigravity.
Rules served
After the editFor each edit, and each shell command that writes files, the rules reach Antigravity at its next model call: one step after the edit, before it goes on.
Google Antigravity is writingsrc/billing/cart-checkout.ts
const total = new Decimal128(cart.sum); const rows = await db.query( "SELECT * FROM carts WHERE id = $1", [id] );
Monetary amounts use Decimal128, never Number.
Mined from src/billing.ts:14Parameterise every query that mixes user input.
OWASP Top 10Served at the next step
Secret guard
Raw secret reads are refused; Google Antigravity gets the managed reference instead.
Google Antigravitywebhooks.ts
cat .env | grep STRIPEBlocked: raw secret read
Instead
process.env.STRIPE_WEBHOOK_SECRETnpm test -- webhooksTests pass
Logged for the team
Action guard
Destructive commands, schema drops and protected paths are stopped before they run.
Google Antigravity
rm -rf dist/Allowed: build output
rm -rf .cache/Allowed: cache
rm -rf ./storage/uploadsBlocked: protected path, user uploads
Logged for the team
Live findings
SAST, SCA, secrets, IaC and CI/CD findings, live in the session.
Google Antigravity
SAST
src/db/users.repo.ts:42SQL injection
SCA
package.jsonlodash 4.17.20, CVE-2021-23337
Secrets
config/prod.ymlAWS access key
IaC
infra/main.tfS3 bucket public-read
CI/CD
.github/workflows/deploy.ymlpull_request_target
In the agent's context, live
Your questions.
Does VibeDefend change my Google Antigravity configuration?
~/.gemini/config/hooks.json, ~/.gemini/config/mcp_config.json. Your own hooks stay: re-running the installer only replaces VibeDefend's entries.What leaves my machine?
Which version of Google Antigravity do I need?
Do I need to link each repository?
vibedefend link once. It writes .cybedefend/config.json with the project ID.How do I remove it?
vibedefend uninstall: it removes every file VibeDefend installed. If you installed the package globally, then run npm uninstall -g @cybedefend/vibedefend.Why does Antigravity answer Unauthorized after the install?
cybedefend; in the agy CLI, run /mcp, pick cybedefend, then Authenticate.Technical details for Antigravity
- MCP server
- Available
~/.gemini/config/mcp_config.json - Rules before each edit
- After the edit
PreToolUsePreInvocationFor each edit, and each shell command that writes files, the rules reach Antigravity at its next model call: one step after the edit, before it goes on. - Dangerous actions blocked
- Available
PreToolUseEvery tool call, in the app, the IDE and the agy CLI. agy --dangerously-skip-permissions runs no hook at all. - Rules loaded at start
- Available
SessionStart - End-of-session review
- Available
Stop - Review of long sessions
- Not availableNo equivalentAntigravity has no event before compaction.
- Reminder on every prompt
- Not availableNo equivalentNot available in Antigravity.
What it writes for Antigravity
~/.gemini/config/hooks.json~/.gemini/config/mcp_config.json
And the hook runner in ~/.cybedefend/. Your own hooks stay: re-running the installer only replaces VibeDefend's entries.
Sign in once in Antigravity: it does not open the CybeDefend sign-in itself. In the app, open Customizations, Installed, MCP Servers and click Authenticate next to cybedefend. In the CLI, run /mcp, pick cybedefend, then Authenticate. The app, the IDE and the CLI each keep their own sign-in.
One hooks file serves the app, the IDE and agy: ~/.gemini/config/hooks.json, global, never per project. On Windows, a home folder whose path contains a space is not supported yet: the installer says so rather than wire a hook that would never run.
Something off? vibedefend status gives a read-only report, and vibedefend doctor repairs what it can.