Skip to content

antigravity: guard conversation_id for safe save_dir use#312

Merged
joycel-github merged 1 commit into
mainfrom
agy-harness-validate-conversation-id
Jul 17, 2026
Merged

antigravity: guard conversation_id for safe save_dir use#312
joycel-github merged 1 commit into
mainfrom
agy-harness-validate-conversation-id

Conversation

@joycel-github

@joycel-github joycel-github commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

conversation_id is used as part of save_dir. add a validation to make sure it's safe

@joycel-github
joycel-github marked this pull request as ready for review July 15, 2026 05:44
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
joycel-github force-pushed the agy-harness-validate-conversation-id branch from c3f89f6 to 2df1409 Compare July 17, 2026 02:20
@joycel-github
joycel-github merged commit 68920da into main Jul 17, 2026
9 checks passed
@joycel-github
joycel-github deleted the agy-harness-validate-conversation-id branch July 17, 2026 03:56
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.

2 participants