antigravity: guard conversation_id for safe save_dir use#312
Merged
Conversation
joycel-github
marked this pull request as ready for review
July 15, 2026 05:44
rakyll
approved these changes
Jul 17, 2026
harness_server uses the caller-supplied conversation_id directly as a per-conversation storage directory name (save_dir = state_dir / conversation_id) before the Antigravity harness ever sees it, so a value like "../escape" could traverse outside state_dir. Reject an empty id or one containing a path separator or a "." / ".." component at the boundary in _run_turn, returning an INVALID_ARGUMENT end frame. This is intentionally only a path-safety guard, not the id-format contract. The Antigravity harness owns that: it validates the forwarded cascade_id (length and character set) per cl/948016352. Keeping the format rule in one place avoids the two layers drifting.
joycel-github
force-pushed
the
agy-harness-validate-conversation-id
branch
from
July 17, 2026 02:20
c3f89f6 to
2df1409
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
conversation_id is used as part of save_dir. add a validation to make sure it's safe