Add evidence-backed investigation workflows
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import { createAnalysisExecution } from "../../src/application/AnalysisProvider.js";
|
||||
import { ok } from "../../src/domain/result.js";
|
||||
|
||||
const FIXTURE_PROVIDER = {
|
||||
id: "fixture",
|
||||
name: "Fixture analysis provider",
|
||||
version: "1",
|
||||
} as const;
|
||||
|
||||
/** Wrap fixture output in the same atomic provider envelope as production. */
|
||||
export const observed = (value: unknown) =>
|
||||
ok(createAnalysisExecution(value, FIXTURE_PROVIDER));
|
||||
Vendored
+6
-2
@@ -1,6 +1,6 @@
|
||||
import { createServer } from "node:net";
|
||||
|
||||
const [socketPath, token] = process.argv.slice(2);
|
||||
const [socketPath, token, runId] = process.argv.slice(2);
|
||||
const server = createServer((socket) => {
|
||||
socket.on("error", () => undefined);
|
||||
socket.setEncoding("utf8");
|
||||
@@ -24,7 +24,11 @@ const server = createServer((socket) => {
|
||||
send(
|
||||
{
|
||||
id: request.id,
|
||||
result: { name: "REA Hopper bridge", version: "1.0.0" },
|
||||
result: {
|
||||
name: "REA Hopper bridge",
|
||||
version: "1.0.0",
|
||||
run_id: runId,
|
||||
},
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
Vendored
+3
-2
@@ -16,11 +16,12 @@ if (
|
||||
process.exit(2);
|
||||
}
|
||||
const source = readFileSync(process.argv[bootstrapIndex], "utf8");
|
||||
const [socketLine, tokenLine] = source.split("\n");
|
||||
const [socketLine, tokenLine, runIdLine] = source.split("\n");
|
||||
const socketPath = JSON.parse(socketLine.slice(socketLine.indexOf("=") + 1));
|
||||
const token = JSON.parse(tokenLine.slice(tokenLine.indexOf("=") + 1));
|
||||
const runId = JSON.parse(runIdLine.slice(runIdLine.indexOf("=") + 1));
|
||||
const bridge = fileURLToPath(new URL("./fakeHopper.mjs", import.meta.url));
|
||||
const child = spawn(process.execPath, [bridge, socketPath, token], {
|
||||
const child = spawn(process.execPath, [bridge, socketPath, token, runId], {
|
||||
stdio: "ignore",
|
||||
});
|
||||
child.on("exit", (code) => process.exit(code ?? 0));
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
Executable=/Applications/Fixture.app/Contents/MacOS/Fixture
|
||||
Identifier=com.example.fixture
|
||||
Format=app bundle with Mach-O thin (arm64)
|
||||
CodeDirectory v=20500 size=500 flags=0x10000(runtime) hashes=10+7 location=embedded
|
||||
Hash choices=sha256
|
||||
CDHash=abcdef0123456789
|
||||
Signature size=9000
|
||||
Authority=Developer ID Application: Example
|
||||
TeamIdentifier=TEAM12345
|
||||
Timestamp=Jul 12, 2026 at 12:00:00
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Test.foo() -> ()
|
||||
plain_symbol
|
||||
@@ -0,0 +1,3 @@
|
||||
exports:
|
||||
0x100001000 _main
|
||||
0x100001080 _$s4Test3fooyyF
|
||||
@@ -0,0 +1,3 @@
|
||||
imports:
|
||||
0x100001100 libSystem.B.dylib _malloc
|
||||
0x100001108 libobjc.A.dylib _objc_msgSend weak
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0"><dict><key>com.apple.security.app-sandbox</key><true/></dict></plist>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
Fat header in: fixture
|
||||
fat_magic 0xcafebabe
|
||||
nfat_arch 2
|
||||
architecture x86_64
|
||||
cputype 16777223
|
||||
cpusubtype 3
|
||||
offset 16384
|
||||
size 4096
|
||||
align 2^14 (16384)
|
||||
architecture arm64
|
||||
cputype 16777228
|
||||
cpusubtype 0
|
||||
offset 32768
|
||||
size 8192
|
||||
align 2^14 (16384)
|
||||
+1
@@ -0,0 +1 @@
|
||||
Non-fat file: fixture is architecture: arm64
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
fixture:
|
||||
Mach header
|
||||
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
|
||||
0xfeedfacf 16777228 0 0x00 EXECUTE 4 512 NOUNDEFS DYLDLINK
|
||||
Load command 0
|
||||
cmd LC_SEGMENT_64
|
||||
cmdsize 152
|
||||
segname __TEXT
|
||||
vmaddr 0x100000000
|
||||
vmsize 0x2000
|
||||
fileoff 0
|
||||
filesize 8192
|
||||
maxprot 0x5
|
||||
initprot 0x5
|
||||
nsects 1
|
||||
flags 0x0
|
||||
Section
|
||||
sectname __text
|
||||
segname __TEXT
|
||||
addr 0x100001000
|
||||
size 0x100
|
||||
offset 4096
|
||||
align 4
|
||||
flags 0x80000400
|
||||
Load command 1
|
||||
cmd LC_UUID
|
||||
cmdsize 24
|
||||
uuid 01234567-89AB-CDEF-0123-456789ABCDEF
|
||||
Load command 2
|
||||
cmd LC_MAIN
|
||||
cmdsize 24
|
||||
entryoff 4096
|
||||
stacksize 0
|
||||
Load command 3
|
||||
cmd LC_BUILD_VERSION
|
||||
cmdsize 32
|
||||
platform MACOS
|
||||
minos 13.0
|
||||
sdk 14.2
|
||||
ntools 1
|
||||
tool LD
|
||||
version 1000.0
|
||||
Load command 4
|
||||
cmd LC_LOAD_DYLIB
|
||||
cmdsize 64
|
||||
name /usr/lib/libSystem.B.dylib (offset 24)
|
||||
time stamp 2 Thu Jan 1 00:00:02 1970
|
||||
current version 1319.0.0
|
||||
compatibility version 1.0.0
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"CFBundleIdentifier": "com.example.fixture",
|
||||
"CFBundleExecutable": "Fixture",
|
||||
"CFBundleName": "Fixture",
|
||||
"CFBundleVersion": "42",
|
||||
"CFBundleShortVersionString": "1.2.3"
|
||||
}
|
||||
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
const mode = process.argv[2];
|
||||
|
||||
if (mode === "interactive") {
|
||||
process.stdin.setRawMode?.(true);
|
||||
process.stdin.resume();
|
||||
process.stdout.write("prompt> ");
|
||||
process.on("SIGWINCH", () => {
|
||||
process.stdout.write(
|
||||
`resize:${String(process.stdout.columns)}x${String(process.stdout.rows)}\n`,
|
||||
);
|
||||
});
|
||||
process.on("SIGINT", () => {
|
||||
process.stdout.write("signal:SIGINT\n");
|
||||
process.exit(0);
|
||||
});
|
||||
process.stdin.on("data", (value) => {
|
||||
process.stdout.write(`input:${value.toString()} unicode:雪\n`);
|
||||
});
|
||||
} else if (mode === "partial") {
|
||||
process.stdout.write("partial-");
|
||||
setTimeout(() => {
|
||||
process.stdout.write("frame\n");
|
||||
process.exit(0);
|
||||
}, 25);
|
||||
} else if (mode === "tree-child") {
|
||||
spawn(process.execPath, [process.argv[1], "tree-grandchild"], {
|
||||
stdio: "ignore",
|
||||
});
|
||||
setInterval(() => undefined, 1_000);
|
||||
} else if (mode === "tree-grandchild") {
|
||||
setInterval(() => undefined, 1_000);
|
||||
} else if (mode === "tree") {
|
||||
spawn(process.execPath, [process.argv[1], "tree-child"], { stdio: "ignore" });
|
||||
process.stdout.write("tree-ready\n");
|
||||
setInterval(() => undefined, 1_000);
|
||||
} else if (mode === "crash") {
|
||||
process.stderr.write("intentional-crash\n");
|
||||
process.exit(23);
|
||||
} else if (mode === "hang") {
|
||||
setInterval(() => undefined, 1_000);
|
||||
} else {
|
||||
process.stderr.write("unknown fixture mode\n");
|
||||
process.exit(2);
|
||||
}
|
||||
Reference in New Issue
Block a user