mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-04 08:48:45 +00:00
fix(web-app-jitsi): hash the fake passwords of the realign test with PBKDF2
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
c51c896b8a
commit
dcd618d409
1 file changed
+6
-2
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user