Harden temporary file permissions#1063
Merged
Merged
Conversation
Member
|
Merged. If we see any CI build issues or anyone hits issues with this, it will be reverted. The default temp file strategy is meant to be easy to use and to not have any risks that it does not work on every platform. Users who want stricter policies can implement their own strategies. |
Member
|
reworked and changed a bit in #1065 |
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.
This patch hardens POI temporary file and directory handling by restricting access permissions to the owning user where supported.
DefaultTempFileCreationStrategypreviously relied on platform-default permissions when creating temporary artifacts. These temporary files and directories can contain sensitive intermediate document data during processing, including streamed workbook contents, extracted package data, and decrypted document material.The change updates temp file handling to:
rw-------for files,rwx------for directories) on POSIX-capable platformsThe patch also adds regression tests validating that created temporary files do not expose group/other read or write permissions on POSIX-supported filesystems.