fix(code-queue): add workdirs contract checks

This commit is contained in:
Codex
2026-05-19 02:07:41 +00:00
parent 49cf1e57bb
commit 6006017393
9 changed files with 611 additions and 9 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ function numberOption(args: string[], name: string, fallback: number): number {
function requireRevision(value: string | null): string {
if (value === null || value.length === 0) throw new Error("ci run requires --revision <commit-or-ref>");
if (!/^[A-Za-z0-9._/@:-]{1,160}$/u.test(value)) throw new Error("ci --revision contains unsupported characters");
if (!/^[A-Za-z0-9._/@:-]{1,160}$/u.test(value) || value.startsWith("-") || value.includes("..")) throw new Error("ci --revision contains unsupported characters");
return value;
}