Skip to content

ci: sync the Antigravity reviewer with the hardened template - #56

Merged
doublegate merged 14 commits into
mainfrom
ci/agy-reviewer-sync
Nov 23, 2026
Merged

doublegate merged 14 commits into
mainfrom
ci/agy-reviewer-sync

Conversation

@doublegate

@doublegate doublegate commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Re-syncs the vendored Antigravity PR reviewer with the hardened antigravity-pr-review template (25701b0).

Why

The reviewer runs agy with --dangerously-skip-permissions on an untrusted diff. The old copy:

  • ran agy from the checkout, so a prompt injection could plant .git/hooks or .git/config that a later token-bearing git call would execute;
  • passed agy every job environment variable except GH_TOKEN and GITHUB_TOKEN.

agy's own --sandbox turns out not to confine reads: it read a canary file in $HOME.

Changes

  • Isolation: agy runs from a private, canonical sandbox under $RUNNER_TEMP. Its environment is allowlisted, and unbuffer is started inside that allowlist. Post-agy git ignores hooks.
  • Credential scan: the job fails closed, posting nothing, if agy's output contains a credential shape.
  • Verified live: /proc showed the sandbox as agy's working directory and only --add-dir, no NAME=VALUE in unbuffer's argv, and planted canaries absent from both processes.
  • Defaults: the base print timeout is 10m (backported from repositories that pinned 10-15m). The workflow skips with a warning, instead of failing, when the default branch has no reviewer.
  • Local customizations preserved: AGY_PRINT_TIMEOUT: 25m and AGY_PRINT_TIMEOUT_MAX_SECONDS: 1500, for large diffs.
  • Values raised so the self-test's invariants hold: AGY_LOCK_WAIT goes from 1800 to 3060 so it outlasts another review's 3015 s hold of the shared lock, and timeout-minutes from 90 to 110 so the 6075 s worst case fits the job.

Checks run

  • bash scripts/agy-review-selftest.sh: all checks passed
  • actionlint on the workflow
  • scripts/dev/gate.sh, run directly in this tree: exit 0, all steps passed, 5179 host tests passed
  • Pre-push gate skipped (RUN_TESTS_PREPUSH=0, the hook's documented switch for non-protected branches). Inside a git push from a linked worktree, gate.sh resolved its paths against scripts/dev and failed every path-dependent step, such as targets/x86_64-veridian.json not a valid file. Run directly in the same tree it passes. This PR changes no Rust.

Note: this PR's own review runs the scripts already on the default branch; the new copy takes effect after merge.

🤖 Generated with Claude Code


Note

Medium Risk
Changes tighten self-hosted PR review security (agy jail, egress, secrets) and shared lock/timeouts on a maintainer machine; workflow skip behavior and long job caps affect when reviews run and how queues behave.

Overview
Re-syncs the vendored Antigravity PR reviewer with the hardened antigravity-pr-review template: expanded .github/AGY-REVIEWER.md documents bubblewrap isolation, filtered HTTPS egress, credential redaction, sandboxed agy runs (no checkout --add-dir), and allowlisted environment variables.

The review workflow adds a “Check the reviewer is present” step that warns and skips when scripts/agy-review.sh is missing on the default branch, raises AGY_LOCK_WAIT to 3060s and timeout-minutes to 110 (while keeping local 25m print timeout and 1500s per-attempt cap), and updates checkout comments for the new security model.

scripts/_agy_comment_body.sh gains agy_body_dropped_count() so archived review comments preserve a cumulative “earlier rounds dropped” count across re-runs. scripts/agy-review-selftest.sh grows substantially with regression tests for jail/egress proxy behavior, credential scan/redaction, cleanup traps, lock-wait budgeting, and related invariants.

Separate CI tweaks: clippy passes build-std flags as a bash array, boot tests install qemu-system-riscv when the Ubuntu image splits it from misc, and the CI summary job feeds job results through env instead of interpolating ${{ }} into the shell script.

Reviewed by Cursor Bugbot for commit a8d9352. Bugbot is set up for automated code reviews on this repo. Configure here.

@doublegate

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e8487054-c2fa-4211-a00c-8c75bd51b910
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T20:49:28.890606Z b5c2e3d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 32847c8829

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Re-sync scripts/agy-review.sh, _agy_print.sh, _agy_comment_body.sh and
agy-review-selftest.sh byte for byte from the antigravity-pr-review
template at 1451f73, refresh .github/AGY-REVIEWER.md, and rebuild the
workflow from the template.

Security:
- agy runs in a bubblewrap jail (AGY_ISOLATION=bwrap): an empty private
  HOME (no MCP servers, skills, hooks, dotfiles or other repositories),
  read-only /usr and /etc, only the review sandbox writable, and a D-Bus
  that is an xdg-dbus-proxy allowing only agy's own Secret Service
  item. agy's --sandbox was verified NOT to confine reads.
- Allowlisted environment (env -i, unbuffer started inside it);
  canonical paths; post-agy git ignores hooks.
- agy output is scanned for anchored credential shapes before posting;
  on a match nothing is posted (fail closed).
- The workflow skips with a warning, not red, when the default branch
  has no reviewer.

Also carried: base print timeout 10m, AGY_ENV_PASSTHROUGH hardening,
dry-run leak fix, and every template fix since this copy was taken.
Squashed to one commit (an intermediate commit carried self-test
sample literals that secret scanners flag).

Verification: agy-review-selftest.sh all checks passed; actionlint
clean; gitleaks on scripts/ no leaks.

Local customizations preserved: AGY_PRINT_TIMEOUT 25m and
AGY_PRINT_TIMEOUT_MAX_SECONDS 1500 for large diffs. AGY_LOCK_WAIT is
raised 1800 -> 3060 and timeout-minutes 90 -> 110 so the lock wait
outlasts another review's 3015 s hold and the 6075 s worst case fits
the job, as the self-test requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doublegate

Copy link
Copy Markdown
Owner Author

Round 3: adjudication and the isolation rollout

The branch is squashed to one commit on template 1451f73.

  • BLOCKING (Antigravity, GH-ListRollup chore: v0.28 post-release cleanup of workflows and scripts #27): over-broad credential patterns. Fixed. Every pattern is anchored on a leading non-identifier boundary, so task-…, disk-…, risk-… and identifiers merely containing ghp_ or xoxb- no longer match. The self-test adds six such negatives alongside ten positives.

  • gitleaks red: fixed. The self-test had literal JWT and AWS samples. They are now assembled at runtime from split pieces, and the branch is squashed so no commit in its history carries them. gitleaks git over origin/main..HEAD finds no leaks.

  • New: agy runs in a bubblewrap jail (AGY_ISOLATION=bwrap). Tracing showed agy loads the host's MCP servers (REA, Blender), skills and hooks, and its own --sandbox does not confine reads. The jail gives it:

    • an empty private HOME;
    • read-only /usr and /etc;
    • only the review sandbox as writable space;
    • a D-Bus that is an xdg-dbus-proxy allowing only agy's own keyring item.

    Verified:

    • agy logs in and reviews inside the jail;
    • it cannot read ~/.config/gh or any repository, and has no MCP tools;
    • the gh token's keyring item, the bulk GetSecrets call and other session services are all AccessDenied;
    • an end-to-end jailed review of chore: v0.28 post-release cleanup of workflows and scripts #27 posted cleanly.

This PR's own review still runs the default branch's scripts; the jail applies after merge.

@doublegate

Copy link
Copy Markdown
Owner Author

@codex review

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer workflow, scripts, self-tests, and documentation with the hardened upstream template (adding a bubblewrap + xdg-dbus-proxy jail, a TLS-terminating HTTP/1.1 egress proxy, an allowlisted env -i environment, credential redaction, and cumulative dropped-round tracking) while hardening .github/workflows/ci.yml against script interpolation and Ubuntu 26.04's split qemu-system-riscv package.

Blocking issues

None found.

Suggestions

  • .github/AGY-REVIEWER.md (lines 349, 351) & .github/workflows/antigravity-review.yml (lines 71-75, 129, 148-151): The template re-sync overwrote the repository-specific workflow values documented in .github/AGY-REVIEWER.md (AGY_PRINT_TIMEOUT_MAX_SECONDS shows (workflow: 900) instead of 1500, AGY_LOCK_WAIT shows (workflow: 1860) instead of 3060, and the note explaining why this repo pins AGY_PRINT_TIMEOUT: "25m" was dropped). Similarly, the comments in .github/workflows/antigravity-review.yml right above timeout-minutes: 110, AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500", and AGY_LOCK_WAIT: "3060" still narrate the template's 900 s / 1860 s / 80 min numbers before the inline # local override comments contradict them. Updating those comments and table cells to match the local overrides would avoid confusion when tuning timeouts later.
  • scripts/agy-review.sh (line 1736): [ -x "$AGY_BIN" ] also succeeds if $AGY_BIN resolves to a directory (for example, if agy is not on PATH and a directory named agy exists in $PWD). Using [ -f "$AGY_BIN" ] && [ -x "$AGY_BIN" ] would match the error message ("is not an executable file").

Nitpicks

  • scripts/agy-review.sh (line 1607): here="$(cd "$(dirname "$0")" && pwd)" uses logical pwd, whereas agy_sandbox (line 1040) and agy_jail_home (line 1657) use pwd -P. Using pwd -P for here as well would ensure --ro-bind "$here/_agy_print.sh" is consistent with the comment above it about symlinked checkout paths.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Earlier review rounds (newest first)
Round reviewed at 2026-11-23 03:10 UTC

Antigravity review (Gemini via Ultra)

This PR synchronizes the Antigravity PR reviewer scripts, documentation, self-test suite, and CI workflows with the hardened upstream template (adding a bwrap sandbox, xdg-dbus-proxy keyring filtering, a TLS-intercepting egress proxy, credential redaction, an allowlisted execution environment, and CI job-summary env hardening).

Blocking issues

None found.

Suggestions

  • Stderr tail slicing can miss a multi-line private key (scripts/agy-review.sh:1495, scripts/agy-review.sh:1926-1933): tail -n "${AGY_LOG_TAIL_LINES:-60}" "$LOG" > "$log_tail" slices the last 60 lines of stderr before calling credential_kind_present "$log_tail", and agy_credential_patterns only matches -----BEGIN [A-Z ]*PRIVATE KEY-----. If a PEM private key dumped to stderr has its -----BEGIN line pushed past the 60-line window (a 4096-bit RSA key is ~52 lines before any trailing log output), $log_tail will contain raw base64 key lines and -----END ... PRIVATE KEY-----, pass credential_kind_present, and be printed to the public job log. Either match -----END [A-Z ]*PRIVATE KEY----- in agy_credential_patterns as well, or run credential_kind_present / agy_redact_credentials against $LOG before taking the tail.
  • Host paths under $HOME populate $agy_jail_home inside the jail (scripts/agy-review.sh:1726-1734): When the self-hosted runner is installed under ~/actions-runner/<name> as documented in .github/AGY-REVIEWER.md:103, both $here (the checkout's scripts/ directory) and $RUNNER_TEMP ($agy_sandbox) reside under $HOME. Because --ro-bind "$here/_agy_print.sh" "$here/_agy_print.sh" and --bind "$agy_sandbox" "$agy_sandbox" follow --bind "$agy_jail_home" "$HOME", bwrap creates the host's actions-runner/<name>/_work/... directory hierarchy inside $agy_jail_home to serve as mountpoints, so $HOME inside the jail is not empty and contains the workspace. Binding _agy_print.sh, $prompt_file, and $agy_sandbox at fixed paths outside $HOME (such as /run/agy/... or /tmp/...) inside the jail would keep $HOME genuinely empty and avoid leaking the host runner path layout.
  • Reset or read-only-mount jail state across retry attempts (scripts/agy-review.sh:1046-1047, scripts/agy-review.sh:1648, scripts/agy-review.sh:1726-1734, scripts/agy-review.sh:1752): $agy_jail_home and $agy_sandbox (including $agy_diff_file) are created once before the retry loop and mounted read-write into the jail. If a prompt-injected diff causes agy (running with --dangerously-skip-permissions) to modify $agy_diff_file or write files into $HOME on attempt 1 before timing out or failing, attempt 2 inherits the mutated diff and $HOME. Mount $agy_diff_file read-only (--ro-bind) and wipe $agy_jail_home at the start of each attempt.
  • Single-file bind of $AGY_BIN breaks symlinked runtime trees under $HOME (scripts/agy-review.sh:279, scripts/agy-review.sh:1730): The fallback AGY_BIN="$HOME/.local/bin/agy" coupled with --ro-bind "$(readlink -f "$AGY_BIN")" "$AGY_BIN" only mounts the single target file into the masked $HOME. If agy is installed via a user-local Node/fnm/npm tree under $HOME rather than /usr or a standalone binary, its sibling package files and runtime under $HOME will be hidden by --tmpfs /home.

Nitpicks

  • Stale template numbers in workflow comments and docs (.github/workflows/antigravity-review.yml:72-76, .github/workflows/antigravity-review.yml:122-128, .github/workflows/antigravity-review.yml:148-153, .github/AGY-REVIEWER.md:346-351): The prose comments in antigravity-review.yml and the table in AGY-REVIEWER.md describe the upstream template values (AGY_PRINT_TIMEOUT_MAX_SECONDS: 900, AGY_LOCK_WAIT: 1860, timeout-minutes: 80, unpinned 10m base timeout), while the workflow lines immediately below set local overrides (1500, 3060, 110, and a pinned AGY_PRINT_TIMEOUT: "25m").

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-23 01:17 UTC

Antigravity review (Gemini via Ultra)

Syncs the Antigravity PR reviewer workflow, scripts, and self-test suite with the hardened upstream template (adding a bubblewrap filesystem/D-Bus jail, a TLS-terminating HTTP/1.1 egress proxy, credential redaction, and cumulative dropped-round tracking) and hardens .github/workflows/ci.yml summary generation against script injection.

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh (lines 2174-2184 of patch, handle in agy_egress_proxy_src) and (agy_record_denied, lines 1290-1302 of patch): parts[1] from the outer CONNECT request line is written to deniedf before clean_head() runs, and split() only strips whitespace. A prompt-injected process inside the jail can send raw ANSI/OSC escape sequences (e.g. \x1b]52;...) as the CONNECT authority, which get recorded verbatim into ~/.gemini/antigravity-cli/agy-egress-denied.log that the log output instructs the operator to inspect. Restrict logged targets to safe printable characters (e.g. [A-Za-z0-9._:-]). Also consider mkdir -p -- "$(dirname -- "$dst")" in agy_record_denied in case a custom AGY_EGRESS_DENIED_LOG points into a directory that does not exist yet.
  • scripts/agy-review.sh (lines 1626-1629 of patch, cleanup): cleanup() sends SIGTERM to $agy_proxy_pid and $agy_egress_pid and immediately runs rm -rf -- "$agy_jail_rt" without waiting for those processes to exit. If egress.py flushes egress.log or egress-denied.txt while rm -rf is removing $agy_jail_rt, rmdir can race with the write. Add wait "$agy_proxy_pid" 2>/dev/null || true and wait "$agy_egress_pid" 2>/dev/null || true before removing the directory (as the self-test does at line 1115 of the patch).
  • scripts/agy-review.sh (lines 2360-2365 of patch, agy_jail): When the self-hosted runner lives under $HOME (e.g. ~/actions-runner/...), both the checkout ($(dirname "$0")) and $RUNNER_TEMP (~/actions-runner/.../_work/_temp) are subdirectories of $HOME. Mounting --bind "$agy_jail_home" "$HOME" followed by --ro-bind ".../_agy_print.sh" ".../_agy_print.sh" and --bind "$agy_sandbox" "$agy_sandbox" at their host paths recreates the host's actions-runner/<repo>/_work/... directory skeleton inside $HOME in the jail (and inside $agy_jail_home on the host). Binding _agy_print.sh, $prompt_file, and $agy_sandbox at fixed paths outside /home (such as under /run/ or /tmp/) keeps the jailed $HOME genuinely empty.

Nitpicks

  • .github/workflows/antigravity-review.yml (lines 474-492 of patch): The comment on AGY_PRINT_TIMEOUT: "25m" says "a pin disables diff-size scaling, so the per-attempt cap below only bounds it", and line 491 says "so with the 10m base 900 s here is reached from ~340 KB", followed by AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500". In scale_timeout_for_diff, an explicit AGY_PRINT_TIMEOUT returns early before checking AGY_PRINT_TIMEOUT_MAX_SECONDS, so the cap does not bound a pin at runtime (and the value set here is 1500, not 900).
  • .github/AGY-REVIEWER.md (lines 346-351 of patch): The configuration table lists (workflow: 900) for AGY_PRINT_TIMEOUT_MAX_SECONDS and (workflow: 1860) for AGY_LOCK_WAIT, whereas this repository's workflow overrides them to 1500 and 3060 (and pins AGY_PRINT_TIMEOUT to 25m).

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-23 00:57 UTC

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer workflow, scripts, self-tests, and documentation with the hardened upstream template (adding a bubblewrap + xdg-dbus-proxy jail, a TLS-intercepting egress proxy, credential redaction, an isolated working directory outside the repository checkout, and a CI summary/RISC-V QEMU package fix).

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh:2065 (deniedf.write in egress.py) / scripts/agy-review.sh:159 (agy_record_denied): parts[1] comes from head.split(b"\r\n", 1)[0].decode("latin-1", "replace").split(), which strips whitespace but preserves non-whitespace control characters (such as \x1b ANSI escape sequences, \x07, \x08, and C1 controls) from an untrusted CONNECT target inside the jail. Because operators are instructed to inspect ~/.gemini/antigravity-cli/agy-egress-denied.log on the host, sanitize non-printable characters (or replace characters outside [A-Za-z0-9._:\[\]-] with ?) before writing to deniedf.
  • scripts/agy-review.sh:1583-1639 vs. scripts/agy-review.sh:1688-1692: gdbus keyring item resolution, xdg-dbus-proxy, certificate generation, and the Python egress proxy are all started before acquiring flock -w "$AGY_LOCK_WAIT" 9. With AGY_LOCK_WAIT="3060", a queued job spawns both daemons and caches keyring object paths up to 51 minutes before agy runs. Consider moving the jail daemon startup after flock acquisition and explicitly closing fd 9 (9>&-) on the backgrounded xdg-dbus-proxy and python3 processes so they do not hold the lock open across exec 9>&-.
  • scripts/agy-review.sh:1661: --ro-bind "$(readlink -f "$AGY_BIN")" "$AGY_BIN" binds only the resolved target binary over $AGY_BIN inside the jail. If AGY_BIN is ever installed as a wrapper script or symlink into a multi-file directory under $HOME or /opt (outside /usr), sibling files relative to its real path will not be visible inside the jail.

Nitpicks

  • .github/workflows/antigravity-review.yml:72-76, 111, 115, 147-153: Several comments inherited from the template contradict the preserved local overrides on the adjacent lines:
    • Line 111 states that when AGY_PRINT_TIMEOUT is pinned, the per-attempt cap below only bounds it, whereas scale_timeout_for_diff (scripts/agy-review.sh:1149) returns early when AGY_PRINT_TIMEOUT_EXPLICIT is set without clamping to AGY_PRINT_TIMEOUT_MAX_SECONDS.
    • Line 115 refers to 900 s here directly above AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500".
    • Lines 72-74 and 147-150 describe the template's 1860 + 2 x 900 + 15 = 3675 s / 80-minute budget alongside the actual 110-minute / 3060s / 1500s settings.
  • .github/AGY-REVIEWER.md:346-351: The configuration table documents (workflow: 900) for AGY_PRINT_TIMEOUT_MAX_SECONDS and (workflow: 1860) for AGY_LOCK_WAIT (and drops the note that this repository pins AGY_PRINT_TIMEOUT: "25m"), which no longer matches .github/workflows/antigravity-review.yml.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-22 23:24 UTC

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer workflow, documentation, and scripts with the hardened template (adding a bubblewrap sandbox, D-Bus Secret Service filtering, a TLS-intercepting egress proxy, credential scanning/redaction, and expanded self-tests) alongside minor CI workflow cleanups.

Blocking issues

  1. Single-line or unclosed PEM BEGIN markers in review text wipe the remainder of the review to EOF (scripts/agy-review.sh, agy_redact_credentials around lines 224-236).
    agy_redact_credentials redacts private-key-block with a two-address sed range:

    sed -E "/${core}/,/-----END [A-Z ]*PRIVATE KEY-----/c\\[REDACTED: ${kind}]" "$f"

    This has two data-loss failure modes on legitimate reviews:

    • If the review quotes or discusses a bare -----BEGIN ... PRIVATE KEY----- header without a matching -----END ... PRIVATE KEY----- line later in the comment (for example, referencing line 193 of scripts/agy-review.sh in this PR), sed replaces every line from the match through EOF with [REDACTED: private-key-block], silently truncating the rest of the review.
    • If both BEGIN and END appear on the same line (e.g. an inline test fixture "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"), sed does not test the end address on the line where the start address matched, so it likewise deletes every subsequent line of the review to EOF.
      Handle same-line BEGIN.*END pairs and lone BEGIN lines without swallowing unrelated lines after them when no closing END marker exists.
  2. bwrap jail setup and background daemons run before AGY_DRY_RUN and before acquiring AGY_LOCK (scripts/agy-review.sh, lines 1387-1511).
    The if [ "$AGY_ISOLATION" = bwrap ]; then ... fi block is placed before the AGY_DRY_RUN exit path and before the flock wait on AGY_LOCK:

    • AGY_DRY_RUN=1 exists only to assemble the prompt/diff and exit, yet it now requires bwrap, xdg-dbus-proxy, gdbus, socat, openssl, a live desktop D-Bus session, and a logged-in keyring item, and spawns background xdg-dbus-proxy and egress.py processes before exiting.
    • In normal runs, gdbus keyring resolution, certificate generation, xdg-dbus-proxy, and egress.py all start before waiting up to AGY_LOCK_WAIT (51 minutes) for the host lock, and both daemons stay alive after the lock is released until script exit. Move the jail startup inside the locked section after the dry-run check.

Suggestions

  • Sanitize untrusted CONNECT targets before writing them to the host-private denied log (scripts/agy-review.sh, egress.py lines 1400-1410).
    In handle(), head has not passed through clean_head(). parts = head.split(b"\r\n", 1)[0].decode("latin-1", "replace").split() allows raw control bytes and ANSI escape sequences (such as \x1b]...) in parts[1], which deniedf.write(parts[1][:300] + "\n") and agy_record_denied persist into ~/.gemini/antigravity-cli/agy-egress-denied.log for the operator to inspect in a terminal. Strip or escape characters outside printable ASCII (or [A-Za-z0-9._:-]) before logging.
  • Mount jail inputs at fixed container paths instead of host paths under $HOME (scripts/agy-review.sh, lines 1497-1505).
    On self-hosted runners installed under ~/actions-runner/..., both the checkout (_agy_print.sh) and $RUNNER_TEMP ($agy_sandbox) reside under $HOME. Binding them at their host paths after --tmpfs /home --bind "$agy_jail_home" "$HOME" causes bwrap to recreate the ~/actions-runner/<runner>/_work/<repo>/... directory hierarchy inside $agy_jail_home, contradicting the documented empty HOME and exposing the host username, runner name, and checkout path inside the jail. In addition, _agy_print.sh and $prompt_file do not need to be bound into the jail at all on the unbuffer path where --print "$(cat "$prompt_file")" is expanded on the host.
  • Reset redacted_kinds per attempt and record all matched credential kinds (scripts/agy-review.sh, lines 201-208, 1715-1723).
    redacted_kinds is never cleared at the start of an attempt in the retry loop, so if attempt 1 redacts a string and then fails with a retryable error, attempt 2 inherits the redaction banner even if attempt 2 had no matches (or lists duplicate kinds). Also, credential_kind_present returns only the first matching kind, so if multiple credential types are redacted in one capture, the PR comment note only names the first.
  • Clean up sockd and px_pid in the selftest EXIT trap (scripts/agy-review-selftest.sh, lines 1038-1128).
    sockd is created outside $TMPD (${XDG_RUNTIME_DIR:-/tmp}/agyst.XXXXXX) and px_pid runs serve_forever() in the background. If any check inside that block fails early or the test is interrupted, both the process and socket directory are leaked.
  • Reconcile workflow comments and .github/AGY-REVIEWER.md with this repository's local overrides (.github/workflows/antigravity-review.yml, lines 72-76, 121-125, 149-154; .github/AGY-REVIEWER.md, lines 256-263, 342-347).
    • The comments in antigravity-review.yml state 1860 + 2 x 900 + 15 = 3675 s, under 80 minutes, 900 s here is reached from ~340 KB, and 1860 s outlasts... moved timeout-minutes to 80 immediately above timeout-minutes: 110, AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500", and AGY_LOCK_WAIT: "3060".
    • Line 119 of antigravity-review.yml comments that a pin disables diff-size scaling, so the per-attempt cap below only bounds it, which is false: scale_timeout_for_diff returns early when AGY_PRINT_TIMEOUT_EXPLICIT is set, so AGY_PRINT_TIMEOUT_MAX_SECONDS never bounds a pinned AGY_PRINT_TIMEOUT.
    • .github/AGY-REVIEWER.md overwrote the repo-specific table values (workflow: 900 and workflow: 1860 instead of 1500 and 3060, and dropped the note that this repo pins 25m) and describes bootstrap steps as shipped even though this repo's workflow omits them.

Nitpicks

  • scripts/agy-review.sh lines 1488-1489: duplicate consecutive # Inside the jail: bridge loopback 3128... comment line.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-22 22:37 UTC

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer workflow, scripts, selftests, and documentation with the hardened upstream template (adding bubblewrap filesystem/D-Bus isolation, a TLS-intercepting egress proxy, allowlisted environment passthrough, and credential redaction) alongside minor CI workflow cleanups for qemu-system-riscv installation and summary generation.

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh:217-218 — Single-line PEM markers cause sed to redact the rest of the review to EOF.
    In agy_redact_credentials, sed -E "/${core}/,/-----END [A-Z ]*PRIVATE KEY-----/c\\[REDACTED: ${kind}]" uses a two-regex address range. sed never tests the end regex on the same line that matched the start regex, so if a review quotes both markers on one line (for example, prose discussing PEM parsing or a single-line escaped fixture), the range stays open and replaces every remaining line of the review through EOF. Strip single-line -----BEGIN ... PRIVATE KEY-----.*-----END ... PRIVATE KEY----- matches first before running the multi-line range.

  • scripts/agy-review.sh:1693-1701, scripts/agy-review.sh:1805-1807 — redacted_kinds persists across failed retry attempts and only records the first matched pattern.

    1. redacted_kinds is appended inside the retry loop without being reset at the start of each attempt (for (( attempt=1; ... ))), so a redaction on a discarded attempt (e.g., one later rejected by service_error_present or agy_output_malformed) still attaches the redaction warning to a subsequent clean attempt, or duplicates the kind name across retries.
    2. credential_kind_present stops at the first matching pattern in agy_credential_patterns, while agy_redact_credentials scrubs all pattern kinds in one go. If two distinct credential shapes appear in the same output, only the first kind is recorded in redacted_kinds.
  • scripts/agy-review.sh:1630-1635 — Host paths under $HOME populate the jail's $HOME, and _agy_print.sh/$prompt_file are mounted even on the unbuffer path.
    bwrap mounts --tmpfs /home --bind "$agy_jail_home" "$HOME" and then bind-mounts _agy_print.sh, $prompt_file, and $agy_sandbox at their host paths. On self-hosted runners installed under $HOME (e.g., ~/actions-runner/...), those mounts recreate the runner directory hierarchy inside $agy_jail_home, leaving $HOME non-empty inside the jail and exposing the checkout path via mount points. In addition, _agy_print.sh and $prompt_file are only needed by the script(1) fallback (unbuffer reads $prompt_file on the host before invoking bwrap). Mounting jail-internal files at fixed paths under /run or /tmp keeps $HOME empty regardless of where the runner lives on disk.

  • scripts/agy-review.sh:1602-1605 vs. scripts/agy-review.sh:1647 — : > "$LOG" truncates the log after background daemons are already writing to it.
    egress.py is started in the background with 2>>"$LOG" before : > "$LOG" runs at line 1647, so any startup diagnostic emitted by the proxy during the socket readiness loop is wiped when $LOG is truncated. Move : > "$LOG" above the AGY_ISOLATION=bwrap setup block.

  • scripts/agy-review.sh:213-227, scripts/agy-review.sh:887, scripts/agy-review.sh:1690 — Suffix scratch files are not covered by cleanup().
    The selftest verifies mktemp-assigned variables are listed in cleanup(), but suffix files created from existing paths ("$1.redact" in agy_redact_credentials, "$1.utf8" in agy_scrub_utf8, "$out_file.clean", and "$dst.new" / "$dst.tmp" in agy_record_denied) are left behind if a command fails or a signal arrives mid-operation.

Nitpicks

  • .github/workflows/antigravity-review.yml:72-76, 121-125, 146-151 and .github/AGY-REVIEWER.md:345-347 — Template comments contradict the repository's pinned overrides.
    The synced comments in antigravity-review.yml describe the template's 900 s cap, 1860 s lock wait, and 80-minute job timeout, directly above the local overrides (AGY_PRINT_TIMEOUT: "25m", AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500", AGY_LOCK_WAIT: "3060", timeout-minutes: 110). .github/AGY-REVIEWER.md lines 345-347 also state (workflow: 900) and (workflow: 1860).
  • .github/workflows/ci.yml:596-600, 624-626 — Emoji characters in CI summary output.
    Project conventions prohibit emojis in code, comments, commits, or docs; while inherited from the prior ci.yml step, this hunk rewrites those lines and keeps ✅, ❌, and ⚠️.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-22 21:43 UTC

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer scripts, self-tests, workflow configuration, and documentation with the hardened template (adding bwrap filesystem/D-Bus isolation, an allowlisting TLS-intercepting egress proxy, an environment allowlist, credential output scanning, and cumulative dropped-round tracking) while hardening .github/workflows/ci.yml against shell interpolation and RISC-V QEMU package splits.

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh:1463-1505 and scripts/agy-review.sh:1544-1557: gdbus keyring resolution, xdg-dbus-proxy, per-run certificate generation, and egress.py all start before flock -w "$AGY_LOCK_WAIT" 9 (and egress.py redirects 2>>"$LOG" before line 1529 truncates : > "$LOG"). With AGY_LOCK_WAIT=3060, a queued job keeps two background proxy processes and its pre-resolved keyring item path alive for up to 51 minutes before acquiring the lock. Move the jail and proxy setup after flock acquisition (and after : > "$LOG").
  • scripts/agy-review.sh:1513: Inside the jail wrapper (_inner), if socat fails to bind 127.0.0.1:3128 (its stderr is redirected to /dev/null), the 100-iteration readiness loop finishes and unconditionally runs exec "$@", causing agy to run without a working proxy across every retry instead of tripping agy_jail_failed on the first attempt. Verify port 3128 is reachable after the loop and emit an agy-jail: error to stderr with exit 1 if not.
  • scripts/agy-review-selftest.sh:790-791 and scripts/agy-review-selftest.sh:851-901: sockd is created inside if command -v python3 >/dev/null 2>&1 && command -v curl >/dev/null 2>&1 (line 791), but referenced inside the separate if command -v python3 >/dev/null 2>&1 && command -v openssl >/dev/null 2>&1 block (line 861). On a host with python3 and openssl but without curl, sockd is unset under set -u. In addition, sockd, px_pid, and ip_pid are not cleaned up by the selftest's EXIT trap if a check aborts early.
  • .github/workflows/antigravity-review.yml:72-76, .github/workflows/antigravity-review.yml:128-135, and .github/workflows/antigravity-review.yml:148-153: Two comment discrepancies in the workflow:
    1. Line 128 states a pin disables diff-size scaling, so the per-attempt cap below only bounds it, but scale_timeout_for_diff (scripts/agy-review.sh:1114) returns early when AGY_PRINT_TIMEOUT_EXPLICIT is set and never clamps against AGY_PRINT_TIMEOUT_MAX_SECONDS (they only happen to match at 25m / 1500s).
    2. The surrounding template comments still quote the template's 900 s cap, 1860 s lock wait, and 80 minute timeout right above the local overrides (1500, 3060, 110), and .github/AGY-REVIEWER.md:324-326 lists (workflow: 900) and (workflow: 1860).

Nitpicks

  • scripts/agy-review.sh:1745: The pre-post credential check runs credential_kind_present "$out_file" right after $out_file was already scanned in the retry loop and copied into $body_file; scanning "$body_file" instead would match the oauth_url_present "$body_file" guard immediately below it.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-22 19:26 UTC

Antigravity review (Gemini via Ultra)

Syncs the Antigravity PR reviewer workflow, scripts, selftest, and documentation with the hardened template (adding bubblewrap/D-Bus isolation, an allowlisted environment, an isolated diff sandbox outside the checkout, output credential scanning, cumulative dropped-round tracking, and script(1) record stripping).

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh:454 (cleanup() can abort under set -e before removing jail directories and temporary git refs):
    [ -n "${agy_proxy_pid:-}" ] && kill "$agy_proxy_pid" 2>/dev/null has no || true. Under set -e, if xdg-dbus-proxy has already exited before the EXIT trap runs, kill (the final command of the && list) returns non-zero and aborts cleanup() immediately, skipping the cleanup of $agy_jail_home, $agy_jail_rt, and refs/agy/* on lines 455-462. Append || true as done for the git update-ref calls below it.
  • scripts/agy-review.sh:1142-1190 (jail and xdg-dbus-proxy initialize before AGY_DRY_RUN, before flock, and outside the retry loop):
    1. AGY_DRY_RUN=1 is evaluated after this block, so a dry run now requires bwrap, xdg-dbus-proxy, gdbus, a live D-Bus user session, and a populated keyring item, and spawns xdg-dbus-proxy only to exit immediately.
    2. The proxy is started and the keyring item path is queried before acquiring AGY_LOCK, so a job queued behind another review can hold an idle proxy process (and cached keyring item path) for up to AGY_LOCK_WAIT (3060 s).
    3. agy_jail_home (scripts/agy-review.sh:1168) is created once and mounted read-write across all AGY_RETRIES attempts, so a failed or timed-out attempt 1 leaves partial state in $HOME for attempt 2 rather than starting with a fresh empty HOME.
  • .github/AGY-REVIEWER.md:285-286 (documentation contradicts the implementation and selftest):
    The doc states that `unbuffer` keeps its own environment and runs `env -i ... agy`, so only agy is reduced, whereas scripts/agy-review.sh:1235-1238 intentionally runs "${agy_env[@]}" unbuffer ... (env -i before unbuffer to avoid exposing NAME=VALUE pairs in /proc/<pid>/cmdline), and scripts/agy-review-selftest.sh:765-766 asserts that env -i precedes unbuffer/script.

Nitpicks

  • .github/workflows/antigravity-review.yml:72-76, 133, 148-153 and .github/AGY-REVIEWER.md:304-306: The block comments in the workflow and the "(workflow: ...)" defaults in .github/AGY-REVIEWER.md quote the upstream template's 900 s / 1860 s / 80 min numbers rather than this repository's local overrides (1500 s / 3060 s / 110 min) set on the lines immediately following.
  • scripts/agy-review.sh:1182: $(cd "$(dirname "$0")" && pwd) is evaluated twice and omits -P (unlike pwd -P on lines 926 and 1169); if the checkout path traverses a symlink whose target parent is not mounted inside bwrap, logical and physical paths can diverge.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-22 19:16 UTC

Antigravity review (Gemini via Ultra)

Synchronizes the self-hosted Antigravity PR review workflow, helper scripts, selftest suite, and documentation with the hardened template (sandboxed execution outside the checkout, allowlisted environment, output credential scanning, cumulative dropped-round tracking, script(1) record stripping, and numeric environment normalization).

Blocking issues

None found.

Suggestions

  • .github/AGY-REVIEWER.md:271-272 contradicts the implementation and selftest on env -i ordering: The documentation states that `unbuffer` keeps its own environment and runs `env -i ... agy`, so only agy is reduced, whereas scripts/agy-review.sh:1163-1166 and scripts/agy-review-selftest.sh:765-766 intentionally run env -i before unbuffer (and script) so the allowlisted NAME=VALUE entries are not exposed in unbuffer's /proc/<pid>/cmdline. Update .github/AGY-REVIEWER.md:271-272 to match the actual invocation order.
  • scripts/agy-review.sh:1304 runs credential_kind_present after agy_cap_round truncates $out_file: Because agy_cap_round "$out_file" "$round_budget" truncates $out_file in place before credential_kind_present "$out_file" runs, a token or key split near the byte cap can be shortened below the regex length threshold (e.g., {30,} or {40,}) and still leak a partial credential prefix (or a JWT header and payload without its signature) into the posted comment. Run credential_kind_present "$out_file" before agy_cap_round (or inside the retry loop immediately after capturing $out_file).
  • .github/AGY-REVIEWER.md:288-292 and .github/workflows/antigravity-review.yml:72-76,130-134,148-153 have stale template numbers in comments next to local overrides:
    • .github/AGY-REVIEWER.md:288-292 lists workflow: 900 for AGY_PRINT_TIMEOUT_MAX_SECONDS and workflow: 1860 for AGY_LOCK_WAIT (and drops the note that this repository pins AGY_PRINT_TIMEOUT to 25m), while .github/workflows/antigravity-review.yml sets 1500 and 3060.
    • .github/workflows/antigravity-review.yml:72-76 and 148-153 still explain the 1860 + 2 x 900 + 15 = 3675 s / 80-minute calculation in the prose comments directly above the timeout-minutes: 110, AGY_PRINT_TIMEOUT_MAX_SECONDS: "1500", and AGY_LOCK_WAIT: "3060" local overrides.

Nitpicks

  • scripts/agy-review.sh:163-175: credential_kind_present uses IFS='|' read -r kind re while the aws-access-key-id regex ((AKIA|ASIA)[0-9A-Z]{16}) contains |. That works only because read assigns the unsplit remainder of the line to the last variable (re) and the pattern has no leading or trailing |; a delimiter that does not appear in ERE syntax (such as a tab) would be less fragile.
  • scripts/agy-review.sh:1107,1177: agy_allowlisted_env_args passes the runner's SHELL into the script -qfec "$cmd" fallback, where $cmd is formatted with Bash's printf '%q'. script(1) executes $SHELL -c "$cmd", so on a host where the runner user's login SHELL is non-POSIX (e.g. fish), any argument causing printf '%q' to emit Bash-specific quoting ($'...') would fail under the script(1) fallback path.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: ac891fc1ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

doublegate and others added 2 commits November 22, 2026 15:44
Re-syncs the vendored Antigravity reviewer scripts and
.github/AGY-REVIEWER.md byte for byte from the antigravity-pr-review
template at fd64ab3. Local workflow overrides are unchanged.

New: the jail has no network of its own (AGY_EGRESS=filtered)
- agy must be able to read its own Google login token, so the network
  was the remaining way to leak it. The jail now has only its own
  loopback. Its single route out is an allowlisting HTTPS CONNECT
  proxy outside the jail, reached through a bind-mounted Unix socket.
- Exact host names only. `.googleapis.com` would include Cloud
  Storage, where anyone can own a writable bucket.
- www.googleapis.com also serves the Cloud Storage API. That host is
  TLS-intercepted with a per-run CA whose key never enters the jail,
  and only a body-less GET /oauth2/v2/userinfo is forwarded, rebuilt
  by the proxy with its own Host header. Forwarding the client's Host
  would allow fronting to any Google service.
- Verified from inside the jail. Refused: Cloud Storage upload and
  read (including path-traversal, encoded, HTTP/2, Host-fronting and
  smuggling variants), other hosts and ports, direct connections, raw
  TCP and DNS. A full review completes.
- The job log prints egress verdict counts only. Denied host names go
  to a mode-600 log on the runner host, for diagnosing an agy update
  that needs a new host.

Fixes from review round 4 on these re-sync PRs:
- A jail that fails to start is no longer accepted as review output
  (Codex).
- cleanup survives an already-exited proxy under set -e (Cursor).
- Each capture is credential-scanned before any handler logs it
  (CodeRabbit). The public stderr tail is withheld if it carries a
  credential shape (Cursor).
- An empty AGY_KEYRING_ATTRS (SearchItems {} matches every item) is
  refused (Cursor).
- TMPDIR=/tmp inside the jail (Cursor). Top-level lib/bin links
  mirror the host layout, for Debian and Ubuntu (Codex).

Verification: agy-review-selftest.sh all checks passed (now including
offline TLS tests of the egress proxy); actionlint clean; gitleaks no
leaks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Boot (riscv64), (riscv64, smp) and (riscv64, release) fail one second
in with 'qemu-system-riscv64: command not found' (from the uploaded
boot log). The ubuntu-26.04 runner image (20261116) ships QEMU 10.2,
which moved qemu-system-riscv64 out of qemu-system-misc into its own
package. main's last green run predates that image, so main is red on
its next run too. The step now installs qemu-system-riscv when the
image offers it (older images keep the binary in -misc), and the
riscv64 matrix fails fast with a clear error if the binary is still
missing.

All 21 actionlint findings in ci.yml are cleared:
- Bare-metal clippy: the -Zbuild-std flags are a quoted bash array
  instead of a deliberately unquoted string (SC2086).
- CI Summary step (19 SC2086 + 1 SC2129): every needs.*.result and
  github.* value now arrives through env: rather than being
  interpolated into the script, the summary is written in one
  redirected block to a quoted "$GITHUB_STEP_SUMMARY", and a small
  status() helper replaces the repeated if/else.
  github.ref_name in particular was interpolated directly, and a
  branch name can contain shell syntax.

Verification: actionlint reports 0 findings in every workflow. The
rewritten summary step was dry-run with sample results: identical
summary text, exit 1 when boot tests fail, exit 0 when only the
non-blocking coverage upload fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doublegate

Copy link
Copy Markdown
Owner Author

Red checks: cause and fix (b5c2e3d)

  • Boot (riscv64), (riscv64, smp), (riscv64, release): the uploaded boot log reads qemu-system-riscv64: command not found. The ubuntu-26.04 image (20261116) ships QEMU 10.2, which moved that binary out of qemu-system-misc into its own qemu-system-riscv package. main's last green run (fc7e5ce, 2026-11-16) predates that image, so main would go red on its next run as well. The install step now adds qemu-system-riscv when the image offers it, and the riscv64 matrix fails fast with a clear error if the binary is still missing.
  • All 21 actionlint findings in ci.yml are cleared. In the CI Summary step, every needs.*/github.* value now arrives through env: rather than being interpolated into the script; github.ref_name was interpolated directly. The summary is written in one redirected block to a quoted "$GITHUB_STEP_SUMMARY", and the bare-metal clippy flags are a quoted array. A dry run produced identical summary text and exit codes.

@doublegate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: b5c2e3d182

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b5c2e3d. Configure here.

Comment thread scripts/agy-review-selftest.sh Resolved
The vendored reviewer README now passes markdownlint defaults
(0 errors, down from 77: MD013 line-length and MD060 table style).
Prose is rewrapped to 80 columns, long code lines are rewritten, table
delimiters use the compact style, and tables are fenced against MD013.
It also corrects the security-model note on unbuffer: env -i now
starts unbuffer itself.

Also re-syncs the self-test labels to en-US spelling (template
fd64ab3). Documentation and labels only; no behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

This PR syncs the Antigravity PR reviewer workflow, scripts, and self-tests with the hardened template (adding a bwrap sandbox jail, filtered D-Bus and HTTPS CONNECT egress proxies, environment allowlisting, output credential scanning, and cumulative dropped-round tracking) while hardening ci.yml against shell word-splitting, Ubuntu 26.04's split qemu-system-riscv package, and inline GitHub context interpolation.

Blocking issues

None found.

Suggestions

  • scripts/agy-review.sh:1501 (in-jail socat wrapper in _inner):

    _inner=( /usr/bin/bash -c 'socat TCP-LISTEN:3128,bind=127.0.0.1,fork,reuseaddr UNIX-CONNECT:/run/agy-egress.sock 2>/dev/null & for _ in $(seq 1 100); do (exec 3<>/dev/tcp/127.0.0.1/3128) 2>/dev/null && break; sleep 0.1; done; exec "$@"' agy-jail )

    Two failure modes here defeat agy_jail_failed:

    1. socat ... 2>/dev/null & redirects the background subshell's stderr before PATH lookup, which swallows agy-jail: line 1: socat: command not found (the diagnostic tested in scripts/agy-review-selftest.sh:857) as well as bind errors.
    2. If socat exits or port 3128 never becomes ready across the 100 probes, the loop falls through to exec "$@" instead of emitting an agy-jail: ... error and exiting non-zero, so agy runs without a working proxy and burns all retry attempts.
  • scripts/agy-review.sh:1453-1493 vs. scripts/agy-review.sh:1549 (proxy startup before flock):
    xdg-dbus-proxy, per-run X.509 certificate generation, and egress.py start before flock -w "$AGY_LOCK_WAIT" 9. When a job waits behind another review for up to AGY_LOCK_WAIT (3060 seconds in .github/workflows/antigravity-review.yml:153), those background daemons and their $XDG_RUNTIME_DIR/agy-jail.XXXXXX sockets sit live on the host for up to 51 minutes before agy starts. Acquiring flock before spinning up the jail daemons avoids idle D-Bus proxy connections while queued.

  • scripts/agy-review.sh:1474-1490 (AGY_EGRESS_INTERCEPT_HOST validation):
    The embedded egress.py supports an empty icpt_host (scripts/agy-review.sh:1216-1222), and AGY_EGRESS_ALLOW entries are validated against the lowercase hostname regex (scripts/agy-review.sh:1462), but AGY_EGRESS_INTERCEPT_HOST is interpolated directly into openssl req -subj "/CN=$AGY_EGRESS_INTERCEPT_HOST" and the SAN extfile without validation or an empty-value check. Validating AGY_EGRESS_INTERCEPT_HOST (or skipping certificate generation when it is empty) would avoid an opaque certificate-generation failure on misconfiguration.

Nitpicks

  • .github/workflows/antigravity-review.yml:125-129: The comment says so with the 10m base 900 s here is reached from ~340 KB, referring to the template default 900, whereas line 129 overrides AGY_PRINT_TIMEOUT_MAX_SECONDS to "1500" (and line 121 pins AGY_PRINT_TIMEOUT: "25m", disabling scaling).

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Re-syncs the vendored reviewer scripts and .github/AGY-REVIEWER.md
byte for byte from the antigravity-pr-review template at 1d782bb.
Local workflow overrides are unchanged.

- Fronting fix (HIGH from this PR's review, reproduced live): only
  www.googleapis.com was intercepted, and Google's front end routes by
  Host on any googleapis connection, so a request to oauth2, aicode or
  daily-cloudcode-pa carrying `Host: storage.googleapis.com` reached
  Cloud Storage. Every allowed host is now TLS-intercepted. Each
  connection carries one HTTP/1.1 request, validated strictly and
  rebuilt with the proxy's own Host and a body forwarded exactly once.
  Fronting through all four hosts is verified blocked from inside the
  jail, and a full review completes.
- AGY_EGRESS_PATH_RULES (host=/exact/path, literal) replaces
  AGY_EGRESS_INTERCEPT_HOST/_PATH.
- Credential-shaped output is redacted to `[REDACTED: <kind>]` with a
  note in the comment, instead of failing the review. The scan cannot
  tell a secret from a test fixture. Anything redaction misses still
  fails closed.
- Python >= 3.11 is checked. The jail refuses to launch agy when its
  egress bridge is down. The denied-host log keeps the newest 500
  records, and streams are closed on every error path.
- Self-test: the TLS cases no longer depend on curl, and a certificate
  failure is a FAIL. There are 20 offline proxy cases and full
  redaction coverage.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean; markdownlint clean on AGY-REVIEWER.md; gitleaks no leaks in
scripts/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: ebdb1b3e-19c1-4c75-a655-de2549329843)

Two follow-ups from the automated security review of 1d782bb:
- Chunk trailers are read (bounded) and discarded; only the terminating
  CRLF goes upstream, so no header can be added after validation.
- Credential redaction runs in memory instead of through a predictable
  "$f.redact" sibling file in a possibly shared TMPDIR.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean. Live: a jailed review through the proxy posted (26 rebuilt
requests), leaving nothing behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 24aa8746-1674-47c4-8ec1-76c1460c980b)

Re-syncs the vendored reviewer scripts and .github/AGY-REVIEWER.md
byte for byte from the antigravity-pr-review template at accfc51.
Local workflow overrides are unchanged. From CodeRabbit's review of
CyberChef-MCP #184:

- A backend error is classified on agy's raw capture, before
  redaction. A redaction marker is longer than the key it replaces, so
  a near-limit error could outgrow the size guard and be posted.
- A private key whose BEGIN and END share one line no longer deletes
  the rest of the review.
- The egress proxy drops fields named in Connection (RFC 9110) and
  answers Expect with 417 instead of stalling.
- Self-test: the path-rule fixture contains a `.`, so literal and
  regex matching are told apart, and the denial count is exact.

Verification: agy-review-selftest.sh all checks passed (each new check
fails against f29c2ab); actionlint clean; markdownlint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: b850af45-31c8-4245-a2b8-1247c34b16b7)

Re-syncs the vendored reviewer scripts and .github/AGY-REVIEWER.md
byte for byte from the antigravity-pr-review template at 499bb51.
Local workflow overrides are unchanged. From CodeRabbit's review of
CyberChef-MCP #184:

- A backend error is classified on agy's raw capture, before
  redaction. A redaction marker is longer than the key it replaces, so
  a near-limit error could outgrow the size guard and be posted.
- Private-key redaction uses awk: a one-line block is replaced in
  place, and a block with no END line ends in a visible marker saying
  the rest of the review was removed, instead of a silent truncation.
- The egress proxy drops fields named in Connection (RFC 9110) and
  answers Expect with 417 instead of stalling.
- Self-test: the path-rule fixture contains a `.`, so literal and
  regex matching are told apart, and the denial count is exact.

Verification: agy-review-selftest.sh all checks passed (each new check
fails against f29c2ab); actionlint clean; markdownlint clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 1bc4165f-f742-49d2-a3f7-0ecb58ec415a)

doublegate and others added 3 commits November 22, 2026 20:56
Re-syncs scripts/agy-review-selftest.sh byte for byte from the
antigravity-pr-review template at 8782d07. No other reviewer file
changed; local workflow overrides are unchanged.

- The chunked-trailer checks counted source text, so removing the
  terminating CRLF or forwarding a trailer through another write call
  left them green (CodeRabbit on CyberChef-MCP #184). They now run the
  real copy_chunked on an asyncio stream with a recording writer: a
  trailer is dropped, exactly `0\r\n\r\n` goes upstream, and the bytes
  of a following request stay unread. Both mutations turn them red.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An explicit AGY_PRINT_TIMEOUT is used as given; the per-attempt cap applies only
to a diff-scaled value, so the comment's claim that the cap bounds the pin was
wrong.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-syncs the vendored reviewer scripts byte for byte from the
antigravity-pr-review template at 2a366ac (round 10 of the agy and
CodeRabbit findings). Local workflow overrides are unchanged.

- A second private key opened on the first key's END line was dropped
  from redaction; each line is now scanned left to right.
- OpenAI sk-proj-/sk-svcacct- keys (base64url) are recognized.
- The redaction note names every kind and is reset per attempt; the
  last guard scans the assembled comment body.
- The egress proxy forwards Content-Length: 0 (Google answers an empty
  POST without it with 411).
- Control bytes are stripped from the denied-host log; the agy lock is
  taken before the jail starts; cleanup reaps both proxies.
- Self-test: two pipefail races (one made it flake) are removed, and
  the TLS cases are skipped by name on python < 3.11.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean; a live jailed review from the same scripts completed and
cleaned up after itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-syncs the vendored reviewer scripts byte for byte from the
antigravity-pr-review template at b940416 (round 11). Local workflow
overrides are unchanged.

- The archived earlier rounds are now redacted, and the assembled
  comment body is scanned after they are appended. 2a366ac's guard ran
  before the append and so never saw the archive.
- Egress proxy: the CONNECT host is matched case-insensitively, bytes
  pipelined behind a CONNECT are refused, and a duplicate path rule for
  one host is refused.
- Both proxies stop once agy finishes; a dead proxy ends the startup
  wait at once; a missing AGY_BIN is refused before the jail is built.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean; a live jailed review from the same scripts completed and
cleaned up after itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: b1bb21e5-eebf-4a31-a7e3-fa50898f8304)

doublegate and others added 2 commits November 22, 2026 22:43
Re-syncs the vendored reviewer scripts byte for byte from the
antigravity-pr-review template at a7d5273 (round 12). Local workflow
overrides are unchanged.

- AGY_KEYRING_ATTRS, AGY_EGRESS_ALLOW and AGY_EGRESS_PATH_RULES are split
  with `read -r -a` instead of an unquoted `for`, which globbed. Before,
  a wildcard such as `*.com` could expand to a file name in the
  checkout and pass the exact-host validation.
- The public stderr tail is withheld when the whole agy log, not just
  the tail, carries a credential shape.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean; a live jailed review from the same scripts completed and
cleaned up after itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-syncs the vendored reviewer scripts byte for byte from the
antigravity-pr-review template at 023b552. Local workflow overrides are
unchanged.

- List settings (AGY_KEYRING_ATTRS, AGY_EGRESS_ALLOW,
  AGY_EGRESS_PATH_RULES) are read whole with `read -r -d '' -a`. A plain
  `read -a` stopped at the first newline, which could drop a later path
  rule (leaving that host unrestricted) or a keyring attribute.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 91443de8-178c-4d78-95b1-8fca0b052c98)

@doublegate
doublegate merged commit ee4df5e into main Nov 23, 2026
31 checks passed
@doublegate
doublegate deleted the ci/agy-reviewer-sync branch November 23, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant