fix: code quality audit - thread safety, path hardening, PBKDF2 bump#12
Merged
Romain-Grosos merged 6 commits intomainfrom Mar 7, 2026
Merged
fix: code quality audit - thread safety, path hardening, PBKDF2 bump#12Romain-Grosos merged 6 commits intomainfrom
Romain-Grosos merged 6 commits intomainfrom
Conversation
Wrap all reads and writes to _last_analysis with a Lock to prevent race conditions with the ThreadPool (16 workers).
Use Path.resolve() to follow symlinks before validation and add is_file() check to reject non-existent or directory paths.
Double the OWASP 2023 minimum for PBKDF2-SHA256 (600k). No backward compatibility needed (no existing installations).
…ions - FR9: 12 words -> 16 words (12 secret + 4 salt) - Story 1.2 AC: iterations 600k -> 1.2M, mnemonic 12 -> 16 words - Story 4.4/5.2: update performance notes with new iteration count - Update all PRD shards consistently
- Add coverage >= 80% badge (enforced by CI --cov-fail-under=80) - Mark 5 roadmap items as Done: thread-safe state, path traversal, PBKDF2 bump, PRD mnemonic fix, coverage reporting
- Architecture mermaid diagrams: 12 words -> 16 words - Stories 1.2, 3.4, 4.4: update mnemonic word counts and iterations - QA gate 1.2: update status_reason with 16-word and 1.2M iterations - Test comment in conftest.py: 600,000 -> 1,200,000 - Roadmap: reorder Done items first
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.
Summary
Address findings from external code quality audit (score: 81/100, projected: ~91-94/100).
threading.Lockaround_last_analysisread/write in server/handler - Path traversal hardening: usePath.resolve()+is_file()check in/admin/analyzepath mode--cov-fail-under)Audit context
_last_analysisrace conditionthreading.Lockresolve()+is_file()Test plan