fix: isolate temp scope by user within an account#1398
Open
Hinotoi-agent wants to merge 1 commit intovolcengine:mainfrom
Open
fix: isolate temp scope by user within an account#1398Hinotoi-agent wants to merge 1 commit intovolcengine:mainfrom
Hinotoi-agent wants to merge 1 commit intovolcengine:mainfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
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
This PR hardens OpenViking temp-scope isolation so one authenticated user can no longer read, enumerate, or overwrite another same-account user's temporary files.
Security issues covered
Before this PR
viking://temp/*was treated as accessible to any non-root authenticated user/local/{account_id}/temp/...without a user ownership segmentAfter this PR
viking://temp/<user-space>/<temp-id>tempis limited to the owning user spaceWhy this matters
Temporary files can contain uploaded inputs, parser intermediates, or working copies created during write flows. Sharing the temp namespace across all users in the same account breaks user isolation and lets one user interfere with another user's in-progress work.
Attack flow
Affected code
openviking_cli/utils/uri.pyopenviking/storage/viking_fs.pyopenviking/storage/content_write.pytests/server/test_temp_scope_acl.pyRoot cause
_is_accessible()treated the entiretempscope as universally readable/writable for non-root users.CVSS assessment
Rationale:
Safe reproduction steps
viking://temp/....viking://temp.Expected vulnerable behavior
Changes in this PR
Files changed
openviking_cli/utils/uri.pyopenviking/storage/viking_fs.pyopenviking/storage/content_write.pytests/server/test_temp_scope_acl.pyMaintainer impact
Fix rationale
Temp data should be isolated at least as strictly as other user-scoped working data. User-scoped temp URIs preserve the existing temp workflow while restoring the expected user boundary inside a shared account.
Type of change
Test plan
Executed:
python -m pytest -o addopts='' tests/server/test_temp_scope_acl.py -qDisclosure notes