FileMailer

Private, user-initiated Gmail sending from Finder on macOS

View the Project on GitHub Thomazlb/FileMailer

Security Design

Trust boundaries

Finder IPC, file names, metadata, extracted content, OAuth responses and Gmail responses are untrusted. The model has no tools, network client or send action. Only explicit UI code can start GmailUploadCoordinator.

Controls

Prompt injection

The static model instructions never interpolate file content. Prompts delimit untrusted file data and instruct the model not to obey it. Guided output is validated for header-like prefixes, subject newlines, length and assertions of sending. A deterministic fallback remains available after guardrail or context errors.

Local denial of service

The extension limits paths to 50 and each path to 4096 UTF-8 bytes. IPC has message and table bounds. File analysis reads at most 256 KiB per text file and 1 MiB total prompt text, limits PDF/OCR pages and caps archive and folder entries. Cancellation is checked in long operations.

Logs

Do not add message bodies, subjects, raw API responses, access tokens, refresh tokens, complete paths or extracted text to logs. Diagnostic events must pass the app sanitizer before storage or export.