From 3b194f4824c3be9b2ab59e5fe6aa3b6e5f1467b8 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Feb 2026 05:08:34 +0000 Subject: [PATCH] fix: sync setup.py version/python-requires with pyproject.toml, add logging to notifications - Update setup.py version from 1.0.0 to 1.5.0 to match pyproject.toml - Update python_requires from >=3.8 to >=3.10 to match pyproject.toml - Update setup.py classifiers: remove 3.8/3.9, add 3.12 - Fix Python version references across all docs (README, CONTRIBUTING, getting-started, index.rst, TOPICS.md, bug_report template) - Add logging to 6 silent except blocks in notifications.py that swallowed errors without any diagnostic output https://claude.ai/code/session_01W1kSjHVKvCByvEBprEyPhN --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/TOPICS.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 4 ++-- docs/getting-started.md | 2 +- docs/index.rst | 2 +- setup.py | 7 +++---- src/redops/modules/notifications.py | 21 +++++++++++++++------ 8 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4835130..88d367c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,8 +21,8 @@ A clear and concise description of what you expected to happen. ## Environment - OS: [e.g. Ubuntu 22.04] -- Python version: [e.g. 3.9] -- RedOPS version: [e.g. 1.0.0] +- Python version: [e.g. 3.12] +- RedOPS version: [e.g. 1.5.0] - Command used: [e.g. python -m redops.main run …] ## Additional Context diff --git a/.github/TOPICS.md b/.github/TOPICS.md index 2dbd763..5bf9982 100644 --- a/.github/TOPICS.md +++ b/.github/TOPICS.md @@ -74,5 +74,5 @@ Topics have been configured in `pyproject.toml` with proper classifiers: - Intended Audience: Information Technology, System Administrators - Topic: Security, System Networking Monitoring - License: MIT -- Programming Language: Python 3.8-3.12 +- Programming Language: Python 3.10-3.12 - Environment: Console diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4044d5..0211607 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ We are committed to providing a welcoming and inclusive environment for all cont ### Prerequisites -- Python 3.8 or higher +- Python 3.10 or higher - Git - Basic understanding of OSINT, security assessment, or related fields - Familiarity with modular Python development diff --git a/README.md b/README.md index cfdd5d5..9a8e524 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # RedOPS Framework [![CI Pipeline](https://github.com/AreteDriver/RedOPS/actions/workflows/ci.yml/badge.svg)](https://github.com/AreteDriver/RedOPS/actions/workflows/ci.yml) -[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) +[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) **Professional Cybersecurity Intelligence & Attack Surface Management Platform** @@ -189,7 +189,7 @@ RedOPS is designed with strict ethical and operational boundaries: ## Installation ### Requirements -- Python 3.8 or higher +- Python 3.10 or higher - pip package manager - (Optional) Virtual environment recommended diff --git a/docs/getting-started.md b/docs/getting-started.md index bdabf0d..1d3b77c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -4,7 +4,7 @@ This guide will help you get up and running with RedOPS. ## Prerequisites -- Python 3.8 or higher +- Python 3.10 or higher - pip package manager ## Installation diff --git a/docs/index.rst b/docs/index.rst index b59280a..fd1366e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ RedOPS Documentation ==================== -.. image:: https://img.shields.io/badge/python-3.8+-blue.svg +.. image:: https://img.shields.io/badge/python-3.10+-blue.svg :target: https://www.python.org/downloads/ .. image:: https://img.shields.io/badge/license-MIT-green.svg diff --git a/setup.py b/setup.py index b490241..1e0e276 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name="redops", - version="1.0.0", + version="1.5.0", description="Advanced modular AI-assisted recon, forensics, and exposure-analysis framework", long_description=long_description, long_description_content_type="text/markdown", @@ -17,7 +17,7 @@ url="https://github.com/AreteDriver/RedOPS", packages=find_packages(where="src"), package_dir={"": "src"}, - python_requires=">=3.8", + python_requires=">=3.10", install_requires=[ "pydantic>=2.0.0", ], @@ -39,9 +39,8 @@ "Intended Audience :: Information Technology", "Topic :: Security", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) diff --git a/src/redops/modules/notifications.py b/src/redops/modules/notifications.py index 68fc524..e1a45c0 100644 --- a/src/redops/modules/notifications.py +++ b/src/redops/modules/notifications.py @@ -8,6 +8,7 @@ - Webhooks (generic) """ +import logging import os import smtplib from email.mime.text import MIMEText @@ -16,6 +17,8 @@ from dataclasses import dataclass from datetime import datetime, timezone +logger = logging.getLogger(__name__) + try: import requests @@ -262,7 +265,8 @@ def _send_slack(self, message: dict[str, Any], critical: int, high: int) -> bool timeout=10, ) return response.status_code == 200 - except Exception: + except Exception as e: + logger.warning("Failed to send Slack notification: %s", e) return False def _send_slack_alert(self, title: str, message: str, color: str) -> bool: @@ -289,7 +293,8 @@ def _send_slack_alert(self, title: str, message: str, color: str) -> bool: timeout=10, ) return response.status_code == 200 - except Exception: + except Exception as e: + logger.warning("Failed to send Slack alert: %s", e) return False def _send_discord(self, message: dict[str, Any], critical: int, high: int) -> bool: @@ -333,7 +338,8 @@ def _send_discord(self, message: dict[str, Any], critical: int, high: int) -> bo timeout=10, ) return response.status_code in (200, 204) - except Exception: + except Exception as e: + logger.warning("Failed to send Discord notification: %s", e) return False def _send_discord_alert(self, title: str, message: str, color: str) -> bool: @@ -363,7 +369,8 @@ def _send_discord_alert(self, title: str, message: str, color: str) -> bool: timeout=10, ) return response.status_code in (200, 204) - except Exception: + except Exception as e: + logger.warning("Failed to send Discord alert: %s", e) return False def _send_email(self, subject: str, body: str) -> bool: @@ -386,7 +393,8 @@ def _send_email(self, subject: str, body: str) -> bool: server.send_message(msg) return True - except Exception: + except Exception as e: + logger.warning("Failed to send email notification: %s", e) return False def _send_webhook(self, url: str, data: dict[str, Any]) -> bool: @@ -397,7 +405,8 @@ def _send_webhook(self, url: str, data: dict[str, Any]) -> bool: try: response = requests.post(url, json=data, timeout=10) return response.status_code in (200, 201, 202, 204) - except Exception: + except Exception as e: + logger.warning("Failed to send webhook to %s: %s", url, e) return False