Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment

This commit is contained in:
Chris Bookholt
2026-07-01 16:50:50 -07:00
+4 -4
View File
@@ -52,10 +52,10 @@ impl GitRunner {
if !directory.is_absolute() {
continue;
}
// Check the PATH spelling before appending `git`. On Windows,
// PathBuf::push resolves `..` when its base uses a verbatim prefix,
// which would otherwise erase repository traversal before the
// first containment check.
// Check the raw PATH spelling before canonicalization. A search
// directory can traverse through an untrusted repository and
// resolve outside it; checking only the resolved parent or
// candidate would lose that provenance.
if search_directory_is_untrusted(&directory, untrusted) {
continue;
}