jackwener/maka-agent

eval: make the egress audit log complete or fail closed

已關閉

#2,959 建立於 2026年8月13日

 (2 則留言) (0 個反應) (1 位負責人)TypeScript (0 個分叉)github user discovery
good first issuehelp wanted

倉庫指標

星標
 (1 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南