[SECURITY] LOW: Bare except: clauses swallow security-relevant errors #9

Closed
opened 2026-03-25 10:39:33 +01:00 by shoko · 0 comments
Owner

Severity: LOW

Bare except: pass at 5 locations (lines 169, 183, 269, 308, 456) catches ALL exceptions including KeyboardInterrupt, SystemExit, MemoryError, and OSError. This silently hides errors that might indicate security problems.

Location

scripts/browse.py lines 169, 183, 269, 308, 456

Current Behavior

try:
    end_dt = datetime.fromisoformat(end_str.replace('Z', '+00:00'))
    ...
except:
    pass  # Silently ignores ALL errors
try:
    end_dt = datetime.fromisoformat(end_str.replace('Z', '+00:00'))
    ...
except (ValueError, TypeError):
    pass  # Only catch expected exceptions

Reference

See reviews/2026-03-25.md Section 6.7

## Severity: LOW Bare `except: pass` at 5 locations (lines 169, 183, 269, 308, 456) catches ALL exceptions including `KeyboardInterrupt`, `SystemExit`, `MemoryError`, and `OSError`. This silently hides errors that might indicate security problems. ## Location `scripts/browse.py` lines 169, 183, 269, 308, 456 ## Current Behavior ```python try: end_dt = datetime.fromisoformat(end_str.replace('Z', '+00:00')) ... except: pass # Silently ignores ALL errors ``` ## Recommended Fix ```python try: end_dt = datetime.fromisoformat(end_str.replace('Z', '+00:00')) ... except (ValueError, TypeError): pass # Only catch expected exceptions ``` ## Reference See `reviews/2026-03-25.md` Section 6.7
shoko added the lowsecurity labels 2026-03-25 10:39:34 +01:00
shoko closed this issue 2026-03-27 04:10:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jujutsu-skills#9