refactor(managed): group capability workflows and verification (#926)
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
AnalysisInputError,
|
||||
AnalysisProtocolError,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import { type AnalysisError } from "../../domain/analysisErrorBase.js";
|
||||
import { createEvidence, type Evidence } from "../../domain/evidence.js";
|
||||
import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
import {
|
||||
managedApplicationGraphResultSchema,
|
||||
projectManagedApplicationGraph,
|
||||
projectManagedApplicationGraphInputSchema,
|
||||
type ManagedApplicationGraphResult,
|
||||
type ProjectManagedApplicationGraphInput,
|
||||
} from "../../domain/managed/managedApplicationGraph.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
import { MANAGED_WORKFLOW_PROVIDER } from "../InvestigationProviders.js";
|
||||
|
||||
const OPERATION = "project_managed_application_graph" as const;
|
||||
|
||||
/** Project authenticated managed Evidence into a provider-neutral graph. */
|
||||
export const projectManagedApplicationGraphEvidence = (
|
||||
rawInput: unknown,
|
||||
): Result<Evidence, AnalysisError> => {
|
||||
const parsed = projectManagedApplicationGraphInputSchema.safeParse(rawInput);
|
||||
if (!parsed.success)
|
||||
return err(new AnalysisInputError(OPERATION, { cause: parsed.error }));
|
||||
try {
|
||||
const result = projectManagedApplicationGraph(parsed.data);
|
||||
return ok(createManagedApplicationGraphEvidence(parsed.data, result));
|
||||
} catch (cause: unknown) {
|
||||
return err(
|
||||
cause instanceof TypeError || cause instanceof z.ZodError
|
||||
? new AnalysisInputError(OPERATION, { cause })
|
||||
: new AnalysisProtocolError(
|
||||
"Managed application graph projection produced an invalid result",
|
||||
{ cause },
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const createManagedApplicationGraphEvidence = (
|
||||
input: ProjectManagedApplicationGraphInput,
|
||||
result: ManagedApplicationGraphResult,
|
||||
): Evidence =>
|
||||
createEvidence(subjectTarget(input), MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-application-graph",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
managed_artifact_evidence_id: input.managed_artifact?.evidence_id ?? null,
|
||||
managed_members_evidence_id: input.managed_members?.evidence_id ?? null,
|
||||
managed_native_boundaries_evidence_id:
|
||||
input.managed_native_boundaries?.evidence_id ?? null,
|
||||
},
|
||||
result: jsonValueSchema.parse(
|
||||
managedApplicationGraphResultSchema.parse(result),
|
||||
),
|
||||
rawResult: null,
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
environment: null,
|
||||
limitations: result.limitations,
|
||||
evidenceLinks: result.evidence_links,
|
||||
});
|
||||
|
||||
const subjectTarget = (
|
||||
input: ProjectManagedApplicationGraphInput,
|
||||
):
|
||||
| {
|
||||
readonly path: string;
|
||||
readonly sha256: string;
|
||||
readonly format: "pe";
|
||||
readonly architecture?: "x86" | "x86_64" | "arm" | "arm64";
|
||||
}
|
||||
| undefined => {
|
||||
const subject =
|
||||
input.managed_artifact?.subject ??
|
||||
input.managed_members?.subject ??
|
||||
input.managed_native_boundaries?.subject;
|
||||
if (subject === undefined || subject === null || subject.format !== "pe")
|
||||
return undefined;
|
||||
return {
|
||||
path: subject.local_path,
|
||||
sha256: subject.digest.sha256,
|
||||
format: "pe",
|
||||
...(subject.architecture === null
|
||||
? {}
|
||||
: { architecture: subject.architecture }),
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,183 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
compareManagedMembers,
|
||||
managedMemberComparisonResultSchema,
|
||||
parseManagedMemberEvidence,
|
||||
type CompareManagedMembersInput,
|
||||
} from "../../domain/managed/managedMemberComparison.js";
|
||||
import {
|
||||
AnalysisInputError,
|
||||
AnalysisProtocolError,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import { EvidenceIntegrityError } from "../../domain/evidenceErrors.js";
|
||||
import { type AnalysisError } from "../../domain/analysisErrorBase.js";
|
||||
import { createEvidence, type Evidence } from "../../domain/evidence.js";
|
||||
import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
import { parseBinaryTarget } from "../BinaryTargetResolver.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
import { inspectManagedMembersBytes } from "../../dotnet/ManagedMemberInspector.js";
|
||||
import {
|
||||
MANAGED_STATIC_PROVIDER,
|
||||
MANAGED_WORKFLOW_PROVIDER,
|
||||
} from "../InvestigationProviders.js";
|
||||
|
||||
/** Compare managed members from input parsed by a trusted adapter. */
|
||||
export const compareManagedMembersEvidenceValidated = (
|
||||
input: CompareManagedMembersInput,
|
||||
): Result<Evidence, AnalysisError> => {
|
||||
const operation = "compare_managed_members";
|
||||
try {
|
||||
const left = parseManagedMemberEvidence(input.left);
|
||||
const right = parseManagedMemberEvidence(input.right);
|
||||
const result = compareManagedMembers(
|
||||
{ evidenceId: left.evidenceId, result: left.result },
|
||||
{ evidenceId: right.evidenceId, result: right.result },
|
||||
);
|
||||
return ok(createManagedMemberComparisonEvidence(input, result));
|
||||
} catch (cause: unknown) {
|
||||
return workflowFailure(operation, cause);
|
||||
}
|
||||
};
|
||||
|
||||
interface ManagedMemberComparisonPathDependencies {
|
||||
readonly resolveTarget: typeof parseBinaryTarget;
|
||||
readonly readBytes: (path: string) => Promise<Buffer>;
|
||||
}
|
||||
|
||||
const DEFAULT_PATH_DEPENDENCIES: ManagedMemberComparisonPathDependencies = {
|
||||
resolveTarget: parseBinaryTarget,
|
||||
readBytes: readFile,
|
||||
};
|
||||
|
||||
/** Inspect two local PE artifacts and return one derived comparison Evidence. */
|
||||
export const compareManagedMemberPaths = async (
|
||||
input: {
|
||||
readonly leftPath: string;
|
||||
readonly rightPath: string;
|
||||
},
|
||||
dependencies: ManagedMemberComparisonPathDependencies = DEFAULT_PATH_DEPENDENCIES,
|
||||
): Promise<Result<Evidence, AnalysisError>> => {
|
||||
const operation = "compare_managed_members";
|
||||
try {
|
||||
const [leftTarget, rightTarget] = await Promise.all([
|
||||
dependencies.resolveTarget(input.leftPath),
|
||||
dependencies.resolveTarget(input.rightPath),
|
||||
]);
|
||||
if (!leftTarget.ok)
|
||||
return err(
|
||||
new AnalysisInputError(operation, { cause: leftTarget.error }),
|
||||
);
|
||||
if (!rightTarget.ok)
|
||||
return err(
|
||||
new AnalysisInputError(operation, { cause: rightTarget.error }),
|
||||
);
|
||||
const [leftBytes, rightBytes] = await Promise.all([
|
||||
dependencies.readBytes(leftTarget.value.path),
|
||||
dependencies.readBytes(rightTarget.value.path),
|
||||
]);
|
||||
for (const [target, bytes] of [
|
||||
[leftTarget.value, leftBytes],
|
||||
[rightTarget.value, rightBytes],
|
||||
] as const) {
|
||||
const observedSha256 = createHash("sha256").update(bytes).digest("hex");
|
||||
if (observedSha256 !== target.sha256)
|
||||
return err(
|
||||
new EvidenceIntegrityError(
|
||||
`Managed artifact digest changed after open: expected ${target.sha256}, observed ${observedSha256} at ${target.path}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
const leftInspection = inspectManagedMembersBytes(
|
||||
leftBytes,
|
||||
leftTarget.value,
|
||||
);
|
||||
const rightInspection = inspectManagedMembersBytes(
|
||||
rightBytes,
|
||||
rightTarget.value,
|
||||
);
|
||||
const leftEvidence = createEvidence(
|
||||
leftTarget.value,
|
||||
MANAGED_STATIC_PROVIDER,
|
||||
{
|
||||
operation: "inspect_managed_members",
|
||||
parameters: {},
|
||||
result: jsonValueSchema.parse(leftInspection),
|
||||
rawResult: null,
|
||||
limitations: leftInspection.limitations,
|
||||
locations: [{ kind: "artifact-path", path: leftTarget.value.path }],
|
||||
},
|
||||
);
|
||||
const rightEvidence = createEvidence(
|
||||
rightTarget.value,
|
||||
MANAGED_STATIC_PROVIDER,
|
||||
{
|
||||
operation: "inspect_managed_members",
|
||||
parameters: {},
|
||||
result: jsonValueSchema.parse(rightInspection),
|
||||
rawResult: null,
|
||||
limitations: rightInspection.limitations,
|
||||
locations: [{ kind: "artifact-path", path: rightTarget.value.path }],
|
||||
},
|
||||
);
|
||||
const result = compareManagedMembers(
|
||||
{
|
||||
evidenceId: leftEvidence.evidence_id,
|
||||
result: leftInspection,
|
||||
},
|
||||
{
|
||||
evidenceId: rightEvidence.evidence_id,
|
||||
result: rightInspection,
|
||||
},
|
||||
);
|
||||
return ok(
|
||||
createManagedMemberComparisonEvidence(
|
||||
{
|
||||
left: leftEvidence,
|
||||
right: rightEvidence,
|
||||
},
|
||||
result,
|
||||
),
|
||||
);
|
||||
} catch (cause: unknown) {
|
||||
return workflowFailure(operation, cause);
|
||||
}
|
||||
};
|
||||
|
||||
/** ECMA-335 representable limits for path-based member comparison. */
|
||||
|
||||
const createManagedMemberComparisonEvidence = (
|
||||
parameters: Pick<CompareManagedMembersInput, "left" | "right">,
|
||||
result: z.infer<typeof managedMemberComparisonResultSchema>,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-member-comparison",
|
||||
operation: "compare_managed_members",
|
||||
parameters: {
|
||||
left_evidence_id: parameters.left.evidence_id,
|
||||
right_evidence_id: parameters.right.evidence_id,
|
||||
},
|
||||
result: jsonValueSchema.parse(result),
|
||||
rawResult: null,
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
environment: null,
|
||||
limitations: result.limitations,
|
||||
evidenceLinks: result.evidence_links,
|
||||
});
|
||||
|
||||
const workflowFailure = (
|
||||
operation: string,
|
||||
cause: unknown,
|
||||
): Result<never, AnalysisError> =>
|
||||
err(
|
||||
cause instanceof z.ZodError || cause instanceof TypeError
|
||||
? new AnalysisInputError(operation, { cause })
|
||||
: new AnalysisProtocolError(
|
||||
"Managed member comparison produced an invalid result",
|
||||
{ cause },
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,63 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
AnalysisInputError,
|
||||
AnalysisProtocolError,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import { type AnalysisError } from "../../domain/analysisErrorBase.js";
|
||||
import { createEvidence, type Evidence } from "../../domain/evidence.js";
|
||||
import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
import {
|
||||
managedNativeVerificationInputSchema,
|
||||
verifyManagedNativeBoundaries,
|
||||
type ManagedNativeVerificationInput,
|
||||
type ManagedNativeVerificationResult,
|
||||
} from "../../domain/managed/managedNativeVerification.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
import { MANAGED_WORKFLOW_PROVIDER } from "../InvestigationProviders.js";
|
||||
|
||||
const OPERATION = "verify_managed_native_boundaries" as const;
|
||||
|
||||
/** Verify managed/native boundary declarations against native Evidence. */
|
||||
export const verifyManagedNativeBoundariesEvidence = (
|
||||
rawInput: unknown,
|
||||
): Result<Evidence, AnalysisError> => {
|
||||
const parsed = managedNativeVerificationInputSchema.safeParse(rawInput);
|
||||
if (!parsed.success)
|
||||
return err(new AnalysisInputError(OPERATION, { cause: parsed.error }));
|
||||
try {
|
||||
const result = verifyManagedNativeBoundaries(parsed.data);
|
||||
return ok(createManagedNativeVerificationEvidence(parsed.data, result));
|
||||
} catch (cause: unknown) {
|
||||
return err(
|
||||
cause instanceof TypeError || cause instanceof z.ZodError
|
||||
? new AnalysisInputError(OPERATION, { cause })
|
||||
: new AnalysisProtocolError(
|
||||
"Managed/native verification produced an invalid result",
|
||||
{ cause },
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const createManagedNativeVerificationEvidence = (
|
||||
input: ManagedNativeVerificationInput,
|
||||
result: ManagedNativeVerificationResult,
|
||||
): Evidence =>
|
||||
createEvidence(undefined, MANAGED_WORKFLOW_PROVIDER, {
|
||||
predicateType: "rea.managed-native-verification",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
managed_boundaries_evidence_id: input.managed_boundaries.evidence_id,
|
||||
native_evidence_ids: jsonValueSchema.parse(
|
||||
input.native_observations.map(({ evidence_id: id }) => id),
|
||||
),
|
||||
},
|
||||
result: jsonValueSchema.parse(result),
|
||||
rawResult: null,
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
environment: null,
|
||||
limitations: result.limitations,
|
||||
evidenceLinks: result.evidence_links,
|
||||
});
|
||||
@@ -0,0 +1,173 @@
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE } from "../../contracts/managed/managedWorkflowExamples.js";
|
||||
import {
|
||||
importManagedReconstruction,
|
||||
managedReconstructionImportInputSchema,
|
||||
} from "../../domain/managed/managedReconstruction.js";
|
||||
import { managedMemberInspectionSchema } from "../../domain/managed/managedArtifact.js";
|
||||
import { createEvidence } from "../../domain/evidence.js";
|
||||
import { importManagedReconstructionEvidence } from "./ManagedReconstructionService.js";
|
||||
|
||||
const exampleInput = () =>
|
||||
managedReconstructionImportInputSchema.parse(
|
||||
MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE,
|
||||
);
|
||||
|
||||
const exampleMethod = () => {
|
||||
const method = exampleInput().methods[0];
|
||||
if (method === undefined) throw new Error("missing example method");
|
||||
return method;
|
||||
};
|
||||
|
||||
describe("managed decompiler reconstruction import", () => {
|
||||
it("imports decompiler output as inference locked to static IL evidence", () => {
|
||||
const result = importManagedReconstruction(exampleInput());
|
||||
|
||||
expect(result).toMatchObject({
|
||||
phase: "reconstruction-import",
|
||||
executed: false,
|
||||
static_observation: {
|
||||
artifact_sha256: "2".repeat(64),
|
||||
mvid: "11112222-3333-4444-9555-666677778888",
|
||||
},
|
||||
decompiler: {
|
||||
name: "ilspycmd",
|
||||
version: "9.1.0.7988",
|
||||
family: "ilspy",
|
||||
},
|
||||
summary: {
|
||||
imported_methods: 1,
|
||||
decompiled_csharp_methods: 1,
|
||||
},
|
||||
methods: [
|
||||
{
|
||||
token: "0x06000001",
|
||||
signature_sha256: "3".repeat(64),
|
||||
normalized_il_sha256: "5".repeat(64),
|
||||
validation: {
|
||||
matched_static_member: true,
|
||||
exact_build_required: true,
|
||||
canonical_observation: false,
|
||||
confidence_floor: "inference",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
expect(result.reconstruction_id).toMatch(/^mre_[a-f0-9]{64}$/u);
|
||||
expect(result.methods[0]?.reconstruction.text_sha256).toBe(
|
||||
createHash("sha256")
|
||||
.update("internal static void Main() { }")
|
||||
.digest("hex"),
|
||||
);
|
||||
expect(result.limitations.join(" ")).toContain(
|
||||
"metadata and IL observations remain canonical",
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects reconstruction text hash drift", () => {
|
||||
expect(() =>
|
||||
importManagedReconstruction({
|
||||
...exampleInput(),
|
||||
methods: [
|
||||
{
|
||||
...exampleMethod(),
|
||||
reconstruction: {
|
||||
...exampleMethod().reconstruction,
|
||||
text_sha256: "0".repeat(64),
|
||||
},
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toThrow(/text hash mismatch/u);
|
||||
});
|
||||
|
||||
it("rejects stale method locks", () => {
|
||||
expect(() =>
|
||||
importManagedReconstruction({
|
||||
...exampleInput(),
|
||||
methods: [
|
||||
{
|
||||
...exampleMethod(),
|
||||
normalized_il_sha256: "6".repeat(64),
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toThrow(/does not match/u);
|
||||
});
|
||||
|
||||
it("rejects reconstruction locks for partial CIL without normalized identity", () => {
|
||||
const input = exampleInput();
|
||||
const observed = managedMemberInspectionSchema.parse(
|
||||
input.static_members.normalized_result,
|
||||
);
|
||||
const method = observed.methods[0];
|
||||
if (method === undefined) throw new Error("missing observed method");
|
||||
const partial = {
|
||||
...observed,
|
||||
methods: [
|
||||
{
|
||||
...method,
|
||||
body: {
|
||||
...method.body,
|
||||
status: "partial" as const,
|
||||
normalized_il_sha256: null,
|
||||
truncated_instructions: 1,
|
||||
issue: "instruction limit reached",
|
||||
},
|
||||
},
|
||||
],
|
||||
coverage: { state: "partial" as const, issues: [] },
|
||||
};
|
||||
const partialEvidence = createEvidence(
|
||||
undefined,
|
||||
input.static_members.provider,
|
||||
{
|
||||
operation: "inspect_managed_members",
|
||||
parameters: {},
|
||||
result: partial,
|
||||
rawResult: null,
|
||||
limitations: partial.limitations,
|
||||
},
|
||||
);
|
||||
|
||||
expect(() =>
|
||||
importManagedReconstruction({
|
||||
...input,
|
||||
static_members: partialEvidence,
|
||||
methods: [
|
||||
{
|
||||
...exampleMethod(),
|
||||
normalized_il_sha256: null,
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toThrow(/does not match/u);
|
||||
});
|
||||
|
||||
it("wraps imported reconstruction in Evidence", () => {
|
||||
const evidence = importManagedReconstructionEvidence(exampleInput());
|
||||
|
||||
expect(evidence.ok).toBe(true);
|
||||
if (!evidence.ok) return;
|
||||
expect(evidence.value).toMatchObject({
|
||||
operation: "import_managed_reconstruction",
|
||||
provider: { id: "rea-dotnet-workflows" },
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
normalized_result: {
|
||||
phase: "reconstruction-import",
|
||||
methods: [
|
||||
{
|
||||
reconstruction: {
|
||||
kind: "decompiled-csharp",
|
||||
language: "csharp",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,92 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
AnalysisInputError,
|
||||
AnalysisProtocolError,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import { type AnalysisError } from "../../domain/analysisErrorBase.js";
|
||||
import { createEvidence, type Evidence } from "../../domain/evidence.js";
|
||||
import { jsonValueSchema } from "../../domain/jsonValue.js";
|
||||
import {
|
||||
importManagedReconstruction,
|
||||
managedReconstructionImportInputSchema,
|
||||
type ManagedReconstructionImportInput,
|
||||
type ManagedReconstructionImportResult,
|
||||
} from "../../domain/managed/managedReconstruction.js";
|
||||
import { err, ok, type Result } from "../../domain/result.js";
|
||||
import { MANAGED_WORKFLOW_PROVIDER } from "../InvestigationProviders.js";
|
||||
|
||||
const OPERATION = "import_managed_reconstruction" as const;
|
||||
|
||||
/** Authenticate and import managed decompiler reconstruction as Evidence. */
|
||||
export const importManagedReconstructionEvidence = (
|
||||
rawInput: unknown,
|
||||
): Result<Evidence, AnalysisError> => {
|
||||
const parsed = managedReconstructionImportInputSchema.safeParse(rawInput);
|
||||
if (!parsed.success)
|
||||
return err(new AnalysisInputError(OPERATION, { cause: parsed.error }));
|
||||
return importManagedReconstructionEvidenceValidated(parsed.data);
|
||||
};
|
||||
|
||||
/** Import reconstruction from input parsed by a trusted adapter. */
|
||||
export const importManagedReconstructionEvidenceValidated = (
|
||||
input: ManagedReconstructionImportInput,
|
||||
): Result<Evidence, AnalysisError> => {
|
||||
try {
|
||||
const result = importManagedReconstruction(input);
|
||||
return ok(createManagedReconstructionEvidence(input, result));
|
||||
} catch (cause: unknown) {
|
||||
return err(
|
||||
cause instanceof TypeError || cause instanceof z.ZodError
|
||||
? new AnalysisInputError(OPERATION, { cause })
|
||||
: new AnalysisProtocolError(
|
||||
"Managed reconstruction import produced an invalid result",
|
||||
{ cause },
|
||||
),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const createManagedReconstructionEvidence = (
|
||||
input: ManagedReconstructionImportInput,
|
||||
result: ManagedReconstructionImportResult,
|
||||
): Evidence =>
|
||||
createEvidence(
|
||||
{
|
||||
path: result.static_observation.artifact_path,
|
||||
sha256: result.static_observation.artifact_sha256,
|
||||
format: "pe",
|
||||
},
|
||||
MANAGED_WORKFLOW_PROVIDER,
|
||||
{
|
||||
predicateType: "rea.managed-reconstruction-import",
|
||||
operation: OPERATION,
|
||||
parameters: {
|
||||
static_members_evidence_id: input.static_members.evidence_id,
|
||||
decompiler: jsonValueSchema.parse(result.decompiler),
|
||||
method_locks: jsonValueSchema.parse(
|
||||
input.methods.map(
|
||||
({ token, signature_sha256, normalized_il_sha256 }) => ({
|
||||
token,
|
||||
signature_sha256,
|
||||
normalized_il_sha256,
|
||||
}),
|
||||
),
|
||||
),
|
||||
notes: jsonValueSchema.parse(input.notes),
|
||||
},
|
||||
result: jsonValueSchema.parse(result),
|
||||
rawResult: null,
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
environment: null,
|
||||
limitations: result.limitations,
|
||||
locations: [
|
||||
{
|
||||
kind: "artifact-path",
|
||||
path: result.static_observation.artifact_path,
|
||||
},
|
||||
],
|
||||
evidenceLinks: result.evidence_links,
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user