fix: harden Google Drive integration (M-05, M-06)#17
Open
riaworks wants to merge 1 commit intothiagofinch:mainfrom
Open
fix: harden Google Drive integration (M-05, M-06)#17riaworks wants to merge 1 commit intothiagofinch:mainfrom
riaworks wants to merge 1 commit intothiagofinch:mainfrom
Conversation
M-05: Add path validation to upload_file() in gdrive_sync.py and convert() in convert.py. Only files under allowed directories (knowledge/, docs/, agents/, core/, logs/) can be uploaded or converted. Prevents uploading sensitive files (.env, credentials) to Google Drive. Uses Path.resolve() + relative_to() for traversal prevention. M-06: Fix OAuth credential paths in reauth.py. Replace Path(r"~/.config/...") (raw string, ~ not expanded) with Path.home() / ".config" / ... for correct cross-platform expansion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Hardens Google Drive integration paths. Part of the Security Remediation Plan (PR 5 of 7).
M-05: Upload Path Restriction (gdrive_sync.py, convert.py)
upload_file()andconvert()methodsknowledge/,docs/,agents/,core/,logs/Path.resolve()+relative_to()for path traversal prevention.env, credentials, SSH keys) to Google DriveM-06: OAuth Credential Path Fix (reauth.py)
Path(r"~/.config/...")withPath.home() / ".config" / ...r"~"does NOT expand~— it stays as literal tildePath.home()correctly resolves to user home directory on all platformsFiles Changed
.claude/skills/sync-docs/gdrive_sync.py.claude/skills/convert-to-company-docs/convert.py.claude/skills/sync-docs/reauth.pySecurity Properties
🤖 Generated with Claude Code