Skip to content

fix(socials): encrypt Bluesky app passwords at rest - #4167

Merged
chubes4 merged 1 commit into
mainfrom
fix/bluesky-encrypt-app-password
Dec 1, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/bluesky-encrypt-app-password

Conversation

@chubes4

@chubes4 chubes4 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Bluesky's app_password was never registered as an encrypted auth field, so it is stored in plaintext in datamachine_auth_data. A production format scan (2026-12-01) found it is the only live provider secret still in plaintext. Every other provider's secrets are 4-part dm:enc:v1 envelopes.

This registers app_password for the bluesky provider through datamachine_auth_encrypted_fields. Both the provider read/write path and the static credential audit then treat it as a secret.

Rollout order

This must reach production, and the Bluesky config must be re-saved there, before #4166 (T5b) ships, because T5b makes plaintext values in encrypted fields fail closed.

Verification

WP-CLI on a SQLite WordPress 7.1 site with core and socials from this branch. Bluesky config seeded with a plaintext app_password, as production stores it:

{"read_plain_before_resave":"plain-app-pw","raw_prefix":"dm:enc:v1:","raw_parts":4,"read_after":"plain-app-pw","audit":{"has_credentials":true,"undecryptable_counts":[]}}

The existing plaintext still reads, save_config() stores a fingerprinted 4-part envelope, and that envelope decrypts back to the original value.

AI disclosure: Claude (Anthropic) in the Pi coding agent, via a Roadie session at the maintainer's direction, wrote this change and PR.

@chubes4
chubes4 merged commit 472c566 into main Dec 1, 2026
5 checks passed
@chubes4
chubes4 deleted the fix/bluesky-encrypt-app-password branch December 1, 2026 14:11
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.

1 participant