Repository navigation
Use secure randomness for session identifiers - #100
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused randomness changes preserve existing storage and session comparisons, with no unresolved blocking findings.
No open issues 🎉
What changed in this PR
Strengthens browser-session identifiers used for parallel-session detection in speech-quality study templates.
Changes:
- Replaces
Math.random()identifiers with 128-bit Web Crypto randomness. - Adds regression checks for secure generation and template coverage.
- Disables Git text normalization for HTML templates.
| File | Description |
|---|---|
| tests/test_security_templates.py | Adds security and template-coverage checks. |
| src/P808Template/P835_template.html | Uses cryptographically random session identifiers. |
| src/P808Template/P835_template_one_audio.html | Secures single-audio session identifiers. |
| src/P808Template/P831_ACR_template.html | Secures P.831 session identifiers. |
| src/P808Template/echo_impairment_test_template.html | Secures echo-test session identifiers. |
| src/P808Template/ACR_template.html | Secures ACR session identifiers. |
| .gitattributes | Disables HTML template text normalization. |
Review effort: Balanced
Vishak Gopal (vishakg)
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.