You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2026/05/30 13:19:57 UTC

[PR] security: migrate AES encryption from CBC to GCM with backward compatibility [incubator-devlake]

klesh opened a new pull request, #8895:
URL: https://github.com/apache/incubator-devlake/pull/8895

   ## Summary
   This PR fixes a security vulnerability where token encryption used AES-256-CBC with a deterministic IV and no message authentication.
   
   ## Changes
   - **AesEncrypt**: migrated to AES-256-GCM with a random 12-byte nonce per encryption
   - **AesDecrypt**: backward-compatible — tries GCM first, falls back to legacy CBC for existing data
   - **Tests**: updated to verify GCM format and that identical plaintexts produce different ciphertexts
   
   ## Security Impact
   - Eliminates deterministic IV (CWE-329 / CWE-330)
   - Adds message authentication via GCM (CWE-353)
   - Existing encrypted data remains decryptable without migration
   
   ## Files Changed
   - `backend/core/plugin/plugin_utils.go`
   - `backend/core/plugin/plugin_utils_test.go`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] security: migrate AES encryption from CBC to GCM with backward compatibility [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky merged PR #8895:
URL: https://github.com/apache/incubator-devlake/pull/8895


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org