Skip to content

Feat/confined upload - #63

Merged
grokify merged 6 commits into
mainfrom
feat/confined-upload
Oct 31, 2026
Merged

grokify merged 6 commits into
mainfrom
feat/confined-upload

Conversation

@grokify

@grokify grokify commented Oct 31, 2026

Copy link
Copy Markdown
Member

No description provided.

grokify and others added 6 commits October 31, 2026 08:57
gogoogle v0.14.0 uploads and updates from an io.Reader, and oscompat v0.11.0
opens a file inside a root with the open itself confined and caps the read.

Refs: RMI-MCPGOOGLE-008

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e and stream them

upload_file and update_file resolved the path inside the upload root and then
let gogoogle open it again, so a link swapped in between the check and the open
was followed, and a file that grew after the size check was sent whole. The
file is now opened once, through oscompat's confined open, which refuses a link
that leads out of the root at the moment of the open. The handle is checked as
a regular file within the limit, and that handle is streamed to Drive with the
read capped at the limit, so a file that grows is cut off and refused as
file_too_large.

A link with an absolute target is refused even when it points back into the
root, since the confined open does not follow absolute links.

Refs: RMI-MCPGOOGLE-008

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cover a file that passes the size check and then grows past the limit, and is
cut off before it reaches Drive. Cover a link swapped in at the path after the
open, which is never followed because the handle that was opened is the one
sent. Cover a link with an absolute target, refused even inside the root, and a
relative one, followed.

Refs: RMI-MCPGOOGLE-008

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ed file links

Explain that the file is opened once and the handle streamed, that a file which
grows past the limit is refused as file_too_large, and that a link with an
absolute target is refused. Say that file links must be on drive.google.com or
docs.google.com, and list oscompat among the key dependencies.

Refs: RMI-MCPGOOGLE-008

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: RMI-MCPGOOGLE-007

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

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • 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

@grokify
grokify merged commit 634679a into main Oct 31, 2026
6 of 7 checks passed
@grokify
grokify deleted the feat/confined-upload branch October 31, 2026 16:39
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