Windows orphan tools are signalled only when their creator PID and bounded creation time prove job ownership and a fresh identity check confirms the tool.
This plugin is a one-maintainer fork. Security reports are handled on a best-effort basis. There is no dedicated security team, no SLA, and no CVE assignment process beyond what GitHub provides.
Use GitHub private vulnerability reporting on SouthCarpet/antigravity-plugin.
Code scanning with CodeQL and Dependabot are the repository's automated checks, and Socket scores the published package.
Do not open a public issue with exploit details, payloads, or a proof-of-concept that would help someone else reproduce a local-file or credential leak.
If the private-reporting form is not available, open a public issue that says only that you need a private contact path (no technical details), or wait until reporting is enabled. Do not email unsolicited exploit files.
Please include:
- the plugin version (
npx @southcarpet/antigravity-plugin --version); - the host (Claude Code, Codex CLI, agy-native, or standalone);
- OS and Node version;
- what you expected vs what happened;
- a minimal reproduction that does not require publishing private repository contents.
Issues in this repository's shipped code that let a caller, a prompt, or a local process do something the plugin claims it will not do:
- bypass of the vision MCP path allowlist (reading a file that was not
named on that
visioninvocation, following a symlink/junction to a different file, or serving image bytes when no allowlist is present); setupoverwriting a foreignmcpServers.visionentry, deleting unrelated~/.geminisettings, or writing a permission other than the documentedmcp(vision/view_image)rule;- command injection or unexpected process spawn when resolving
agyor the bundled vision server; - leakage of Google OAuth tokens or other credentials that this plugin itself stores or prints (agy's own credential store is out of scope unless this plugin copies or logs it);
- a documented undo path (
setup --remove-vision) that leaves plugin-owned vision configuration in place while claiming success.
- Google Antigravity CLI (
agy), Gemini models, and Google's cloud processing of prompts, diffs, and images; - Claude Code, Codex CLI, and other hosts that load this plugin;
- issues that require an already-compromised machine, a malicious
agybinary onPATH, or a caller who already has write access to~/.gemini; - prompt injection that only changes model text, as long as the plugin still does not read extra files or escalate local permissions;
- denial of service against Google APIs, quota exhaustion, or token spend;
- the original upstream plugin, except code that this fork still ships.
Every process that the plugin starts goes through one module,
scripts/lib/process-adapter.mjs. A test (tests/spawn-inventory.test.mjs)
fails when another shipped file loads child_process. The one other file is
scripts/lib/host-bootstrap.cjs (see the node -e section below).
Successful setup without --skip-vision writes under ~/.gemini:
config/mcp_config.json— registersmcpServers.visionas this Node executable plus the bundledscripts/mcp/vision-server.mjs;antigravity-cli/settings.json— adds the exact allow rulemcp(vision/view_image);antigravity-plugin-vision.json— an ownership receipt used for undo;antigravity-plugin-vision.lock— a transient lock file.
That permission is user-wide. Any later agy --print session can
attempt the vision/view_image tool. The bundled server still denies
every path unless that process was given this invocation's allowlist
(see below). setup does not upload files. It does spawn agy so the user
can complete Google's OAuth in that CLI. This plugin does not write OAuth
tokens; whatever agy stores afterwards is agy's own behaviour.
Undo with setup --remove-vision. Removal is limited to plugin-owned
vision entries described in the
compatibility contract.
It does not revoke Google OAuth, delete job state, or touch unrelated MCP
servers.
doctor reads process.version, this package's own package.json, the
resolved agy binary's --version and --help output, the same two
~/.gemini config files setup's vision step writes (read-only, never
the OAuth token store), and the job-state root. It never runs OAuth, never
calls a model, never writes a file anywhere, and never opens the network.
tests/doctor.test.mjs proves this with a byte-for-byte snapshot of an
isolated HOME/USERPROFILE before and after a full run.
vision sets ANTIGRAVITY_VISION_ALLOWED_PATHS to a JSON array that holds,
for each image named on that command, its absolute path as given and its
realpath, then starts agy. The MCP server:
- grants no image access when that value is missing or invalid;
- decides authorization before any filesystem call: it refuses a request
unless the lexical form of the request (resolved, normalized, and on
Windows case-folded) is on the list. A UNC (
\\host\share\...), WebDAV (\\host@80\...), device (\\.\...) or extended-length (\\?\...) path that is not on the list is refused before it can touch the disk or the network. On Windows, this stops a path from the model from opening an SMB or WebDAV session that sends the user's NTLM credentials; - then requires the request's realpath to be on the list too. An ancestor
directory symlink (macOS's
os.tmpdir()resolves through/var->/private/var) is accepted when the resolved path is itself an authorized entry, never merely because it resolves to something; - refuses a spelling that is not on the list, even when it names the same
file. Example: a Windows 8.3 short name (
RUNNER~1) when the command named the long name. To prove that two spellings name one file, the server must read a directory, and it reads nothing before it authorizes a request; - rejects the requested file itself being a symlink, unconditionally, even when its target is also an authorized entry;
- accepts only
.png,.jpg,.jpeg,.webp,.gif, ≤ 10 MiB each.
Reading through a checked file handle closes stat-then-read substitution and bounds image allocation even if a file grows after the check. These checks are not a proof against every parent-directory race. Malformed MCP input receives a protocol error without killing the server (notifications remain unanswered); input frames are capped at 64 KiB and replies wait for stdout drain before the next request is processed.
Users should not set ANTIGRAVITY_VISION_ALLOWED_PATHS globally.
task --prompt-file <path> reads exactly the one file named on the command
line, resolved against the invocation's own working directory, and nothing
else: no directory listing, no glob, no following the file to a different
location after it is opened. Reading is capped at 512 KiB; an oversized,
missing/unreadable, or empty/whitespace-only source is refused before agy is
ever probed or spawned. --prompt-file - reads stdin to EOF instead, under
the same cap, and only from the standalone CLI run directly by a person or
script. A host wrapper (Claude Code, Codex CLI, the agy TUI) refuses it,
because that host already owns stdio for its own protocol.
Neither the file's path nor the prompt's content ever appears in a stderr
diagnostic or in the job's stored provenance: a refusal names the byte cap
and the actual size, or a fixed reason, never the path or the content that
triggered it.
result --export <path> and media --output <path> each write one new local file at a path the caller chooses, and never overwrite: the target must not exist (a file, a directory or a link, checked without following a link), its parent directory must exist, the file is created exclusively, and a partial file is removed after a failed write. The export holds the stored record in its safe, redacted shape; --output holds the answer text with OAuth URLs removed. A path with a control character or beyond the platform limit is refused, and a message shows the path on one line with control characters escaped. Nothing is sent anywhere.
An untracked file whose basename looks like a secret (.env and its
variants, .pem/.key/.p12/.pfx, or a default SSH private-key name) is
never read or sent; it is listed to agy only as skipped, with that reason.
Diffs, commit messages, and untracked file contents that are sent are wrapped
in a labeled data block that tells the model the content is untrusted
repository data, not instructions — this narrows, but does not eliminate,
prompt injection from repository content (see "Out of scope").
The optional --focus <text> is caller text only: it comes from the
invocation's own flag, never from the diff or any other repository content,
and the plugin never infers it. When given, it is
placed in its own "## Reviewer focus (caller instruction)" section, outside
every data block, so it is never mistaken for reviewed content and cannot be
used to smuggle instructions through the untrusted data blocks above.
review --preview shows exactly what a real run would send to agy: the same
included/skipped file lists, the same truncation state, and the SHA-256 hash
of the exact prompt string a real run would compute, all from the one
buildReviewInput selection function every path (--preview, foreground,
background) calls. It never calls agy itself. The hash lets a caller confirm,
after the fact, exactly which input a completed job actually sent, by
comparing the stored request.inputHash against a fresh --preview run on
the same tree. review --require-complete refuses to send an input that
left something out (a skipped file, a diff cut by the cap) instead of
sending it silently with a warning; the refusal happens before agy is ever
probed or spawned.
When a tool is auto-denied in headless mode (agy >= 1.1.20), the plugin only
reports it — on stderr, in --json, and in status/result — with a
remedy for the caller to apply on the next invocation. It never auto-grants
the denied action, never retries with --dangerously-skip-permissions, and
never writes a permission rule on the caller's behalf. Since agy 1.1.27 the
JSON denied_actions field is parsed as untrusted, agy-reported diagnostic
text: each action/display_name string is validated, length-capped, and
stripped of control characters before it is ever rendered or written to a
job record.
Since 2.0.0, the target agy named for the denial (model-chosen
tool-parameter text, equally untrusted) is validated, length-capped, and
control-character-stripped the same way before display. It is shown to the
caller for context only; the plugin never assembles it into a
permissions.allow rule and never writes a wildcard rule on the caller's
behalf. agy's own headless-denial sentinel also ends with its own bypass
suggestion ("... re-run with --dangerously-skip-permissions ..."); the
plugin no longer prints that sentence to its own stderr (the stored result
and result --json still keep the complete upstream line).
The plugin marks a run auth_required only from agy's own sign-in prompt:
the raw text lines agy prints before its first stream-json event
("Authentication required. Please visit the URL to log in", "Waiting for
authentication", or the Google OAuth URL itself). Text in a step_update
event, a tool argument or result.response can come from the model, so it
never sets auth_required.
The plugin shows no Google OAuth URL, not even one from agy's own prompt. A
URL is safe to show only when its client_id and redirect_uri are agy's
own, and no live agy capture in this repository records those values. One
helper replaces each URL of the form accounts.google.com/o/oauth2/... or
accounts.google.com/signin/oauth... (any scheme, with or without a query)
with [oauth-url-removed] before agy text leaves the plugin:
- the stderr text a failed run prints, which includes agy's own stderr and
its
result.errorline; - the progress text that
rescue,task,reviewandvisionstream to stderr; - the answer and the
rawOutputandstderrthat a job stores; - every
--jsonenvelope and text report on stdout, and the answer or reason that a background wait prints, so a job record that an older version stored with a URL is printed without it.
Other URLs and plain mentions of the host stay. The helper removes only
these two Google URL forms: a model can still write another link, for
example a shortened URL, into an answer. The plugin tells the user to run
setup instead, which shows agy's own prompt directly in the terminal, not
through the plugin. status --json reports oauthUrl as null, also for a
job record that an older version wrote.
Every print-mode agy invocation (review, rescue, task, vision)
forwards --disable-slash-commands. Without it, prompt text beginning with
/ — including untrusted diff, review, rescue, or task content this plugin
sends as plain prompt text, not as instructions — would be parsed and
executed as an agy slash command or skill instead. This closes that
expansion path for every prompt this plugin builds; it is not an OS sandbox
around what agy itself may do once a run starts.
The job state root, the per-workspace directory created under it, the
jobs directory beneath that, the cross-process lock directory, and the
update-check cache directory each refuse to use a directory that already
exists with a different owner, that is writable by the directory's group or
by anyone else, or that is a symlink. Every level is checked, not only the
leaf that a call happens to create. This matters only on a shared
multi-user Linux host, where another local user could otherwise pre-create
or replace one of these paths under the OS temp directory before this
plugin runs. Windows and macOS are unaffected: %TEMP%/$TMPDIR are
already per-user there.
The same check runs when the plugin reads, not only when it writes:
status,resultandcanceldo not readstate.jsonor a job file from a state root, workspace directory orjobsdirectory that fails the check. They stop with the same message a write gives (exit 1, astate_errorenvelope under--json), and they do not repair or rename anything in that directory.- An older workspace directory under the temp root that fails the check is skipped. The next candidate is used, else the current location.
- An update-check cache in a directory that fails the check counts as no
cache.
statusprints no update notice from it, andupdateasks the registry instead. - A
state.jsonentry that is not a valid job record (an id that is not 12 hex characters, an unknown status, or a process id that is not a positive integer) is ignored. statusreads a job log only from the plugin's own log path for that job, never from another path a job record names.cancel, and the cleanup a background wait runs when the worker has vanished, check the start time before they signal a recorded process. Right after it starts a worker or agy process, the plugin reads the start time of that process from the OS and stores it next to the process id in the job record (workerProcessStartedAt,agyProcessStartedAt). It writes this value once at launch. Before a signal, the plugin reads the start time again. The process must be running, and the two times must agree to within 1 second. A replacement process with a start time within 1 second of the recorded time passes this check and is not caught. A start time outside that window fails the check, also on a secondcancel. When the times differ by more than 1 second, the start time cannot be read, or the job record has no start time (a job that an older version started), the plugin does not signal the process.cancelreports it asunconfirmedand exits 1; the cleanup only writes a line to the job log. Stop such a process yourself. The time between the check and the signal is a separate limit: the process can end and its id can be given to another process.
On Windows the owner and mode check is a no-op, for reads and writes, so only the last three rules apply there.
Every commands/*.md wrapper's node -e "..." bang line (rescue too,
after 3.0.0) does four things, in this order: resolve the plugin root the
same way resolvePluginRoot does (CLAUDE_PLUGIN_ROOT when set and non-empty, else
the agy install copy under the home directory); read <root>/plugin.json
and refuse with one line — before requiring anything from that root — when
the manifest is missing or names a different plugin; check that the shipped
scripts/lib/host-bootstrap.cjs file exists and refuse with one line when it
does not; only then require() that module and call run(root, verb), which spawns scripts/commands/<verb>.mjs and passes its exit code
through. That module — a real, reviewable, tested file, not generated text —
carries its own copy of the same manifest check as a second layer, in case
it is ever reached by a caller other than this snippet. The root comes from
the environment at run time; no host input is interpolated into executed
source — the manifest field name and the verb are the only literals the
generated text carries, and both are constants this plugin controls.
A Claude Code wrapper's allowed-tools grants one Bash rule: a prefix rule
for the exact node -e "<bootstrap>" -- invocation of its own bang line.
Up to 3.0.0, every wrapper granted Bash(node:*). Claude Code
applies a command's allowed-tools to the host model's own Bash calls in
that turn, so text from a diff, a commit or an agy answer could make the
model run node -e <any code> with no permission prompt. Now any other
node call needs the user's approval as usual.
Claude Code splits an allowed-tools list at a space or comma that
follows a closing parenthesis. The rule therefore writes each space as a
tab (\t in the YAML string). Claude Code collapses spaces and tabs before
it compares a prefix rule with a command, so the rule still matches the
bang line. This was read from Claude Code 2.1.294; a later host can change
it, and tests/command-wrappers.test.mjs models it.
No wrapper tells the host model to compose its own node call: the
fallback text that described the runtime path and the "re-run" steps are
gone. The model tells the user which command to run next. Every wrapper is
disable-model-invocation: true, so the model cannot start one by itself;
rescue gained this and a fixed bang line after 3.0.0.
Every wrapper shows the runtime output inside a fenced block, under a one-line label that calls it untrusted data, not instructions. This is a label, not a sandbox: it narrows prompt injection from agy and repository text, but cannot prevent it.
On Windows, the update runner refuses a .cmd/.bat step before spawning
when its command path or any argument contains &, |, <, >, ^, %,
!, ", or a carriage return/newline.
For agy, update --apply installs only the tarball that registry.npmjs.org
publishes for the latest version:
- It reads that version's
dist.integrityfromhttps://registry.npmjs.org/@southcarpet%2Fantigravity-plugin/<version>, over the same HTTPS request path as the version check. npm packruns from the update's own temporary directory, with--registry=https://registry.npmjs.org/and--@southcarpet:registry=https://registry.npmjs.org/on its command line. Command-line flags override every.npmrc, so a project.npmrcin the directory where you run the command cannot send the download to another registry.- The integrity
npm packreports and the sha512 that the plugin computes from the tarball file must both equal the registry's value. After extraction,package/package.jsonmust name@southcarpet/antigravity-pluginand that version. - If the registry record cannot be read, a value is missing, or a check
fails, the command stops before
agy plugin uninstall. The installed copy stays as it was, and the exit code is 1.
These checks bind the tarball to the npm registry record. They do not check the npm provenance attestation (see Provenance).
This plugin does not talk to Google itself. Delegated verbs spawn agy and
pass it prompts, collected context, and (for vision) image bytes the local
MCP server read. What agy transmits, stores, or bills after that spawn is
agy's and Google's behaviour, not this plugin's.
| Verb | Passed to agy | Stays local to this plugin |
|---|---|---|
setup |
The OAuth probe process (browser / agy credential flow) | ~/.gemini vision config, ownership receipt |
review |
Git metadata, the review prompt, and the collected diff / untracked snippets | Plugin job state under the host data directory (or the temp fallback) |
rescue / task |
The user prompt; agy may also read workspace files with its own tools, including --add-dir extra roots |
Plugin job state |
vision |
The text prompt and the image bytes of allowlisted files (base64 MCP image content via agy) | The image files themselves; MCP reads them only for that invocation |
status / result / cancel |
Nothing via this plugin | Job JSON/logs; cancel only signals local processes |
doctor |
Nothing to agy beyond --version and --help (no prompt, no OAuth) |
Node version, agy version/flags, vision config presence, job-state root: all read-only, never written anywhere |
Assume anything you hand to review, rescue, task, or vision is
visible to agy. Secrets in a diff, an untracked file, a prompt, or a
screenshot are secrets you chose to give that process.
This plugin does not bill or estimate cost. Images are large. review,
rescue, task, and vision (on a successful run) and result (when usage
was stored) print usage: total=<N> in=<N> out=<N> on stderr from whatever
agy reported; this plugin does not estimate missing counts.
Not to be confused with the npm release provenance below: this is a
per-job record, provenance, stored on every job from creation
(scripts/lib/job-helpers.mjs#createTrackedJob).
Stored: the plugin's own running version, the agy --version string the
verb's own probe reported, the resolved --model/--effort values
(including the agy-default sentinel), the run mode (print, continue,
or conversation), the count of --add-dir values, and the ISO timestamp
the job was requested.
Excluded, always: the prompt text, the workspace path, image paths, the
content of extraArgs, and any tool list. status <id> and result <id>
render the stored record as a "## Provenance" section; a legacy job written
before this field existed renders and reports it as absent, never as an
error.
A background task or rescue started with --request-id <id> stores the
id and a fingerprint on the job request (request.requestId,
request.requestFingerprint), and the pair in state.json's requestIds
map. The fingerprint is a sha256 hash of the request, which includes the
prompt, the conversation id, the --add-dir paths, the model, the effort,
and the workspace root. The hash adds no new exposure: the prompt and those
fields are already stored in plain text on the same job record, in the same
private job state directory. The plugin compares fingerprints only to
decide whether a repeated id is the same request; it never retries a call
by itself.
From 1.1.0, .github/workflows/release.yml publishes releases through npm
trusted publishing. npm attaches a provenance attestation. It binds the
tarball to this public repository, the tagged commit, and the workflow run.
No npm token is stored. The job holds only id-token: write and
contents: read.
Verify a version with
npm view @southcarpet/antigravity-plugin@X.Y.Z dist.attestations and, in a
fresh install, npm audit signatures. The full steps, and how the signed
release tag ties in, are in docs/RELEASING.md.
A valid attestation identifies where a tarball came from. It does not review
the code. It does not cover agy or the hosts that load this plugin.
agy plugin install <path> copies whatever directory you point it at. A
plain clone also copies .git, .github, and tests/, none of which npm
ever publishes. scripts/pack-for-agy.mjs closes that gap: it uses the same
packing logic npm publish uses (npm pack), extracts the result, and
prints the integrity hash (sha512, the value npm itself verifies), the
shasum (sha1), and the exact agy plugin install <dir> command. The
installed copy is then the published artifact, not the whole working tree.
The script itself never runs agy and never writes under ~/.gemini; it
only reads the checkout and writes to a temporary directory.
Runtime stderr captured before the worker module loads uses the existing safe-reason and OAuth filters, plus bypass-flag redaction. Capture is limited to 64 KiB per worker in its job log. Both redactors also run after text normalization. Fatal recovery uses the same redaction. Model output keeps its existing job log handling.
- agy is a general tool-using agent.
rescueandtaskcan change the workspace if agy chooses to.reviewis prompted to be read-only; that is a prompt, not an OS sandbox. - The vision MCP allowlist is per Node process, not a global mandatory
access control system. A modified server binary, a replaced
mcpServers.visioncommand, or a hand-started server with a forged allowlist is outside this plugin's guarantee. - Job logs under the state root can contain model output and prompts. Protect that directory as you would other local project metadata.
- The host wrapper reads
<plugin root>/plugin.jsonand refuses to spawn anything unless that manifest names this plugin. An attacker who can set the host's environment already has code execution on that machine, so this check limits accidental misdirection, for example a stale or half-removed install copy inCLAUDE_PLUGIN_ROOT. It is not a defence against a hostile host.
review and result --check-current run git in the workspace with the repository's own configuration, so a configured external diff program or filter can run.