Reviewed code6d91c8a4f0
id: string) { const hit = cache.get(id); if (hit) return hit; const row = await load(id); requireAccount(actor, row);Cached invoices bypass the account check. Ran npm test -- invoice-access.test.ts with separate accounts sharing a cache. Loaded an invoice as its owner, then requested the same id from the other account. The request returned the cached invoice without calling requireAccount. The test expected access to be denied and failed.

Marshal deep review: needs_human
Reviewed the shared invoice cache, which returns cached invoices before the account check.
Specifications: velnora-lab/service-contracts@
5db7ca4(main at review start)Findings (1)
HIGH · Confidence: HIGH ·
src/services/read-invoice.ts:44-45Cached invoices bypass the account check.
Ran npm test -- invoice-access.test.ts with separate accounts sharing a cache. Loaded an invoice as its owner, then requested the same id from the other account. The request returned the cached invoice without calling requireAccount. The test expected access to be denied and failed.
src/services/read-invoice.ts:44–45 · lines 40 to 49 ·
>marks reported linesFinding id:
e7b4c9a2To accept a finding, reply with
@cowboy-marshal IGNORE <id>. To mark it fixed, use@cowboy-marshal FIXED <id>. The mention may also follow the command. Put each command on its own line; all commands in your reply are processed.