mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Bind Git worktree helpers to a trusted executable
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn path_containment_uses_component_boundaries() {
|
||||
let root = Path::new("/repo/root");
|
||||
assert!(path_is_within(Path::new("/repo/root"), root));
|
||||
assert!(path_is_within(Path::new("/repo/root/config"), root));
|
||||
assert!(!path_is_within(Path::new("/repo/rooted/config"), root));
|
||||
assert!(!path_is_within(Path::new("/repo"), root));
|
||||
}
|
||||
Reference in New Issue
Block a user