SonarQube Security Hotspot: Make sure this weak hash algorithm is not used in a sensitive context here. #125

Closed
opened 2026-05-29 11:44:32 -05:00 by forgejo-actions · 1 comment

SonarQube security hotspot needs review.

SonarQube key: 21285fb3-a91b-420b-bbe8-114b439ad8f8
Category: others
Vulnerability probability: LOW
Location: myvideogamelist:tests/Feature/Auth/EmailVerificationTest.php:27
Message: Make sure this weak hash algorithm is not used in a sensitive context here.

https://sonarqube.linuxbox.ninja/security_hotspots?id=myvideogamelist&hotspots=21285fb3-a91b-420b-bbe8-114b439ad8f8

SonarQube security hotspot needs review. **SonarQube key:** `21285fb3-a91b-420b-bbe8-114b439ad8f8` **Category:** `others` **Vulnerability probability:** `LOW` **Location:** `myvideogamelist:tests/Feature/Auth/EmailVerificationTest.php:27` **Message:** Make sure this weak hash algorithm is not used in a sensitive context here. https://sonarqube.linuxbox.ninja/security_hotspots?id=myvideogamelist&hotspots=21285fb3-a91b-420b-bbe8-114b439ad8f8 <!-- sonarqube:hotspot:21285fb3-a91b-420b-bbe8-114b439ad8f8 -->
jimmyb self-assigned this 2026-06-01 23:49:16 -05:00
Member

Reviewed and fixed in b4ac348. The weak SHA-1 use was in an auth feature test that was manually mirroring Laravel/Fortify's email verification hash contract, not hashing a password or token in production code. Updated tests/Feature/Auth/EmailVerificationTest.php to use Laravel's real VerifyEmail notification URL for the valid verification path, and a signed URL with a plain nonmatching hash for the invalid-hash path. No direct sha1() calls remain in that test. Verified with vendor/bin/pint --dirty --format agent and php artisan test --compact tests/Feature/Auth/EmailVerificationTest.php (3 passed, 6 assertions).

Reviewed and fixed in b4ac348. The weak SHA-1 use was in an auth feature test that was manually mirroring Laravel/Fortify's email verification hash contract, not hashing a password or token in production code. Updated tests/Feature/Auth/EmailVerificationTest.php to use Laravel's real VerifyEmail notification URL for the valid verification path, and a signed URL with a plain nonmatching hash for the invalid-hash path. No direct sha1() calls remain in that test. Verified with vendor/bin/pint --dirty --format agent and php artisan test --compact tests/Feature/Auth/EmailVerificationTest.php (3 passed, 6 assertions).
Codex closed this issue 2026-06-01 23:53:32 -05:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#125
No description provided.