mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user