You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
google-workspace battery: writes can expose internal data through file or folder sharing #747
In marketplace/batteries/google-workspace/appa.toml (main @ af1303d, v0.37.0), create_file, copy_file and update_file require only trusted data that internal may see (L65–83):
The header of the same file says "a file's sharing never reaches the policy" (L4–5). The write rules therefore assume the target is readable by internal at most. If the target file or its folder is shared outside the organization, nothing in the policy notices.
In the connector's tools/list, create_file and copy_file both take a parentId. Drive gives files the sharing of their folder: "When you share a folder, all files and subfolders inside it inherit those same sharing permissions" (Google Drive Help).
Example. I worked this out from the rules and have not recorded a run.
The user asks: "Summarize the diff from Linear issue X and save it to this folder: ". The folder is shared as "Anyone with the link".
The agent calls mcp/linear/get_diff. The trajectory label becomes trusted + internal (linear/appa.toml L43–46).
The agent calls create_file with title, textContent and parentId set to that folder. The data is trusted and its audience contains internal, so the monitor returns allow. The new file gets the folder's sharing, so anyone with the link can read the diff.
copy_file and update_file have the same rule.
So internal data ends up with readers outside internal, and no attention mark or remedy comes up on the way. share_file is guarded by google-workspace-review; the write tools are not. I read this as a limit of the contract, since the policy cannot see the target's sharing. The engine does what the rules say.
Options. Pick whichever fits the project.
(a) Add a line about writes to Limits in the README and on the docs page: a write can reach readers outside internal when the target file or its parent folder is shared outside the organization.
(b) Require a review mark on writes, as share_file does with google-workspace-review.
(c) Before a write, ask Drive who can read the target and check that with contains. The connector's own get_file_permissions already returns the grantee type (user, group, domain, anyone), so an annotator or context provider could fetch the same data over a trusted path.
Activity