mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00: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:
1 parent
231e458246
commit
9d7779d365
20 files changed
+229
-58
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { z } from "incur";
|
||||
import { AnalysisInputError } from "../domain/analysisErrorCore.js";
|
||||
@@ -22,14 +23,13 @@ export const registerIl2cppCommands = (
|
||||
description:
|
||||
"Inventory IL2CPP global-metadata.dat names, owners and string literals, optionally linking method addresses from the native binary",
|
||||
args: z.object({
|
||||
path: z
|
||||
.string()
|
||||
.describe("Local global-metadata.dat (version 24, 27, 29, 31 or 39)"),
|
||||
path: localPathStringSchema.describe(
|
||||
"Local global-metadata.dat (version 24, 27, 29, 31 or 39)",
|
||||
),
|
||||
}),
|
||||
options: z.object({
|
||||
...analysisEvidenceDeliveryOptions,
|
||||
binary: z
|
||||
.string()
|
||||
binary: localPathStringSchema
|
||||
.optional()
|
||||
.describe(
|
||||
"Matching native binary (Mach-O GameAssembly.dylib, PE GameAssembly.dll or ELF libil2cpp.so) to link method addresses; read only",
|
||||
@@ -38,8 +38,7 @@ export const registerIl2cppCommands = (
|
||||
.enum(["arm64", "amd64"])
|
||||
.optional()
|
||||
.describe("Slice of a universal Mach-O binary"),
|
||||
ghidraSeeds: z
|
||||
.string()
|
||||
ghidraSeeds: localPathStringSchema
|
||||
.optional()
|
||||
.describe(
|
||||
"Also write REA_GHIDRA_SEED_FILE function seeds named Type$$Method for every linked method; needs --binary",
|
||||
|
||||
Reference in new issue
Block a user