fix(security): restrict investigation artifact inputs

This commit is contained in:
morluto
2026-07-14 04:48:46 +08:00
parent ee785ca9a9
commit a2076b47a6
17 changed files with 286 additions and 66 deletions
@@ -23,6 +23,7 @@ describe("configuration parsing integration", () => {
HOPPER_TARGET_KIND: "executable",
HOPPER_LOADER_ARGS_JSON: '["-l","Mach-O","--aarch64"]',
REA_EVIDENCE_ROOTS_JSON: '["/tmp/evidence"]',
REA_INVESTIGATION_INPUT_ROOTS_JSON: '["/tmp/releases"]',
REA_ANALYSIS_SNAPSHOT_ROOTS_JSON: '["/tmp/analysis"]',
});
expect(result.ok).toBe(true);
@@ -35,6 +36,7 @@ describe("configuration parsing integration", () => {
"--aarch64",
]);
expect(result.value.evidenceFilePolicy.roots).toEqual(["/tmp/evidence"]);
expect(result.value.investigationInputRoots).toEqual(["/tmp/releases"]);
expect(result.value.analysisSnapshotFilePolicy.roots).toEqual([
"/tmp/analysis",
]);