[
{
"name": "unknown fields accepted (secrets could leak in)",
"file": "src/events.ts",
"find": "if (!(k in spec) && !['type', 'job_id', 'at'].includes(k)) throw",
"replace": "if (false) throw"
},
{
"name": "required fields not enforced",
"file": "src/events.ts",
"find": "if (required) throw new EventError",
"replace": "if (false) throw new EventError"
},
{
"name": "hash chain not checked on read",
"file": "src/events.ts",
"find": "if (hash !== hashOf(event as TenderEvent, seq, p)) throw",
"replace": "if (false) throw"
},
{
"name": "order and removal not checked on read",
"file": "src/events.ts",
"find": "if (seq !== i + 1 || p !== prev) throw",
"replace": "if (false) throw"
},
{
"name": "stream rewritten instead of appended",
"file": "src/events.ts",
"find": "{ flag: 'a' }",
"replace": "{ flag: 'w' }"
},
{
"name": "bid without airlock not flagged",
"file": "src/events.ts",
"find": "if (e.type === 'bid' && !airlock) add",
"replace": "if (false) add"
},
{
"name": "payment without acceptance not flagged",
"file": "src/events.ts",
"find": "if (e.type === 'payment' && review?.verdict !== 'accepted') add",
"replace": "if (false) add"
},
{
"name": "anomalies ignore the day cut off",
"file": "src/events.ts",
"find": "const evs = events.filter((e) => Date.parse(e.at) <= until);",
"replace": "const evs = events;"
},
{
"name": "report counts every day, not just this day",
"file": "src/events.ts",
"find": "const today = events.filter((e) => dayOfIso(e.at) === day);",
"replace": "const today = events;"
},
{
"name": "negative USDC accepted",
"file": "src/events.ts",
"find": "!Number.isFinite(v) || v < 0 || v > 1e9",
"replace": "!Number.isFinite(v)"
}
]agentgate-source: code mirror on Cloudflare Pages. All repos