Skip to content

chore: prepare v2.2.7 release - #530

Merged
tobyhede merged 7 commits into
release/2.2from
claude/project-thread-tjqqjn
Dec 4, 2026
Merged

tobyhede merged 7 commits into
release/2.2from
claude/project-thread-tjqqjn

Conversation

@tobyhede

@tobyhede tobyhede commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Requested by User · project thread

Summary

Prepares the 2.2.7 maintenance release of CipherStash Proxy from release/2.2.
It bumps the version and dates the changelog, following "Maintenance releases (2.2.x)" in DEVELOPMENT.md.
No tag or GitHub release has been created.

Changes

  • Cargo.toml: workspace version 2.2.6 → 2.2.7.
  • Cargo.lock: cargo update --workspace, which only moves the three workspace crates to 2.2.7.
  • CHANGELOG.md: [Unreleased] renamed to [2.2.7] - 2026-12-04, with a fresh empty [Unreleased] above it.
  • postgresql/backend.rs: a database error is now logged at debug level on the PROTOCOL target, with only its SQLSTATE code. The message is not logged, because it can contain statement values. Previously Proxy logged every database error at error level with all its fields, which can contain values from the statement. This matches main since 9dc3608.
  • cli/migrate/mod.rs: the Encryption Migrator now escapes each source value, the target column name and the table name in its UPDATE statements. Previously a value with a single quote broke the batch, and a value shaped like SQL ran as SQL. This is the escaping part of PR 533 on main (CIP-5750), with its three quoting tests and a test for backslashes and compound primary keys.
  • CHANGELOG.md: a Changed entry for the log change, and Security entries for the migrator fix and explaining that jsonwebtoken GHSA-h395-gr6q-cpjc and rkyv RUSTSEC-2026-0235 do not affect Proxy 2.2.7.

Verification

  • cargo update --workspace changed only the workspace crate versions (no third-party dependency moved).
  • cargo metadata resolves the workspace.
  • After the rebase, cargo clippy --workspace --all-targets --locked -- -D warnings: passed.
  • cargo fmt --all -- --check: passed.
  • cargo test -p cipherstash-proxy -p eql-mapper --lib --locked: 323 and 92 passed. The three migrator quoting tests failed before the escaping fix and pass after it.

Related

The branch is rebased on release/2.2 at 9360272, so 2.2.7 includes:

Their changelog entries are under [2.2.7], and the release date is now 2026-12-04.
After the rebase, cargo update --workspace was re-run on #528's Cargo.lock, and it moved only the three workspace crates.

Review notes

The migrator's debug logging of plaintext and credentials is tracked in CIP-5752, and its NULL handling and batching bugs in CIP-5769. Neither is part of 2.2.7.

After merging, tag and release from the merged commit as described in DEVELOPMENT.md, with --latest=false --notes-start-tag v2.2.6.


Generated by Claude Code

@tobyhede tobyhede self-assigned this Dec 2, 2026
claude and others added 3 commits December 4, 2026 10:12
Bump the workspace version to 2.2.7 and move the unreleased changelog
entries under a dated 2.2.7 heading, following the maintenance release
steps for release/2.2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Q6HAPe4RUfXwkC13DxDVk
Proxy logged every PostgreSQL ErrorResponse at error level with all of
its fields. Fields such as the message and detail can contain values
from the statement, so those values reached the logs at the default
log level. Log only the SQLSTATE and message, at debug level on the
PROTOCOL target, as main does since 9dc3608.
@tobyhede
tobyhede force-pushed the claude/project-thread-tjqqjn branch from 5223646 to 85b3bb1 Compare December 3, 2026 23:14
…tor updates

The migrate command built each row's UPDATE by inserting the source
value as '{val}' without escaping, and the target column and table
names unescaped. A value with a single quote broke the batch, and a
value shaped like SQL ran as SQL, because the batch is sent with
simple_query. Escape all three with escape_literal and
escape_identifier, as main does since PR 533 (CIP-5750).
@tobyhede
tobyhede marked this pull request as ready for review December 3, 2026 23:40
@tobyhede

tobyhede commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

@cipherstash-agent review

@cipherstash-agent cipherstash-agent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review attestation

Reviewed e69267b · posted from Claude Code · claude-opus-5-5 · effort medium (code-review)
Sources: code-review · claude-opus-5-5; rust-security · claude-opus-5-5; mattpocock-skills:code-review · claude-opus-5-5
Skills: code-review, company-skills:rust-security, mattpocock-skills:code-review, company-skills:review-cross-check

Findings (8): 3 major, 5 minor — 5 inline, 3 below.

  • packages/cipherstash-proxy/src/cli/migrate/mod.rs:192 (outside diff) major The migrator still logs the whole batch UPDATE at MIGRATE debug, and it holds every plaintext source value, so CS_LOG__MIGRATE_LEVEL=debug writes them all to the log; :189 also logs primary-key values under --verbose at the default level. main fixed both alongside the escaping (52017f8 in #533, and Sensitive in #534). Log rows = batch.len() and drop or count records.
  • packages/cipherstash-proxy/src/cli/migrate/mod.rs:68 (outside diff) major Existing code: debug!(?config) prints client_access_key, client_key (config/tandem.rs:38-49) and an inline TLS private_key_pem (config/tls.rs:13-22), all with derived Debug, whenever migrate runs at debug. main redacts them in 4864637; worth a 2.2.x backport.
  • packages/cipherstash-proxy/src/cli/migrate/mod.rs:196 (outside diff) minor Existing code: BEGIN; is sent once before the loop but COMMIT; after every batch, and paging is LIMIT/OFFSET, so a concurrent delete or insert during a migration skips a row (left unencrypted) or repeats one. Use keyset pagination with BEGIN/COMMIT around each batch.

Checked and not raised: escaping covers every value and identifier in the UPDATE, and build_update_statement matches main; quoting the table matches the SELECT, which was already quoted; rkyv is not compiled in (cargo tree -i rkyv -e all --all-features prints nothing); jsonwebtoken 9.3.1 is reached only through stack-auth, which decodes with signature and exp checks off; the three migrate tests pass.


Generated by Claude Code

@@ -164,33 +164,12 @@ impl Migrate {
row.get(source_col.as_str()).unwrap_or("").to_owned()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Existing code: unwrap_or("") turns a SQL NULL into '', so a NULL source value is written as an encrypted empty string instead of NULL, and a NULL key column gives WHERE "col"='', which matches the wrong rows or none. Keep Option<String> and emit NULL in SET, and IS NULL in WHERE (or refuse a NULL key).

Source: code-review · claude-opus-5-5


Generated by Claude Code

Comment thread CHANGELOG.md Resolved
The ErrorResponse message can contain values from the statement, such
as the input in an invalid input syntax error, so stop logging it in
the debug event and add a regression test.
Also remove a stale comment from build_update_statement.
@tobyhede
tobyhede merged commit dbc8217 into release/2.2 Dec 4, 2026
4 checks passed
@tobyhede
tobyhede deleted the claude/project-thread-tjqqjn branch December 4, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants