Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the critical symlink-validation issue before approval.
Review effort: Lite
Findings: 1
What changed in this PR
Adds a helper for locating the rootfs proc mount point.
Changes:
- Adds
proc_mount_pointlookup and validation. - Adds a unit test for initialized rootfs layouts.
| File | Summary |
|---|---|
src/rootfs.rs |
Adds proc mount-point resolution and testing. Critical issue (1 vote): symlinks must be rejected to prevent mounting outside the rootfs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| pub fn proc_mount_point(path: &Path) -> io::Result<std::path::PathBuf> { | ||
| let mount_point = path.join("proc"); | ||
|
|
||
| if mount_point.is_dir() { |
There was a problem hiding this comment.
Updated in d7d23d2: the proc mount-point check now uses symlink_metadata and rejects symlinks; a regression test covers a link to an outside directory.
Co-authored-by: grappig <198801145+grappig@users.noreply.github.com>
Owner
Author
|
@copilot fix the formatting issues. |
I checked the repository with |
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.

No description provided.