Repository navigation
Conversation
robinebers#1402) Require --csrf_token in process arguments during agy language server discovery. This avoids invoking lsof and attempting unauthenticated HTTP requests against arbitrary open TCP ports on agy CLI/background processes.
|
Thanks for your interest in contributing to OpenUsage! External pull requests must reference an open issue that:
Please discuss the change on an issue first, wait for a maintainer to approve and assign it to you, then reopen this pull request with |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the agy discovery configuration, required-token filtering, RPC token propagation, and regression test.
- Authenticated Discovery: Requires
--csrf_tokenforagycandidates, skipping processes without it before port discovery while preserving Cloud Code fallback. - Regression Coverage: Adds a fake-runner test asserting that a tokenless
agycandidate returns no discovery result without invokinglsof. - Validation: Swift syntax parsing passed for both changed files. The macOS-only test suite could not be run on this Linux runner.
gpt-6.1-sol | 𝕏
|
i'll test the pr asap and will provide feedback, tysm |

TL;DR
Require
--csrf_tokenin process arguments before probing candidate language server ports onagy. This prevents discovery from querying arbitrary open TCP ports onagywithout authentication.What was happening
AntigravityProvider.probe()passed an empty string forcsrfFlagwhen callingprobeLS(processName: "agy", ...).csrfFlag,LanguageServerDiscoveryconsidered any runningagyprocess as a candidate regardless of whether it was started with a CSRF token.lsofto find all open TCP listening ports on the process and attempted HTTP requests to each port without authentication headers.What this changes
csrfFlag: "--csrf_token"inAntigravityProvider.probe()when probingagy, aligning it with thelanguage_serverprobe.agyprocesses lacking--csrf_tokenare immediately skipped, preventing unauthenticated port probes.testDiscoverySkipsCandidateWithoutRequiredCSRFFlaginAntigravityProviderTests.Closes #1402
Tests
swift test --filter AntigravityProviderTests(31 tests passed).lsofand HTTP probes are skipped when--csrf_tokenis missing fromagyprocess arguments.