security(backend-postgres): bind query values as parameters #30

Merged
crapougnax merged 1 commit from fix/backend-postgres-sql-injection into develop 2026-11-14 08:22:17 +00:00
Owner

read(), update() and find() built their SQL by pasting values between
quotes: record identifiers, filter values, keyword searches, parent
identifiers. A value holding a quote broke the query, and a crafted one
changed it (reading or updating other records).

  • every value is now bound as a query parameter;
  • sort properties, sort orders, limits, offsets and sub-property filter
    names, which are part of the SQL text, are validated before use.

Legitimate queries are unchanged. find() had no test: a suite now covers
filters, sorting and limits, values holding quotes, and injection
attempts through each entry point.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

read(), update() and find() built their SQL by pasting values between quotes: record identifiers, filter values, keyword searches, parent identifiers. A value holding a quote broke the query, and a crafted one changed it (reading or updating other records). - every value is now bound as a query parameter; - sort properties, sort orders, limits, offsets and sub-property filter names, which are part of the SQL text, are validated before use. Legitimate queries are unchanged. find() had no test: a suite now covers filters, sorting and limits, values holding quotes, and injection attempts through each entry point. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
security(backend-postgres): bind query values as parameters
All checks were successful
Quatrain Core Sovereign CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 6m11s
Quatrain Core Sovereign CI / Publish Changed Packages to npm (pull_request) Has been skipped
34c75e9ecd
read(), update() and find() built their SQL by pasting values between
quotes: record identifiers, filter values, keyword searches, parent
identifiers. A value holding a quote broke the query, and a crafted one
changed it (reading or updating other records).

- every value is now bound as a query parameter;
- sort properties, sort orders, limits, offsets and sub-property filter
  names, which are part of the SQL text, are validated before use.

Legitimate queries are unchanged. find() had no test: a suite now covers
filters, sorting and limits, values holding quotes, and injection
attempts through each entry point.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 4ac73b2fd0 into develop 2026-11-14 08:22:17 +00:00
crapougnax deleted branch fix/backend-postgres-sql-injection 2026-11-14 08:22:18 +00:00
Sign in to join this conversation.
No description provided.