SEC-147 | lBock sensitive file paths in FileClient.upload_file()#824
Merged
Aryamanz29 merged 5 commits intomainfrom Mar 6, 2026
Merged
SEC-147 | lBock sensitive file paths in FileClient.upload_file()#824Aryamanz29 merged 5 commits intomainfrom
FileClient.upload_file()#824Aryamanz29 merged 5 commits intomainfrom
Conversation
Add a check for '..' components in the file path passed to FileUpload.validate_file_path, raising a new INVALID_UPLOAD_FILE_PATH_TRAVERSAL error (ATLAN-PYTHON-400-077) if detected. Also use Path.resolve() to normalize the path before opening, preventing directory traversal attacks. Closes SEC-147 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extend validate_file_path to reject: - System directories: /etc/, /proc/, /sys/, /dev/, /root/, macOS equivalents - Credential directories: .aws, .ssh, .gnupg anywhere in the resolved path - Environment/secret files: .env, .env.local, .env.production, etc. Raises new INVALID_UPLOAD_FILE_PATH_SENSITIVE error (ATLAN-PYTHON-400-078) for all sensitive path matches, in addition to the existing traversal check (ATLAN-PYTHON-400-077) for '..' components. Closes SEC-147 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Users can now extend the upload path blocklist without modifying the SDK: PYATLAN_SENSITIVE_SYSTEM_PREFIXES – additional path prefixes (e.g. /vault/,/secrets/) PYATLAN_SENSITIVE_DIR_NAMES – additional hidden dir names (e.g. .vault,.myconfig) PYATLAN_SENSITIVE_FILE_PREFIXES – additional file name prefixes (e.g. .credentials) Each env var accepts a comma-separated list merged with the built-in defaults at call time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…E_BLOCKED_PATHS Replace three separate env vars (PYATLAN_SENSITIVE_SYSTEM_PREFIXES, PYATLAN_SENSITIVE_DIR_NAMES, PYATLAN_SENSITIVE_FILE_PREFIXES) with a single PYATLAN_UPLOAD_FILE_BLOCKED_PATHS that accepts comma-separated path patterns matched as substrings against the full resolved file path. Also update the error message from "Access to sensitive" to "Access to blocked". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
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.
✨ Description
https://linear.app/atlan-epd/issue/SEC-147/vdp-report-arbitrary-file-read-in-fileclient-via-upload-file-in
🧩 Type of change
Select all that apply:
✅ How has this been tested? (e.g. screenshots, logs, workflow links)
Describe how the change was tested. Include:
📋 Checklist