refactor: return complete analysis results inline
This commit is contained in:
@@ -291,7 +291,6 @@ def diagnostic(
|
||||
(0, False, "") if capture is None else capture.snapshot()
|
||||
)
|
||||
return {
|
||||
"schema_version": 1,
|
||||
"component": "hopper_private_display",
|
||||
"operation": operation,
|
||||
"status": status,
|
||||
|
||||
@@ -42,7 +42,6 @@ const duplicateOriginStorage = (origin) => ({
|
||||
/** Build the source-owned full-capture browser scenario. */
|
||||
export function browserScenario(browser, origin) {
|
||||
return browserScenarioSchema.parse({
|
||||
schema_version: 1,
|
||||
browser,
|
||||
start_url: { url: `${origin}/app`, query: [] },
|
||||
allowed_origins: [origin],
|
||||
|
||||
@@ -22,7 +22,6 @@ const completionClaim = ({
|
||||
parameters: {
|
||||
scenario_id: scenarioId,
|
||||
scenario_version: 1,
|
||||
result_schema_version: 1,
|
||||
artifact_sha256s: artifactSha256s,
|
||||
},
|
||||
result: { status },
|
||||
@@ -37,7 +36,6 @@ const completionClaim = ({
|
||||
id: COMPLETION_PROVIDER.id,
|
||||
version: COMPLETION_PROVIDER.version,
|
||||
},
|
||||
result_schema_version: 1,
|
||||
status,
|
||||
evidence_ids: [evidence.evidence_id],
|
||||
};
|
||||
@@ -151,7 +149,6 @@ const optionalClaims = ({ operatorManifest, ilspyOracle }) => [
|
||||
|
||||
/** Project completed managed assertions into the standard verifier report. */
|
||||
export const createManagedCompletionReport = (input, verifierRun) => ({
|
||||
schema_version: 1,
|
||||
verifier: {
|
||||
id: COMPLETION_PROVIDER.id,
|
||||
version: COMPLETION_PROVIDER.version,
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
export function parseManagedAppManifest(rawManifest) {
|
||||
const manifest = object(rawManifest, "manifest");
|
||||
ensure(
|
||||
manifest.schema_version === 1,
|
||||
"manifest.schema_version must be exactly 1",
|
||||
);
|
||||
const target = object(manifest.target, "manifest.target");
|
||||
const methods = array(manifest.methods, "manifest.methods");
|
||||
ensure(manifest.methods.length > 0, "manifest.methods must not be empty");
|
||||
return {
|
||||
schema_version: 1,
|
||||
label: optionalString(manifest.label, "manifest.label"),
|
||||
target: {
|
||||
path: string(target.path, "manifest.target.path"),
|
||||
|
||||
@@ -43,7 +43,6 @@ async function runManagedAppManifestSelfTest(context) {
|
||||
assert.ok(method);
|
||||
const summary = await context.verifyManagedAppManifest(
|
||||
{
|
||||
schema_version: 1,
|
||||
label: "source-owned manifest verifier self-test",
|
||||
target: {
|
||||
path: sample.path,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export interface VerifierRunStart {
|
||||
readonly schema_version: 1;
|
||||
readonly run_id: string;
|
||||
readonly verifier_pid: number;
|
||||
readonly parent_pid: number;
|
||||
@@ -14,7 +13,6 @@ export interface VerifierRunDescendant {
|
||||
export type VerifierProcessLineage =
|
||||
| {
|
||||
readonly status: "verified";
|
||||
readonly schema_version: 1;
|
||||
readonly observed_at: string;
|
||||
readonly launcher_pid: number;
|
||||
readonly launcher_parent_pid: number;
|
||||
|
||||
@@ -11,7 +11,6 @@ export const createVerifierRun = () => {
|
||||
return activeVerifierRun;
|
||||
}
|
||||
activeVerifierRun = Object.freeze({
|
||||
schema_version: 1,
|
||||
run_id: randomUUID(),
|
||||
verifier_pid: process.pid,
|
||||
parent_pid: process.ppid,
|
||||
@@ -85,7 +84,6 @@ const observeVerifierLineage = async (run, observedAt) => {
|
||||
}
|
||||
return {
|
||||
status: "verified",
|
||||
schema_version: 1,
|
||||
observed_at: observedAt,
|
||||
launcher_pid: run.verifier_pid,
|
||||
launcher_parent_pid: run.parent_pid,
|
||||
|
||||
@@ -5,7 +5,6 @@ const REQUIRED_HELP_COMMANDS = [
|
||||
"upgrade",
|
||||
"inventory-artifact",
|
||||
"extract-artifact",
|
||||
"investigate-versions",
|
||||
"import-reference-source",
|
||||
"list-browser-targets",
|
||||
"inspect-web-page",
|
||||
|
||||
@@ -20,7 +20,6 @@ const applicationRoot =
|
||||
const applicationPath =
|
||||
process.env.REA_ELECTRON_APPLICATION_PATH ?? join(applicationRoot, "main.js");
|
||||
const input = electronActiveObservationInputSchema.parse({
|
||||
schema_version: 1,
|
||||
executable_path: executable,
|
||||
application_path: applicationPath,
|
||||
application_root: applicationRoot,
|
||||
|
||||
@@ -71,7 +71,6 @@ try {
|
||||
throw new Error("Real Node Inspector capture was incomplete");
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
schema_version: 1,
|
||||
status: "pass",
|
||||
provider: observed.provider.id,
|
||||
target_id: target.target_id,
|
||||
|
||||
@@ -157,7 +157,6 @@ try {
|
||||
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
schema_version: 1,
|
||||
status: cliReport.status,
|
||||
report_id: cliReport.report_id,
|
||||
report_digest: cliReport.report_digest,
|
||||
|
||||
Reference in New Issue
Block a user