Skip to content

fix: harden linux deny mount canonicalization#60

Merged
jy-tan merged 2 commits intomainfrom
refactor-mount
Feb 27, 2026
Merged

fix: harden linux deny mount canonicalization#60
jy-tan merged 2 commits intomainfrom
refactor-mount

Conversation

@jy-tan
Copy link
Contributor

@jy-tan jy-tan commented Feb 26, 2026

Summary

Follow up on #53 by hardening Linux deny mount setup at mount-application time. This ensures deny mount destinations are canonicalized before bwrap arguments are emitted, reducing startup failures on symlink/alias-heavy systems (see #51), while preserving existing deny precedence behavior.

Changes

  • Canonicalize deny mount destinations in Linux mount planning (resolvePathForMount), including symlinked ancestor paths
  • Apply canonical mount resolution to runtime exec-deny masking (not just executable path resolution)
  • Skip unmountable runtime deny targets with debug logging to avoid hard bwrap startup failures
  • Preserve explicit denyRead precedence and existing dangerous-path protections
  • Expand test coverage:
    • Linux unit tests for mount-path canonicalization and runtime deny mount behavior
    • Runtime exec-deny unit tests for canonical alias dedupe and default chroot deny path coverage
    • Linux integration tests for symlinked global gitconfig and /bin alias runtime deny scenarios

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

@jy-tan jy-tan merged commit 6f975af into main Feb 27, 2026
5 checks passed
@jy-tan jy-tan deleted the refactor-mount branch February 27, 2026 09:03
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.

1 participant