Skip to content

Use secure randomness for session identifiers - #100

Merged
Babak (babaknaderi) merged 1 commit into
masterfrom
fix/codeql-insecure-randomness
Oct 20, 2026
Merged

Babak (babaknaderi) merged 1 commit into
masterfrom
fix/codeql-insecure-randomness

Conversation

@babaknaderi

Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@babaknaderi
Babak (babaknaderi) merged commit f184028 into master Oct 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants