Every pay is checked before it lands. The edge rate-limits, caps body size, and answers with hardened headers. A live security map shows the defense posture — no secrets, no guesswork.
Security update
Three layers moved together: the pay path checks harder before a debit lands, the Worker rejects abuse earlier, and the dashboard shows a live defense map without opening DevTools.
Stronger pre-accept checks, idempotent pays, cleaner failure paths so partial writes are rare.
Rate limits, body caps, timing-safe admin secrets, tighter CORS and session handling.
Public GET /api/security/status. Dashboard Safety section mirrors tier, budgets, and gates.
Ledger · Pay path
Payments are the highest-risk surface. The update tightens what must be true before money moves, and what happens when a write fails mid-flight.
Amount bounds, repo shape, and auth are validated before any balance touch. The safety gate still runs wallet lock, velocity, daily cap, policy, and Edge Shield — one blocked condition stops the debit.
Clients may send Idempotency-Key on pay.
The same key returns the original outcome instead of posting a second transfer
when the network retries or the agent replays.
Partial writes are less likely: debit and ledger insert are ordered so a failed step does not leave a silent half-state. Errors return explicit codes the dashboard and agents can branch on.
Worker · API surface
Before a request reaches ledger logic, the edge already caps size, counts POSTs, and refuses casual probing.
Every IP shares a fixed window of POSTs. Heavy clients hit 429 before they can flood pay, escrow, or admin routes.
Content-Length is checked early. Oversized JSON never reaches the parser.
Cleanup and integrity keys compare in constant time. Length mismatches fail closed.
Response · Session
Every JSON response carries a fixed security header set. CORS only reflects allowlisted origins. Sessions stay HttpOnly, Secure, SameSite.
X-Content-Type-Options: nosniff X-Frame-Options: DENY Referrer-Policy: no-referrer Cache-Control: no-store X-AgentPay-Security: bank-grade-v1
Permissions-Policy disables geolocation, mic, and camera by default. Admin and cleanup routes never leak timing through variable-length secret compares.
Dashboard · Safety
Refresh the map from Safety. The dashboard mirrors the public status so operators see live limits, zero-loss instruments, and gate posture in one place.
Safety gate
Locked agents cannot open new spends. Refunds and settles still work.
Tx count and USD windows. Spikes can suspend the key and trip Edge Shield.
Spend ceiling resets each UTC day. Over budget returns 429, not a silent fail.
allow_to, deny_to, max_amount, task prefix — evaluated before every debit.
Global freeze or agent quarantine blocks discretionary spends until cool-down.
Audit
Operators with the admin secret can run a ledger integrity pass. It samples accounts and flags drift — it does not invent money.
Requires ADMIN_CLEANUP_SECRET (header or body). Timing-safe compare. Rate-limited like other admin routes.
Returns a structured report of sampled balances against expected ledger totals. Use it after incidents or before a sandbox wipe — not as a substitute for the safety gate on every pay.
Security
Checks before debit. Limits before flood. A live map you can refresh without guessing.
Open AgentPay│