From f210d5ff952525cdeb85c7a5106f8387b06f5ea0 Mon Sep 17 00:00:00 2001 From: Chris Huber Date: Tue, 1 Dec 2026 09:02:00 -0500 Subject: [PATCH] fix(socials): encrypt Bluesky app passwords at rest --- .../data-machine-socials/data-machine-socials.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/data-machine-socials/data-machine-socials.php b/plugins/data-machine-socials/data-machine-socials.php index f3697d099e..23388197cd 100644 --- a/plugins/data-machine-socials/data-machine-socials.php +++ b/plugins/data-machine-socials/data-machine-socials.php @@ -82,6 +82,19 @@ function datamachine_socials_bootstrap() { \DataMachineSocials\Bootstrap\PlatformBootstrap::instance()->register(); // Register task handlers for DM Task System. + // Bluesky app passwords are account credentials: encrypt them at rest. + add_filter( + 'datamachine_auth_encrypted_fields', + static function ( array $fields, string $provider_slug ): array { + if ( 'bluesky' === $provider_slug ) { + $fields[] = 'app_password'; + } + return $fields; + }, + 10, + 2 + ); + add_filter( 'datamachine_tasks', function ( array $tasks ): array { $tasks['social_cross_post'] = \DataMachineSocials\Tasks\SocialCrossPostTask::class; return $tasks;