Conversation
- Remove exception details from HTTPException responses to prevent information disclosure (instances.py, search_queue.py) - Fix validation_error_handler crash when request body contains bytes by sanitizing exc.errors() before JSON serialization (main.py) - Blacklist current access token on password change for immediate session revocation (api/auth.py) - Add rate limiting (3/min) and failed-login lockout to disable_2fa endpoint to prevent brute-force attacks (api/auth.py) - Add dummy password verification on locked account check to prevent timing side-channel that reveals lock status (core/auth.py) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
menottim
added a commit
that referenced
this pull request
Mar 5, 2026
…alse positives Deleted leftover development scripts that logged secrets in plaintext: - test_sqlcipher.py (alerts #1, #2) - verify_phase1.py (alert #3) Dismissed 8 false positive alerts with explanations: - #4-7: py/incomplete-url-substring-sanitization in test assertions (not sanitization code) - #8: py/stack-trace-exposure in health check (str(e) only in logger, response is generic) - #9-10: py/weak-sensitive-data-hashing (SHA256 is pepper mixing before Argon2id, not the hash) - #11: py/stack-trace-exposure in prowlarr (hardcoded error message, not str(e)) - #13: py/stack-trace-exposure in dashboard (Instance model field, not exception) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
5 security fixes for the authentication subsystem:
str(e)from 7 HTTPException detail fields ininstances.pyandsearch_queue.py. Internal error details (table names, connection strings) were being returned to clients.TypeError: Object of type bytes is not JSON serializablewhen form-urlencoded input hits JSON endpoints. Now decodes bytes to strings.blacklist_access_token().disable_2famissing rate limit and lockout (High) — Added@limiter.limit("3/minute")andincrement_failed_login()on password failure.Severity: Critical + High + Medium
Test plan
disable_2farate limiting works (4th attempt within 1 min should be blocked)Ref:
docs/security-assessment-2026-02-27.mdfindings CRIT-3, HIGH-4, HIGH-7, MED-3, MED-5🤖 Generated with Claude Code