Prepare receipt-bound audit E2 third attempt

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a02991-be07-7bb3-8b6d-e9701b5621de
This commit is contained in:
tegwick 2026-08-22 23:23:48 +02:00
parent 0525e632d7
commit 96d6781036
12 changed files with 440 additions and 27 deletions

View file

@ -183,10 +183,36 @@ def invocation_fixture_ids(args: argparse.Namespace) -> set[str]:
}
def build_report(args: argparse.Namespace, *, started: str, outcome: str,
attempted_operations: int, results: list[dict[str, Any]],
limitations: list[str]) -> dict[str, Any]:
return {
"schema_version": "whitehat-run/v1",
"run_id": f"{args.engagement_id}-{started}",
"evidence_class": "target",
"engagement_id": args.engagement_id,
"authorization_id": args.authorization_id,
"target": "audit-core",
"target_revision": args.target_revision,
"posture_claim": "implemented E2; currently evidenced E1",
"attacker_model": "E2-authenticated-tenant-a",
"started_at": started,
"ended_at": now(),
"outcome": outcome,
"attempted_operations": attempted_operations,
"cleanup": "named immutable audit fixtures retained by target contract",
"credential_revocation": "pending orchestrator cleanup",
"probes": results,
"limitations": limitations,
"assurance_statement": ASSURANCE,
}
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--base-url", required=True)
parser.add_argument("--engagement-id", required=True)
parser.add_argument("--authorization-id", required=True)
parser.add_argument("--target-revision", required=True)
parser.add_argument("--token-a-file", required=True)
parser.add_argument("--token-b-file", required=True)
@ -278,26 +304,14 @@ def main() -> None:
except Abort as error:
outcome = "aborted"
limitations.append(str(error))
report = {
"schema_version": "whitehat-run/v1",
"run_id": f"{args.engagement_id}-{started}",
"evidence_class": "target",
"engagement_id": args.engagement_id,
"authorization_id": "operator-session-2026-08-21-e2-approval",
"target": "audit-core",
"target_revision": args.target_revision,
"posture_claim": "implemented E2; currently evidenced E1",
"attacker_model": "E2-authenticated-tenant-a",
"started_at": started,
"ended_at": now(),
"outcome": outcome,
"attempted_operations": client.requests,
"cleanup": "named immutable audit fixtures retained by target contract",
"credential_revocation": "pending orchestrator cleanup",
"probes": results,
"limitations": limitations,
"assurance_statement": ASSURANCE,
}
report = build_report(
args,
started=started,
outcome=outcome,
attempted_operations=client.requests,
results=results,
limitations=limitations,
)
print(json.dumps(report, sort_keys=True))
raise SystemExit(0 if outcome == "pass" else 1)