Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

993 B
Raw Blame
import type { AnalysisError } from "../../domain/analysisErrorBase.js";
import { projectHarmonyInventory } from "../../domain/harmony/harmonyApplication.js";
import type { Result } from "../../domain/result.js";
import { HARMONY_APPLICATION_PROVIDER } from "../InvestigationProviders.js";
import {
  projectInventoryEvidence,
  type InventoryProjectionEvidenceResult,
} from "../InventoryProjectionEvidence.js";

const OPERATION = "project_harmony_application_graph" as const;

/** Project authenticated HarmonyOS package inventory Evidence into application evidence. */
export const projectHarmonyApplicationEvidence = (
  rawInput: unknown,
): Result<InventoryProjectionEvidenceResult, AnalysisError> => {
  return projectInventoryEvidence({
    rawInput,
    project: projectHarmonyInventory,
    operation: OPERATION,
    predicateType: "rea.harmony-application-graph",
    provider: HARMONY_APPLICATION_PROVIDER,
    subjectFormat: (first) => first.subject?.format ?? "unknown",
  });
};