Problem
On current main (43cd2e94cc584f81cc1f27512ae99c9a4099b231), the read-only Git path validator accepts a NUL byte:
isSafeRepoPath("src\0secret.ts") // true
buildShowArgs({ revision: "HEAD", path: "src\0secret.ts" }) // returns argv
Node rejects that argv before spawning Git with TypeError [ERR_INVALID_ARG_VALUE]: The argument 'args[2]' must be a string without null bytes. The model therefore receives a host-level runtime failure rather than OpenPI's bounded InvalidPathError contract.
Expected behavior
Paths containing a NUL byte are rejected by isSafeRepoPath and all public Git argv builders throw InvalidPathError before process execution.
Actual behavior
The path pattern excludes path syntax and whitespace, but not \0, so the invalid value reaches the spawn boundary.
Scope
This is input diagnosis and contract hardening only. It is not a command-injection claim, does not alter Git command capability, and does not broaden accepted paths.
I would like to take this issue. I will add a failing argument-builder regression, make the smallest shared validator change, then run focused Git-read tests plus repository checks.
Problem
On current
main(43cd2e94cc584f81cc1f27512ae99c9a4099b231), the read-only Git path validator accepts a NUL byte:Node rejects that argv before spawning Git with
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'args[2]' must be a string without null bytes.The model therefore receives a host-level runtime failure rather than OpenPI's boundedInvalidPathErrorcontract.Expected behavior
Paths containing a NUL byte are rejected by
isSafeRepoPathand all public Git argv builders throwInvalidPathErrorbefore process execution.Actual behavior
The path pattern excludes path syntax and whitespace, but not
\0, so the invalid value reaches the spawn boundary.Scope
This is input diagnosis and contract hardening only. It is not a command-injection claim, does not alter Git command capability, and does not broaden accepted paths.
I would like to take this issue. I will add a failing argument-builder regression, make the smallest shared validator change, then run focused Git-read tests plus repository checks.