Files
PaperClipAI/packages/db
7a870321c8 fix(connections): index relay publicRef lookups to avoid full-table scans
findConnectionByPublicRef and connectionRelaySecretResolver loaded every
tool_connections row into memory and filtered the relay publicRef in JS. Both
run on the inbound webhook path before signature verification, so the scan was
a pre-auth DoS vector that worsens as connections grow. Replace with a
GIN-indexed `config @> {relay:{publicRef}}` containment lookup limited to one
row, and add the supporting index in migration 0183.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-22 16:01:08 +00:00
..
2026-03-12 13:09:22 -05:00