🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
875 B
Python
23 lines
875 B
Python
from datetime import datetime
|
|
|
|
class QuarantineManager:
|
|
"""
|
|
A simplified, mock QuarantineManager for testing purposes.
|
|
It prints quarantined messages to the console instead of saving to a database.
|
|
"""
|
|
def __init__(self, database_url: str, **kwargs):
|
|
print(f"[MockQuarantine] Initialized with db_url: {database_url}")
|
|
|
|
def quarantine_message(self, message, secret_type: str, severity: str, redacted_content: str):
|
|
"""
|
|
Prints a quarantined message to the console.
|
|
"""
|
|
print("\n--- QUARANTINE ALERT ---")
|
|
print(f"Timestamp: {datetime.now().isoformat()}")
|
|
print(f"Severity: {severity}")
|
|
print(f"Secret Type: {secret_type}")
|
|
print(f"Original Content (from mock): {message.content}")
|
|
print(f"Redacted Content: {redacted_content}")
|
|
print("------------------------\n")
|
|
|