jackwener/maka-agent

eval: make the egress audit log complete or fail closed

クローズ

#2,959 opened on 2026/08/13

 (2 件のコメント) (0 件のリアクション) (1 人の担当者)TypeScript (0 件のフォーク)github user discovery
good first issuehelp wanted

Repository metrics

Stars
 (1 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Context

PR #2947 archives the egress audit log by sha256 as attempt evidence (harness-executor.ts:836). Two paths let that evidence be silently incomplete or absent while verification still passes, which overstates what the artifact proves.

1. The audit log truncates without a marker

egress_filter.py:130-131 stops writing once the file reaches MAX_AUDIT_BYTES (1 MiB) and returns without recording that truncation happened. A consumer reading the archived log cannot distinguish "no further hits" from "stopped recording".

Fix: write one terminal record — e.g. {"ruleId": "audit_truncated"} — when the limit is reached.

2. A missing audit file passes verification

harness-executor.ts:693 reads the audit path with .catch(() => undefined). If the proxy never ran or the artifact download failed, verification completes normally and the attempt record carries no signal that no audit exists.

Fix: record an explicit egress-audit-missing entry in the artifacts, or treat the cell as infra_failed — for a mechanism whose value is "provably uncontaminated", absent evidence should not read the same as clean evidence.

Note: harness-executor.ts:707 also writes the audit sha256 without the sha256: prefix used by collectedArtifactInventory, so consumers need a special case. Worth aligning while touching this.

コントリビューターガイド