jackwener/maka-agent

eval: make the egress audit log complete or fail closed

Chiusa

#2959 aperta il 13 ago 2026

 (2 commenti) (0 reazioni) (1 assegnatario)TypeScript (0 fork)github user discovery
good first issuehelp wanted

Metriche repository

Star
 (1 stella)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor