feat(gmail): add --safe flag to get and thread get commands#238
Open
urasmutlu wants to merge 2 commits intosteipete:mainfrom
Open
feat(gmail): add --safe flag to get and thread get commands#238urasmutlu wants to merge 2 commits intosteipete:mainfrom
urasmutlu wants to merge 2 commits intosteipete:mainfrom
Conversation
Sanitize email output by stripping HTML via a full parser, removing URLs to prevent phishing/tracking, and decoding HTML entities. In JSON mode a sanitized bodies map is provided and raw body data is cleared. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…fe-mode-for-email-get # Conflicts: # internal/cmd/gmail_thread.go
14 tasks
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.
Summary
Closes #220
--safeflag togmail getandgmail thread getcommands that sanitizes email output for secure display[url removed]to prevent phishing and trackinghttps://...)bodiesmap and clears raw body data from the payloadList-Unsubscribeheader in safe mode to avoid leaking URLsNew flags
gog gmail get <messageId> --safegog gmail thread get <threadId> --safeTest plan
safeExtractTextFromHTML(11 cases including malformed HTML, script/style removal, entities)stripURLs(7 cases)sanitizeBodyText(6 cases including HTML entity obfuscation)sanitizeText(3 cases)clearPayloadBodies(verifies text/* cleared, attachments preserved)gmail get --safein both JSON and text modesgmail thread get --safein both JSON and text modesmake fmtandmake lintpass with 0 issues🤖 Generated with Claude Code