mirror of
https://github.com/morluto/rea
synced 2026-10-28 15:07:26 -04:00
fix(cli): validate selected local paths before resolution
Reuse the nonempty NUL-free local path contract before normalization in artifact commands, auxiliary inputs, and output destinations. Empty selections now fail at parsing instead of selecting the working directory; explicit relative paths preserve their target. Public CLI checks cover primary and auxiliary empty paths, exact relative-file digest, explicit current-directory selection, symlink parent semantics, and environment export inputs. Correct the desktop fixture to assert the existing CLI validation envelope.
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
analysisEvidenceDeliveryOptions,
|
||||
deliverCliAnalysisEvidence,
|
||||
} from "./analysisEvidenceDelivery.js";
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { explicitSensitiveValueOptions } from "./explicitSensitiveArguments.js";
|
||||
|
||||
@@ -27,7 +28,7 @@ export const registerWebNetworkCaptureCommands = (
|
||||
description:
|
||||
"Inspect retained HAR, native mitmproxy, Fiddler SAZ or aioquic qlog records without fetching recorded URLs",
|
||||
args: z.object({
|
||||
capturePath: z.string().describe("Absolute local capture path"),
|
||||
capturePath: localPathStringSchema.describe("Local capture path"),
|
||||
format: z
|
||||
.enum(WEB_NETWORK_CAPTURE_FORMATS)
|
||||
.describe("Producer capture format"),
|
||||
@@ -42,10 +43,9 @@ export const registerWebNetworkCaptureCommands = (
|
||||
.array(z.string())
|
||||
.optional()
|
||||
.describe("Exact body pointers; repeat to select several"),
|
||||
protobufSchema: z
|
||||
.string()
|
||||
protobufSchema: localPathStringSchema
|
||||
.optional()
|
||||
.describe("Absolute local compiled FileDescriptorSet path"),
|
||||
.describe("Local compiled FileDescriptorSet path"),
|
||||
protobufMessage: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
Reference in New Issue
Block a user