Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
6588c56
fix(deps): patch fast-uri to 3.1.9
claude Oct 28, 2026
8272922
fix(deps): patch rustls to 0.23.46
claude Oct 29, 2026
e1d3c50
chore(deps): bump uuid in /packages/eql in the cargo-minor-patch group
dependabot[bot] Nov 1, 2026
9a8d156
chore(deps): bump lizard
dependabot[bot] Nov 1, 2026
45df5cf
chore(deps): bump the cargo-minor-patch group
dependabot[bot] Nov 1, 2026
a4c368b
chore(deps): bump the cargo-minor-patch group across 4 directories wi…
dependabot[bot] Nov 1, 2026
35fc4d8
test(dynamodb): pin the legacy scalar JSON gap and renamed-key passth…
tobyhede Nov 2, 2026
729f029
test(e2e): prove protect-dynamodb 6.0.1 items read and query under St…
tobyhede Nov 2, 2026
8ed4127
ci(e2e): run the protect-dynamodb compatibility suite with credentials
tobyhede Nov 2, 2026
bc0320d
test(e2e): pin the deprecated Protect -> Stack 0.19 -> Stack 1.x route
tobyhede Nov 2, 2026
0b7174f
Merge pull request #1436 from cipherstash/claude/project-thread-ha2uvy
tobyhede Nov 2, 2026
589abf6
chore(deps): bump the production-minor-patch group across 1 directory…
dependabot[bot] Nov 2, 2026
0cfd93d
Merge pull request #1463 from cipherstash/dependabot/cargo/packages/e…
freshtonic Nov 2, 2026
a5d3da7
Merge pull request #1465 from cipherstash/dependabot/cargo/languages/…
freshtonic Nov 2, 2026
60e3cf3
Merge pull request #1466 from cipherstash/dependabot/cargo/cargo-mino…
freshtonic Nov 2, 2026
3e8b51f
Merge pull request #1495 from cipherstash/dependabot/npm_and_yarn/pro…
freshtonic Nov 2, 2026
35cae95
chore(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] Nov 2, 2026
22f9932
fix(impact): hash lizard 1.24.3 and move the misread fixtures to a li…
freshtonic Nov 2, 2026
f060998
Merge pull request #1448 from cipherstash/fix/cip-5248-rustls
tobyhede Nov 2, 2026
6abc330
Merge pull request #1435 from cipherstash/fix/cip-5246-fast-uri
tobyhede Nov 2, 2026
d55ba79
chore(biome): migrate config to 2.6 and keep Markdown and YAML out of it
claude Nov 2, 2026
c04a14d
docs(migrate): add the migrate glossary and the forced-pass obligatio…
tobyhede Oct 15, 2026
556b33f
docs(migrate): mark the forced-pass obligation ADR as proposed
claude Oct 19, 2026
e738c7f
docs(migrate): credit #1193 with the reverse-direction waiver
claude Oct 19, 2026
d6a16ba
docs(migrate): bring the forced-pass ADR and glossary up to date with…
tobyhede Nov 4, 2026
8600197
docs(migrate): wrap the glossary and ADR at 80 columns
tobyhede Nov 4, 2026
af28159
docs(migrate): use the glossary term in the README
tobyhede Nov 4, 2026
c948463
docs(migrate): correct the ADR's implementation and event claims
tobyhede Nov 4, 2026
576aaaf
docs(migrate): fix the ADR's remaining history and obligation claims
tobyhede Nov 4, 2026
17ba8e0
Merge pull request #1220 from cipherstash/docs/migrate-context-and-adr
tobyhede Nov 4, 2026
549841f
Merge pull request #1464 from cipherstash/dependabot/pip/dot-github/i…
tobyhede Nov 6, 2026
abe3502
Merge pull request #1494 from cipherstash/dependabot/npm_and_yarn/dev…
tobyhede Nov 6, 2026
ab24980
fix(stack-supabase): read tables that have no encrypted columns
claude Nov 6, 2026
3bd3d28
fix(nextjs): harden the CipherStash session cookie
claude Nov 6, 2026
ef3765b
fix(stack-supabase): refuse plaintext-table rows that still hold ciph…
claude Nov 6, 2026
3334cb7
test(stack-supabase): assert the declared-mode select('*') refusal, n…
claude Nov 6, 2026
37bf4cf
fix(eql): align JSON array flag with SQL and handle empty arrays
claude Nov 6, 2026
908cbc6
docs(eql): mention root array flag in SteVecDocument docs
claude Nov 6, 2026
3d4c4f1
test(eql): drop private issue id from test comment
claude Nov 6, 2026
b15c1ad
fix(eql): block a domain compared with another domain's query operand
claude Nov 6, 2026
9412408
fix(eql): drop ignored query_json cast and correct eql-bindings wire …
claude Nov 6, 2026
a3723da
fix(eql): drop private tracker id from comments and docs
claude Nov 6, 2026
19b8ea1
docs(eql): say why a stored document fails the query_json cast
claude Nov 6, 2026
db76cf4
fix(stack-auth): honour CS_WORKSPACE_CRN on the device-session path
claude Nov 6, 2026
4024cbc
fix(stack-auth): address review of CRN pinning; update stash-auth skill
claude Nov 6, 2026
b45333d
test(eql): add empty-array accessor test to jsonb inventory snapshot
claude Nov 6, 2026
c832493
fix(golang): wipe guest buffers on failed placement and close stashge…
claude Nov 6, 2026
3fd7766
refactor(stack-auth): drop untestable log branch flagged by mutation …
claude Nov 6, 2026
169f985
fix(eql): schema-qualify operators in comparison wrapper bodies
claude Nov 6, 2026
a076649
fix(stack-auth,stack-profile): clamp server expires_in and wipe secre…
claude Nov 6, 2026
43967d3
fix(stack,supabase,prisma): keep plaintext search terms out of errors…
claude Nov 6, 2026
63da8b3
fix(eql): drop private tracker ids from comments
claude Nov 6, 2026
8cc9c40
fix(stack-auth,stack-profile): close the gaps review found in secret …
claude Nov 6, 2026
c2798f0
fix(cli): follow drizzle-kit's reported path when scaffolding drop mi…
claude Nov 6, 2026
ba272d9
fix(stack,supabase): log a failure's kind, not its message, in Dynamo…
claude Nov 6, 2026
dd043af
chore(deps): record stack-profile's zeroize dependency in detached lo…
claude Nov 6, 2026
469121c
test(eql): keep cross-pair blockers out of the planner-metadata accou…
claude Nov 6, 2026
10398ec
fix(deps): patch minimatch to 11.0.1
claude Nov 7, 2026
413fcd5
chore(deps-dev): bump the dev-dependencies group with 2 updates
dependabot[bot] Nov 8, 2026
5c17dba
chore(deps): bump the production-minor-patch group with 5 updates
dependabot[bot] Nov 8, 2026
4459800
fix(nextjs): match sessions on issuer and subject, validate CTS tokens
claude Nov 8, 2026
e32331d
fix(nextjs): forward session changes to the request, survive CTS outages
claude Nov 8, 2026
4108a96
fix(nextjs): keep cookie in the request override when clearing a session
claude Nov 8, 2026
d966b75
fix(nextjs): reject expired CTS tokens and reconcile caller cookie ov…
claude Nov 8, 2026
736f3bd
refactor(stack-supabase): simplify the plaintext-table path and narro…
claude Nov 8, 2026
10aee5f
fix(stack-supabase): name the row index in the ciphertext error
claude Nov 8, 2026
818168d
fix(stack-supabase): keep jsonb keys out of the ciphertext error
claude Nov 8, 2026
8bde0b3
fix(nextjs): forward the kept session through overrides that omit cookie
claude Nov 8, 2026
e7a3b59
docs(nextjs): document the remaining session and CTS functions
claude Nov 8, 2026
2e6188f
test(stack-supabase): assert the ciphertext error log omits jsonb keys
claude Nov 8, 2026
ca4dd2f
fix(nextjs): reconcile a session cookie the caller's response already…
claude Nov 8, 2026
de59842
test(e2e): raise security-override cap to 13 for minimatch
claude Nov 9, 2026
fb810ca
chore(deps-dev): move the biome.json schema to 2.6.4
freshtonic Nov 9, 2026
6d5b67a
Merge pull request #1574 from cipherstash/dependabot/npm_and_yarn/pro…
freshtonic Nov 9, 2026
cd50276
Merge origin/main into the dev-dependencies update
freshtonic Nov 9, 2026
008cbbc
Merge pull request #1573 from cipherstash/dependabot/npm_and_yarn/dev…
freshtonic Nov 9, 2026
c548e3e
fix(nextjs): forward the session only on responses that continue
claude Nov 9, 2026
2caabb3
fix(nextjs): always write the session cookie Secure
claude Nov 9, 2026
9f756f7
fix(eql): type-check root array flag and guard its cast
claude Nov 10, 2026
ce65ffb
style(eql): rustfmt the root array flag test
claude Nov 10, 2026
e35a90e
fix(nextjs): keep a failed Clerk token from failing the request
tobyhede Nov 10, 2026
3640d1b
test(nextjs): pin session forwarding through a rewrite
tobyhede Nov 10, 2026
9a7815d
test(e2e): prove protect-dynamodb items need no re-encryption under S…
tobyhede Nov 4, 2026
b3e8158
test(e2e): move encrypted values between DynamoDB and Postgres unchanged
tobyhede Nov 4, 2026
3bdda78
test(e2e): address review findings on the upgrade and cross-store suites
tobyhede Nov 4, 2026
c52f2a8
docs(skills): normalize downcase columns on write as well as on query
tobyhede Nov 4, 2026
b3bc44a
docs(migration): guide the protect-dynamodb upgrade to Stack, tied to…
tobyhede Nov 4, 2026
278a7c2
docs(migration): fix the upgrade guide's audit findings and pin its n…
tobyhede Nov 4, 2026
8280acf
docs(skills): narrow the encryptQuery result before reading hm
tobyhede Nov 4, 2026
315bd22
docs(migration): remove only Protect's direct packages in the upgrade…
tobyhede Nov 6, 2026
ae4a9da
test(e2e): add the migration harness glossary and Protect.js fixture app
tobyhede Nov 6, 2026
62bf271
docs(e2e): define App Host in the migration harness glossary
tobyhede Nov 6, 2026
0a68593
feat(e2e): demonstrate Protect v2 to Stack v3 upgrades for both stores
tobyhede Nov 10, 2026
6287189
fix(e2e): preserve customer dependencies when rolling back the guide …
tobyhede Nov 10, 2026
1595875
fix(e2e): decode migration domain values as JSON
tobyhede Nov 10, 2026
ea45dd9
fix(e2e): accept null legacy index fields during migration
tobyhede Nov 10, 2026
c5e1282
fix(e2e): address Protect migration review findings
tobyhede Nov 10, 2026
08a63ac
refactor(e2e): move migration harness groundwork to its design branch
tobyhede Nov 10, 2026
f8565c8
fix(docs): preserve harness context relocation after rebase
tobyhede Nov 10, 2026
1c934dd
docs(e2e): record migration harness architecture
tobyhede Nov 8, 2026
44e8187
docs(e2e): resolve migration harness planning review
tobyhede Nov 8, 2026
d8dac75
docs(e2e): clarify harness enforcement and evidence contracts
tobyhede Nov 8, 2026
a38898a
docs(e2e): complete migration harness stage and review contracts
tobyhede Nov 8, 2026
79b2fa7
docs(e2e): keep migration harness contract in its ADR
tobyhede Nov 8, 2026
90f8bd3
docs(e2e): reconcile migration harness review contracts
tobyhede Nov 8, 2026
dbe90fe
docs(e2e): prioritize the v2-to-v3 guide for both stores
tobyhede Nov 10, 2026
025f329
fix(e2e): preserve serialized fixture initialization on the harness b…
tobyhede Nov 10, 2026
1f8f3ce
docs(e2e): register the relocated harness context
tobyhede Nov 10, 2026
db91731
fix(deps): replace minimatch override with rimraf ^6.1.4
claude Nov 10, 2026
12083f5
test(e2e): run the Postgres upgrade example on PostgreSQL 18 and refu…
tobyhede Nov 11, 2026
63f9290
chore(e2e): integrate tested guide into harness design stack
tobyhede Nov 11, 2026
89af927
Merge pull request #1543 from cipherstash/claude/project-thread-5bswx7
tobyhede Nov 11, 2026
c549782
fix(e2e): accept the primary key's NOT NULL on PostgreSQL 18
tobyhede Nov 11, 2026
2f9c8d7
Merge pull request #1564 from cipherstash/fix/cip-5331-minimatch
tobyhede Nov 11, 2026
d25dc49
docs(eql): address review on query_json cast removal
claude Nov 11, 2026
3c4b37b
refactor(stack-supabase): derive hasEncryptedColumns from the shared …
claude Nov 11, 2026
8780aa2
fix(e2e): handle Postgres not-null catalogs in migration preflight
tobyhede Nov 11, 2026
cf7a547
Merge branch 'fix/migration-guide-ci' into reconcile/design
tobyhede Nov 11, 2026
139ae20
chore(e2e): reconcile the published PostgreSQL guard correction
tobyhede Nov 11, 2026
1a92ac9
fix(eql): keep cross-pair blockers recognisable to the lints
claude Nov 11, 2026
21e6710
docs(eql): correct the uninstall lock footprint after the cross-pair …
claude Nov 11, 2026
152be4f
test(eql): name the current compose lock setting in the capacity test
claude Nov 11, 2026
6b32d1f
fix(cli): accept drizzle-kit's comment-only custom migration scaffold
claude Nov 11, 2026
c6ce0c7
style(cli): format drizzle-helper test
claude Nov 11, 2026
66fb0dd
docs(skills): match the cross-domain blocker error text
claude Nov 11, 2026
b17e03f
refactor(golang): share one se_alloc sequence and tighten the new tests
claude Nov 11, 2026
7abbd4d
fix(golang): take the allocation size as uint64 to satisfy gosec G115
claude Nov 11, 2026
77f9fef
fix(stack-encrypt): read the client key from the CRN's workspace too
claude Nov 11, 2026
9aa9896
docs(stash-auth): scope the CRN pin to AutoStrategy; clean up test pr…
claude Nov 11, 2026
aac6057
test(stack-encrypt): cover the temp profile dir cleanup
claude Nov 11, 2026
208b117
Merge pull request #1519 from cipherstash/test/protect-upgrade-no-ree…
tobyhede Nov 11, 2026
398af26
test(cli): resolve the temp root's real path in drizzle-helper test
claude Nov 11, 2026
650f0b8
Merge pull request #1544 from cipherstash/claude/project-thread-qzt4qf
tobyhede Nov 11, 2026
558ebf8
docs: scope the changeset to AutoStrategy; tidy a test
claude Nov 11, 2026
ef1ef1b
Merge pull request #1551 from cipherstash/claude/project-thread-rckj8w
tobyhede Nov 11, 2026
59379b3
fix(golang): validate Place's out-slots before allocating
claude Nov 11, 2026
8c6fc2f
Merge main into claude/project-thread-h06x5y
claude Nov 11, 2026
5c1a11b
fix(stack-profile): pin the non-UTF-8 error and skip growth on small …
claude Nov 11, 2026
c0ee563
fix(stack,supabase,prisma): allowlist logged failure codes, sanitize …
claude Nov 11, 2026
1eb3135
docs(changeset): limit the privacy claim to the changed errors and logs
claude Nov 11, 2026
d61bfd4
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 11, 2026
b29eaa1
test(stack-supabase): assert the ciphertext error log carries the fai…
claude Nov 11, 2026
9de3535
Merge pull request #1548 from cipherstash/claude/project-thread-7am8g0
tobyhede Nov 11, 2026
8b2aefe
Merge pull request #1552 from cipherstash/claude/project-thread-1t65aj
tobyhede Nov 11, 2026
520e1d8
refactor(stack-supabase): keep test options type-checked, group publi…
claude Nov 11, 2026
3bd2e76
Merge pull request #1554 from cipherstash/claude/project-thread-uthgtw
tobyhede Nov 11, 2026
d5a7b62
refactor(stack,supabase,prisma): simplify the log-safe failure helper
claude Nov 11, 2026
5da06f1
docs(stash-auth): scope the quick-diagnosis CRN advice to AutoStrategy
claude Nov 11, 2026
9346c87
docs(e2e): close migration harness review contract gaps
tobyhede Nov 11, 2026
34bd725
fix(stack-auth): refuse a refreshed token for another workspace befor…
claude Nov 11, 2026
ef2acb6
Merge pull request #1575 from cipherstash/docs/migration-harness-design
tobyhede Nov 11, 2026
574bdab
Merge pull request #1616 from cipherstash/claude/project-thread-xqtlk5
tobyhede Nov 11, 2026
0565c5e
fix(stack-auth,stack-profile): enforce the device-code deadline and v…
claude Nov 11, 2026
da0cbf6
fix(stack-auth): wipe a non-UTF-8 CS_CLIENT_ACCESS_KEY before discard…
claude Nov 11, 2026
7c040d9
docs(golang): correct the comment on an unplaced transport slot
claude Nov 11, 2026
a5fa05f
test(stack-auth): pin the wait between device-code polls
claude Nov 11, 2026
6162ddb
test(stack-auth): cap the polls every device-code test allows
claude Nov 11, 2026
6c36046
fix(golang): probe Place's out-slots by reading them and count se_all…
claude Nov 11, 2026
368ac98
Merge pull request #1550 from cipherstash/claude/project-thread-ql9v09
tobyhede Nov 11, 2026
dfca909
Merge pull request #1547 from cipherstash/claude/project-thread-h06x5y
tobyhede Nov 11, 2026
71f760b
fix(stack-auth): refuse another workspace's session before AutoRefres…
claude Nov 11, 2026
1fcd760
fix(stack-auth): do not replay a refresh credential the issuer alread…
claude Nov 11, 2026
241fc05
Merge pull request #1615 from cipherstash/claude/project-thread-6hpy2t
tobyhede Nov 11, 2026
8612fc9
fix(stack-auth): report a failure to clear a spent session
claude Nov 11, 2026
0b15a90
Merge pull request #1545 from cipherstash/claude/project-thread-62v10t
tobyhede Nov 11, 2026
027cb1f
fix(stack-profile): zero-fill at most one chunk per read in SecretBuf
claude Nov 11, 2026
8090fc7
Merge pull request #1549 from cipherstash/claude/project-thread-ciexa3
tobyhede Nov 11, 2026
2a0ae6b
Merge pull request #1553 from cipherstash/claude/project-thread-n479p0
tobyhede Nov 11, 2026
a4ee6b3
Merge main into next
coderdan Nov 15, 2026
ab4d5ff
fix(eql): schema-qualify the operators in eql_v4.between
coderdan Nov 15, 2026
86a820d
ci(tests): run the JS jobs when the Protect upgrade guide changes
coderdan Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .changeset/adapter-kit-is-encrypted-payload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cipherstash/stack": patch
---

`@cipherstash/stack/adapter-kit` now exports `isEncryptedPayload`, the check
model decryption uses to find an encrypted value in a row. The Supabase adapter
uses it to refuse a row it would otherwise return undecrypted.
8 changes: 8 additions & 0 deletions .changeset/auth-device-session-workspace-pin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@cipherstash/auth": patch
"stash": patch
---

`@cipherstash/auth`'s `AutoStrategy` now honours `CS_WORKSPACE_CRN` when you are signed in through the CLI (no access key). The default `@cipherstash/stack` client resolves credentials in `@cipherstash/protect-ffi` and does not pick this up until that package does. Previously the CRN was ignored and the CLI's *current* workspace was used, so switching workspaces with the CLI silently changed which workspace a process authenticated against. Now the session saved for the workspace named by the CRN is used, and every token is checked against that workspace, failing with `WORKSPACE_MISMATCH` otherwise. If no session exists for that workspace, the result is `NOT_AUTHENTICATED`. Without a CRN, behaviour is unchanged.

The client key (`secretkey.json`) that `stack-encrypt` reads from the CLI profile follows the same workspace, so the token and the client key never come from different ones.
12 changes: 12 additions & 0 deletions .changeset/auth-expiry-and-secret-wiping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@cipherstash/auth": patch
---

Sign-in and token refresh no longer trust an unbounded `expires_in` from the
auth server. A token lifetime longer than 30 days is treated as 30 days, and a
device code is polled for at most one hour, so an oversized value can no
longer panic the process or wrap to an already-expired token. The buffers that
carry saved tokens and keys to and from `~/.cipherstash`, and an access key
read from `CS_CLIENT_ACCESS_KEY`, are now wiped from memory once used.
A device code's lifetime now runs from when it was issued, and polling stops
at that deadline rather than at the next poll after it.
5 changes: 5 additions & 0 deletions .changeset/cli-drizzle-migrations-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stash': patch
---

`stash encrypt drop` and `stash decrypt drop` now write the Drizzle migration to the directory drizzle-kit reports (the `out` in `drizzle.config.ts`) instead of scanning `--migrations-dir`. Previously, when the two differed, the SQL could be written over an older migration with the same name while drizzle-kit journaled an empty stub in the real `out`, so the DROP never shipped. When a scan fallback is needed it matches the exact `_<name>.sql` suffix and refuses to overwrite any file that is not a drizzle-kit scaffold (blank or comment-only), and `--migrations-dir` now warns when drizzle-kit wrote elsewhere.
6 changes: 6 additions & 0 deletions .changeset/eql-cross-query-domain-blockers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@cipherstash/eql": patch
"stash": patch
---

Comparing an encrypted column with a different domain's query operand now raises instead of silently returning no rows. For example `public.eql_v3_text_ord = $1::eql_v3.query_text_eq`, or `eql_v3_text_ord < $1::eql_v3.query_text_ord_ope`, previously fell through to native `jsonb` comparison and answered false for equal values. Within a type family, every pair of a column domain and another domain's query operand now resolves to a blocker for the operators both sides support, naming both operands and telling the caller to use the query domain that matches the column. Use the query domain of the column's own domain (`eql_v3.query_<column domain>`). The install bundle grows by about 1,060 functions and the same number of operators, so a single-transaction uninstall now takes about 8,550 locks (up from about 6,400); raise `max_locks_per_transaction` on busy clusters.
5 changes: 5 additions & 0 deletions .changeset/eql-drop-ignored-query-json-cast.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cipherstash/eql': patch
---

Drop the `CREATE CAST (public.eql_v3_json_search AS eql_v3.query_json)` that PostgreSQL always ignored (it warned "cast will be ignored because the source data type is a domain" on every install). `doc::eql_v3.query_json` was never converting; call `eql_v3.to_ste_vec_query(col)` instead. Also corrects the `eql-bindings` wire-format docs: `op` backs `_ord` / `_ord_ope` (and `text_ord` / `text_search` carry `hm` + `op`), `ob` only `_ord_ore`.
5 changes: 5 additions & 0 deletions .changeset/eql-json-array-root-flag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cipherstash/eql': patch
---

Encrypted JSON arrays now agree between the Rust/TypeScript bindings and the SQL. `SteVecDocument` models the root `a` array flag that the SQL root validator accepts and the array accessors require, so an array document the database accepts also parses in the bindings. The `a` flag on documents and entries is now optional but not nullable in the generated TypeScript and JSON Schema (`a?: boolean`), matching the SQL CHECK; a `null` is rejected instead of failing later with a cast error. `eql_v3.jsonb_array_length` returns 0 for an empty array (it returned NULL), and `eql_v3.jsonb_array_elements` and `eql_v3.jsonb_document_contains(jsonb[], jsonb)` no longer raise "upper bound of FOR loop cannot be null" on one.
25 changes: 25 additions & 0 deletions .changeset/eql-wrapper-operators-search-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'@cipherstash/eql': patch
'stash': patch
---

Fix: the `_ord_ore` comparison functions (`eql_v3.lt`, `lte`, `gt`, `gte`, `eq`,
`neq`), and the operators on `_ord_ore` columns when named with their schema
(`col OPERATOR(public.<) $1`), no longer give wrong answers when `public` is not
on the `search_path`. These functions are kept free of a pinned
`search_path` so PostgreSQL can inline them into index scans, which means they
look up their comparison operator through the caller's `search_path`. The ORE
comparison operators live in `public`, so a caller without it, such as a
`SECURITY DEFINER` function with `SET search_path = ''` (the hardening Supabase
recommends), got PostgreSQL's built-in record comparison instead. That compares
the ciphertext bytes, so equality and ordering were silently wrong rather than
raising an error. Every generated comparison function now names its operator
with its schema (`OPERATOR(public.<)` for ORE, `OPERATOR(pg_catalog.<)` for the
HMAC, bloom filter and OPE terms), so the result no longer depends on the
`search_path`, and the functions still inline. A bare `col < $1` still needs
`public` on the `search_path`, because the operators on encrypted columns are
created in `public`; without it, call the function (`eql_v3.lt(col, $1)`) or
name the operator's schema. Reinstall or upgrade EQL to pick up the fix.

The `stash-postgres` skill now explains how to query encrypted columns from a
function or role whose `search_path` leaves out `public`.
5 changes: 5 additions & 0 deletions .changeset/migrate-readme-column-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cipherstash/migrate': patch
---

The README now calls the forward and reverse moves of a column "column migrations", matching the package glossary, instead of "lifecycle".
17 changes: 17 additions & 0 deletions .changeset/nextjs-session-cookie-hardening.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@cipherstash/nextjs': patch
---

Harden the CipherStash session cookie (`__cipherstash_cts_session`).

- The cookie is now written `httpOnly` and `secure`. It holds a bearer token and nothing in this package reads it client-side; if your own client code read it, move that read to the server. `secure` applies in every environment: browsers accept it from `http://localhost`, but a plain-HTTP development server on another host (a LAN address, for example) will no longer keep the session.
- A session is only reused for the user it was minted for. The cookie now records the issuer and subject (`iss` and `sub`) of the OIDC token it was minted from, and `protectMiddleware` and `protectClerkMiddleware` replace a session left behind by another user (for example after a Clerk multi-session `setActive` switch, or a sign-out on a route the middleware does not match). If a replacement cannot be minted, the stale cookie is cleared. Cookies written by earlier versions carry no owner and are re-minted once. Ownership is read without verifying a signature, so the token you pass to `protectMiddleware` or `getCtsToken` must be one your application has already authenticated.
- `getCtsToken(oidcToken)` only returns the cookie session when it belongs to the issuer and subject of `oidcToken`, and otherwise fetches a fresh session for that token.
- `getCtsToken()` with no argument is deprecated. It returns the session cookie without checking who it belongs to, because it has no identity to compare it with, so pass the user's token whenever you have one. If a user signs out on a route the middleware does not match, call `resetCtsToken` there.
- An expired or malformed session cookie no longer passes through or throws: it is treated as no session and re-minted or cleared by the middleware, instead of returning a 500 on every matched route.
- A successful CTS response is now validated before it is used. A 2xx body that is not an unexpired token (non-JSON, the wrong shape, or an `expiry` already past) is reported as a failure instead of being written to the cookie or thrown out of the middleware.
- `GetCtsTokenResponse` now uses `success: true` and `success: false` as literal discriminants, so checking `result.success` narrows `result.ctsToken` to a `CtsToken`.
- When the middleware replaces or clears the session on a response that continues the request (`NextResponse.next()` or a rewrite), the request forwarded to route handlers and server components is updated in the same request, so `getCtsToken()` there never sees the previous user's session. Next.js does not do this for route handlers on any release tested, from 14.0.0 to 15.5.29. If the response you pass in already overrides the forwarded request headers, the forwarded session cookie is set to the one the middleware decided on, whether your override replaced the cookie or left it out. A session cookie your response already sets is likewise replaced with the kept session, or cleared when none was kept.
- A CTS transport failure (DNS, TLS, connection reset) is reported as a failure instead of throwing, so the middleware still clears a stale session and does not return a 500. The error does not repeat the exception's message, which a fetch wrapper could fill with the request body.
- A rejected Clerk `getToken()` no longer fails the request. It is treated as no token being available, so a stale session is still cleared.
- On Next.js 14.2.8 to 14.2.23 and 15.0.x, Next.js itself sends the session token to the browser in an `x-middleware-set-cookie` response header whenever the session changes, so `httpOnly` does not protect it on those responses. Upgrade to at least 14.2.25 or 15.2.3, which also fix a critical Next.js middleware bypass (GHSA-f82v-jwr5-mffw).
10 changes: 10 additions & 0 deletions .changeset/no-plaintext-search-terms-in-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@cipherstash/stack': patch
'@cipherstash/stack-supabase': patch
'@cipherstash/stack-prisma': patch
'stash': patch
---

Two validation errors no longer quote the caller's search term: a free-text search term that is too short, and a `like`/`ilike` pattern with wildcards the encrypted search cannot honour. Each now reports the term's length instead.

The Supabase and DynamoDB adapters' error logs now record a failure's kind instead of its full message, which could quote a plaintext value. The kind is the error class plus any known encryption error type, FFI error code or auth code it carries; anything else is left out. The DynamoDB `options.logger` hook now receives a copy of the error whose message is that description, with the same `code`. The full message is still returned to the caller and passed to `errorHandler`. `@cipherstash/stack/adapter-kit` exports the shared `describeFailure` and `likeWildcardError` helpers that produce these messages.
5 changes: 5 additions & 0 deletions .changeset/stash-dynamodb-hmac-narrowing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stash': patch
---

The `stash-dynamodb` skill's query examples now narrow the `encryptQuery` result before reading `hm`. The previous `result.data.hm` did not type-check, because the result type also covers ciphertexts, strings and `null`.
5 changes: 5 additions & 0 deletions .changeset/stash-dynamodb-no-reencryption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stash': patch
---

The `stash-dynamodb` skill now scopes the no-re-encryption upgrade to the tested top-level scalar equality columns and unindexed text written by `@cipherstash/protect-dynamodb@6.0.1`. It explains boolean lookup changes and the privacy cost of a plaintext replacement, stale `__hmac` removal, `downcase` normalization, and the required legacy JSON backfill with its rollback limit. It also clarifies legacy v2 reads and queries using current v3 schemas.
7 changes: 7 additions & 0 deletions .changeset/stash-supabase-skill-plaintext-tables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"stash": patch
---

The `stash-supabase` skill now says that tables with no encrypted columns are
read and written through the same `es.from()`, and that an embedded relation to
an encrypted table is refused rather than decrypted.
17 changes: 17 additions & 0 deletions .changeset/supabase-plaintext-table-reads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@cipherstash/stack-supabase": patch
---

Reading a table that has no encrypted columns no longer fails. Such a table is
not registered with the encryption client, and the adapter still asked the
client to decrypt its rows, so every `select()` on it, and every insert, update
or upsert followed by `.select()`, returned "decryptModel received a table this
client was not initialized with" (or threw, with `throwOnError`). On the
`wasm-inline` entry, writes to such a table failed the same way. The adapter now
passes the rows of a table with no encrypted columns straight through, in both
introspection and declared mode, without calling the encryption client.

A row from such a table that still holds an encrypted value, from an embedded
relation to an encrypted table or from an undeclared `eql_v3_*` column in
declared mode, is refused with an error naming the column, rather than returned
as ciphertext.
10 changes: 5 additions & 5 deletions .github/impact-gate/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
# CI installs it with `pip install --require-hashes --no-deps`, so nothing here
# resolves at install time and a transitive dependency cannot float.
#
# The top-level pins are impact-gate==0.4.1, lizard==1.24.1 (Lizard 1.24.0 is
# The top-level pins are impact-gate==0.4.1, lizard==1.24.3 (Lizard 1.24.0 is
# excluded by ImpactGate's own metadata) and pygments==2.21.0, which
# scripts/impact-gate.py imports directly. uv still annotates pygments "via
# lizard". To regenerate after changing them, from the repository root:
#
# printf 'impact-gate==0.4.1\nlizard==1.24.1\npygments==2.21.0\n' \
# printf 'impact-gate==0.4.1\nlizard==1.24.3\npygments==2.21.0\n' \
# | uv pip compile - --generate-hashes --universal --python-version 3.12 \
# --no-header -o .github/impact-gate/requirements.txt
#
# then restore this header. Any change here changes the baseline cache key.
impact-gate==0.4.1 \
--hash=sha256:9d9c8fb4c6f2fa56559d0530ff82569bc6d42b28ff5a77103e504e2470f198c6 \
--hash=sha256:e6dab6abec925151bd4dbffff92d4a40f742d561a6f8527b3fbe15dd68b25518
lizard==1.24.1 \
--hash=sha256:746060a3e9a375af7340b2d4c6aab307b8a8b4199339c36ddc7afc4188b53d1c \
--hash=sha256:c022cf1aac8170994b175e2a700f0535088f66da7e6bdf6c59fbd3b716cd10ac
lizard==1.24.3 \
--hash=sha256:7d2570ca711288388de1cf0f25512e97fbbc5e189f551c87b4e20d11d028b297 \
--hash=sha256:f7fccd909719170e323a240cc6927bfea65984d77a8f9c0e6405be582e9861db
# via impact-gate
pathspec==1.1.1 \
--hash=sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a \
Expand Down
Loading
Loading