Skip to content

add proc mount point scaffold - #6

Open
grappig wants to merge 2 commits into
mainfrom
feat/rootfs-proc-mount-point
Open

grappig wants to merge 2 commits into
mainfrom
feat/rootfs-proc-mount-point

Conversation

@grappig

@grappig grappig commented Oct 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resolve the critical symlink-validation issue before approval.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds a helper for locating the rootfs proc mount point.

Changes:

  • Adds proc_mount_point lookup 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.

Comment thread src/rootfs.rs Outdated
pub fn proc_mount_point(path: &Path) -> io::Result<std::path::PathBuf> {
let mount_point = path.join("proc");

if mount_point.is_dir() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@grappig

grappig commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

@copilot fix the formatting issues.

Copilot AI commented Oct 2, 2026

Copy link
Copy Markdown

@copilot fix the formatting issues.

I checked the repository with cargo fmt -- --check; it passes, so no formatting changes were needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants