# Missing Exception Handling in Critical Operations - ID: python-uncaught-exception - Severity: MEDIUM - CWE: CWE-755 (CWE-755) - Languages: Python ## Description Detects critical operations (database, file I/O, network calls, external APIs) that lack proper exception handling. Uncaught exceptions can crash the application, leak sensitive information, or leave the system in an inconsistent state. ## Remediation Wrap database, file, network, and API operations in try/except blocks. ```python import logging import requests logger = logging.getLogger(__name__) def fetch_data(url): try: response = requests.get(url, timeout=5) response.raise_for_status() return response.json() except requests.RequestException as e: logger.error(f"Request failed: {e}") return None ``` Learn more: https://shoulder.dev/learn/python/cwe-755/uncaught-exception ## Documentation [object Object] ## Related Rules - **Incomplete Error Handling** [MEDIUM]: - **Resource Exhaustion via Exception Handling** [MEDIUM]: - **Security Check Failing Open** [HIGH]: