From dcd618d409e61152c5a7455e9940686d5f3d5a9a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 28 Nov 2026 12:46:32 +0000 Subject: [PATCH] fix(web-app-jitsi): hash the fake passwords of the realign test with PBKDF2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeQL alert 1329 on #3102 flagged the plain SHA-256 the test double used for its fake account passwords as a weak hash on sensitive data. The fixture and the stubbed prosodyctl now store PBKDF2-SHA-256 with 4096 iterations, the SCRAM iteration count Prosody itself uses. 🎯 Fix: 92 % 💥 Break: 1 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 91 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- .../web-app-jitsi/files/shell/test_realign_accounts.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/python/roles/web-app-jitsi/files/shell/test_realign_accounts.py b/tests/unit/python/roles/web-app-jitsi/files/shell/test_realign_accounts.py index 0af6c504af..914337f731 100644 --- a/tests/unit/python/roles/web-app-jitsi/files/shell/test_realign_accounts.py +++ b/tests/unit/python/roles/web-app-jitsi/files/shell/test_realign_accounts.py @@ -37,7 +37,9 @@ def record(entry): def digest(password): - return hashlib.sha256(password.encode("utf-8")).hexdigest() + return hashlib.pbkdf2_hmac( + "sha256", password.encode("utf-8"), b"accounts", 4096 + ).hex() if len(args) == 1 and args[0].startswith(">"): @@ -79,7 +81,9 @@ sys.exit(2) def digest(password): - return hashlib.sha256(password.encode("utf-8")).hexdigest() + return hashlib.pbkdf2_hmac( + "sha256", password.encode("utf-8"), b"accounts", 4096 + ).hex() class TestRealignAccounts(unittest.TestCase):