-
Notifications
You must be signed in to change notification settings - Fork 0
fix(cache): bind impact and oracle to verified bytes #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TheHalfMoon
wants to merge
7
commits into
main
Choose a base branch
from
fix/cache-verified-impact-oracle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b82a0ac
fix(oracle): stage verified archives for adapter
TheHalfMoon 54bb5bd
fix(oracle): export staged archive snapshot
TheHalfMoon 674bf35
fix(impact): consume verified cache bytes
TheHalfMoon 5aad1ce
fix(oracle): consume staged verified archives
TheHalfMoon 231639b
test(oracle): prove staged snapshot resists source rebinding
TheHalfMoon 01852eb
fix(oracle): make staged permissions portable
TheHalfMoon a5a6269
fix(oracle): stage only when comparison runs
TheHalfMoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: TheHalfMoon/commandF
Length of output: 48593
🏁 Script executed:
Repository: TheHalfMoon/commandF
Length of output: 10853
🌐 Web query:
Rust std::fs::Permissions set_readonly Windows documentation read-only attribute write access💡 Result:
In Rust's standard library, std::fs::Permissions::set_readonly provides a cross-platform interface for toggling the read-only status of a file [1][2]. On Windows, this method specifically maps to the FILE_ATTRIBUTE_READONLY attribute [1][2]. Key behavior and technical details on Windows: 1. Mapping: The set_readonly(bool) method modifies an in-memory Permissions instance by setting or clearing the FILE_ATTRIBUTE_READONLY bit [1][2]. To persist this change to the filesystem, you must pass this Permissions object to std::fs::set_permissions [1][3]. 2. Write Access: If FILE_ATTRIBUTE_READONLY is set, attempts to write to the file will typically fail [1][2]. However, this attribute is not a definitive security mechanism [1][2]. Even if the read-only attribute is cleared, a write operation may still fail if the user lacks the underlying NTFS/Windows filesystem permissions required to modify the file [1][2]. 3. Directories: The behavior of this attribute for directories depends on the Windows version [1][2]. In Windows 7 and earlier, the attribute could prevent the deletion of empty directories, though it did not prevent modification of directory contents [1][2]. On modern versions of Windows, this attribute is generally ignored for directories [1][2]. 4. Limitations: The standard std::fs::Permissions API is intentionally minimal [4]. If you need to manipulate other Windows-specific file attributes (such as FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_SYSTEM), you should use the std::os::windows::fs::PermissionsExt trait [5][4]. Note that set_readonly only modifies the in-memory state of the Permissions object; it does not perform a system call until set_permissions is invoked [1][2].
Citations:
Protect staged archives on Windows.
protect_staged_archiveis a no-op on Windows. An adapter can modify the shared staged archive, and a later comparison can read bytes thatPackageCache::read_verifieddid not verify. Set the Windows read-only attribute aftersync_all, and add a Windows regression for repeated adapter invocations.🤖 Prompt for AI Agents
Source: Coding guidelines