Skip to content

Block commits containing unencrypted entity specifics - #455

Open
DJAndries wants to merge 3 commits into
masterfrom
encrypt-check
Open

DJAndries wants to merge 3 commits into
masterfrom
encrypt-check

Conversation

@DJAndries

@DJAndries DJAndries commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Resolves #375

@DJAndries
DJAndries requested a review from mschfh November 10, 2026 01:36
@DJAndries DJAndries changed the title Block commits containing unencrypted entity specficis Block commits containing unencrypted entity specfics Nov 10, 2026
@DJAndries DJAndries changed the title Block commits containing unencrypted entity specfics Block commits containing unencrypted entity specifics Nov 10, 2026
@mschfh
mschfh requested a balanced review from Copilot November 10, 2026 05:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical encryption-check bypasses allow clients to persist plaintext credentials and browsing data, including through an unvalidated server-defined tag.

3 open issues
What changed in this PR

Adds server-side validation to help prevent clients from storing unencrypted sync specifics, addressing issue #375.

Changes:

  • Checks entity specifics during conversion to datastore records, with exemptions for selected types.
  • Reports rejected entities to Sentry.
  • Adds validation and commit-response tests, and updates fixtures to include encrypted payloads.
File Description
datastore/​sync_entity.go Runs encryption validation before returning a datastore entity.
datastore/​encrypt_check.go Defines plaintext detection, exemptions, and Sentry reporting.
datastore/​encrypt_check_test.go Tests plaintext rejection, encrypted payloads, and exemptions.
command/​command_test.go Tests mixed-commit rejection responses and updates encrypted fixtures.

Review effort: Balanced

Comment thread datastore/encrypt_check.go Resolved
Comment thread datastore/encrypt_check.go Resolved
Comment thread datastore/encrypt_check.go Resolved
Comment thread datastore/encrypt_check.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The password exemption accepts client_only_encrypted_data when unencrypted_metadata is absent, allowing plaintext usernames and passwords to be persisted even when an encrypted blob is present.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread datastore/encrypt_check.go Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Reject any non-encrypted data sent by a client

3 participants