Skip to content

ci: re-sync the Antigravity reviewer with the hardened template - #263

Merged
doublegate merged 1 commit into
mainfrom
ci/agy-reviewer-sync
Nov 23, 2026
Merged

doublegate merged 1 commit into
mainfrom
ci/agy-reviewer-sync

Conversation

@doublegate

@doublegate doublegate commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Re-syncs the vendored Antigravity PR reviewer from the antigravity-pr-review template at 023b552. This repository's own workflow overrides are preserved. The same scripts are already merged on nine other repositories (RustyNES_MiSTer, CrypTrade, RustySNES, Rusty2600, VeridianOS, GH-ListRollup, Infinity-Context, CyberChef-MCP, Orbic-Rayhunter).

  • Jail (AGY_ISOLATION=bwrap): agy runs in a bubblewrap jail. It gets an empty private HOME and read-only /usr and /etc, and only the review sandbox is writable. D-Bus is filtered to agy's own keyring item.
  • Egress (AGY_EGRESS=filtered): the jail's only network path is a TLS-intercepting proxy. It allows exact Google hosts only and rebuilds every request, which blocks Host-header fronting to Cloud Storage.
  • Output: credential-shaped strings are redacted before posting. The archive and the assembled body are re-scanned, and anything redaction cannot remove stops the post.

Note on this PR's own review

A PR is reviewed by the reviewer on the default branch, so this PR's review still runs the previous reviewer. The new one takes effect once this merges.

Verification

  • bash scripts/agy-review-selftest.sh: all checks passed.
  • actionlint: clean.
  • Live jailed reviews from these scripts completed and cleaned up after themselves.

🤖 Generated with Claude Code


Note

High Risk
Changes how untrusted PR diffs execute on a self-hosted runner (jail, network proxy, credential handling); bugs could break reviews or weaken isolation, though the direction is defensive and heavily self-tested.

Overview
Re-syncs the Antigravity PR reviewer scripts and docs from the hardened template while keeping this repo’s workflow overrides. agy-review.sh is the bulk of the change: agy runs in a bubblewrap jail (empty HOME, filtered D-Bus to its keyring item, private temp sandbox instead of writing large diffs under .agy-review-work/), gets an allowlisted env -i environment, and on filtered egress uses an embedded TLS-intercepting CONNECT proxy with exact host/path rules so reviews cannot exfiltrate tokens via arbitrary HTTPS. Credential-shaped output is redacted (with fail-closed posting) and archived rounds are redacted and cumulative “dropped rounds” counts are preserved via new agy_body_dropped_count.

The workflow raises timeout-minutes to 80 and AGY_LOCK_WAIT to 1860 (queue behind other repos’ reviews), bumps default print-timeout guidance to 10m, and skips the review step with a warning when scripts/agy-review.sh is missing on the default branch. agy-review-selftest.sh grows large to pin jail/egress/proxy behavior, cleanup ordering, UTF-8/script capture fixes, and lock/timeout budgeting. .github/AGY-REVIEWER.md documents the security model and drops the requirement to append /.agy-review-work/ to .gitignore.

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

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

- Jail (AGY_ISOLATION=bwrap): agy's own --sandbox does not confine
  reads, so agy runs in a bubblewrap jail. It gets an empty private
  HOME, read-only /usr and /etc, and only the review sandbox writable.
  D-Bus goes through an xdg-dbus-proxy that allows GetSecret on agy's
  own keyring item only.
- Egress (AGY_EGRESS=filtered): the jail's only network path is a
  CONNECT proxy for exact Google hosts. Every allowed host is
  TLS-intercepted with a per-run CA, and each request is rebuilt with
  the proxy's own Host header and a body forwarded exactly once, which
  blocks Host-header fronting to Cloud Storage.
  AGY_EGRESS_PATH_RULES limits www.googleapis.com to the userinfo call.
- Output: credential-shaped strings are redacted, and the comment says
  so. The archive and the assembled body are re-scanned, and anything
  redaction cannot remove stops the post.
- The environment is an allowlist; the checkout is never agy's
  workspace; the egress log carries verdict counts only.

Verification: agy-review-selftest.sh all checks passed; actionlint
clean. The same scripts are live on nine other repositories.

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

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

  • Trigger review

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

Run configuration

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 23, 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-23T04:29:33.637247Z 83aeedf PR opened
ℹ️ 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.

@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: c3f9a46e-750b-4863-b8fb-7d489470faa4)

@github-actions

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

Re-syncs the Antigravity PR reviewer workflow, scripts, documentation, and self-test suite with the hardened template (adding a bubblewrap filesystem/D-Bus jail, a TLS-terminating HTTP/1.1 egress proxy, an allowlisted process environment, private sandbox handoff directory, credential redaction, and higher lock/print timeouts).

Blocking issues

None found.

Suggestions

  • scripts/agy-review-selftest.sh:714: kill "$px_pid" 2>/dev/null; wait "$px_pid" 2>/dev/null || true runs under set -euo pipefail without || true on kill. If the background egress proxy process exits prematurely during one of the test cases, kill returns non-zero and aborts the test suite immediately instead of reporting the failure; guard it with || true as done in selftest_exit (scripts/agy-review-selftest.sh:308) and cleanup() (scripts/agy-review.sh:561).
  • scripts/agy-review.sh:1724: In the in-jail _inner wrapper, the readiness loop for socat (for _ in $(seq 1 100); do ...) does not check kill -0 "$!" 2>/dev/null || break (unlike the host startup loops at scripts/agy-review.sh:1658 and 1714), so an immediate socat startup failure always waits the full 10 seconds before exiting. Also consider redirecting socat stdout (>/dev/null 2>&1 instead of 2>/dev/null) so the background bridge does not inherit the PTY stdout descriptor.

Nitpicks

  • scripts/agy-review.sh:1984, scripts/agy-review.sh:2066: The secondary redaction log lines on $body_file and $archived_file report only the first matched credential kind (${cred_kind} from credential_kind_present) rather than all matched kinds (credential_kinds_present) as the primary capture loop does at scripts/agy-review.sh:1806.

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

@doublegate
doublegate merged commit d43e5c9 into main Nov 23, 2026
18 checks passed
@doublegate
doublegate deleted the ci/agy-reviewer-sync branch November 23, 2026 05:15
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