Skip to content

fix: scope mandatory deny paths to the sandbox workdir#125

Merged
jy-tan merged 2 commits intomainfrom
macos-cwd-deny-patterns
Apr 15, 2026
Merged

fix: scope mandatory deny paths to the sandbox workdir#125
jy-tan merged 2 commits intomainfrom
macos-cwd-deny-patterns

Conversation

@jy-tan
Copy link
Copy Markdown
Contributor

@jy-tan jy-tan commented Apr 15, 2026

Summary

Root mandatory dangerous-path protection in the command's actual working directory instead of ambient process cwd, so macOS deny rules stay workspace-scoped without missing protected files in temp workspaces or overmatching paths outside the repo.

Resolves #117.

Changes

  • Replace unscoped macOS **/... mandatory deny globs with workspace-rooted recursive patterns while keeping explicit home-directory protection for shell and git dotfiles
  • Add workdir-aware sandbox wrapping so macOS and Linux derive mandatory deny roots from the command's execution directory, not the wrapper process cwd
  • Update integration and regression coverage to verify scoped deny patterns, generated macOS write rules, and protected .git/hooks, .git/config, and shell config files in temp workspaces

Copy link
Copy Markdown

@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 3 files

@jy-tan jy-tan changed the title fix: scope macOS mandatory deny patterns to workspace fix: scope mandatory deny paths to the sandbox workdir Apr 15, 2026
@jy-tan jy-tan merged commit 92bbc6d into main Apr 15, 2026
6 checks passed
@jy-tan jy-tan deleted the macos-cwd-deny-patterns branch April 15, 2026 01: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.

DangerousDirectories/DangerousFiles write-deny patterns apply outside workspace

1 participant