From 66b02edc840b339a6a68f754cc33007897b8431a Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Thu, 20 Nov 2025 11:33:12 -0600 Subject: [PATCH] Fix screenshot directory deletion and update SSL dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Save screenshot_dir to database when scans complete so the directory is properly cleaned up on scan deletion. Previously the field was never populated, causing screenshots to remain after deleting scans. Update sslyze to 6.2.0 and cryptography to 46.0.0 to fix certificate handling issues with negative serial numbers (RFC 5280 compliance). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/requirements-web.txt | 7 ++----- app/requirements.txt | 2 +- app/src/scanner.py | 2 ++ app/web/services/scan_service.py | 2 ++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/requirements-web.txt b/app/requirements-web.txt index c20da59..fc4ef9e 100644 --- a/app/requirements-web.txt +++ b/app/requirements-web.txt @@ -12,7 +12,7 @@ alembic==1.13.0 # Authentication & Security Flask-Login==0.6.3 bcrypt==4.1.2 -cryptography>=42.0.0 +cryptography>=46.0.0 # API & Serialization Flask-CORS==4.0.0 @@ -34,7 +34,4 @@ python-dotenv==1.0.0 # Development & Testing pytest==7.4.3 -pytest-flask==1.3.0 - -# Cert Testing -sslyze==6.0.0 \ No newline at end of file +pytest-flask==1.3.0 \ No newline at end of file diff --git a/app/requirements.txt b/app/requirements.txt index 5f19147..dbb9e6c 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1,5 +1,5 @@ PyYAML==6.0.1 python-libnmap==0.7.3 -sslyze==6.0.0 +sslyze==6.2.0 playwright==1.40.0 Jinja2==3.1.2 diff --git a/app/src/scanner.py b/app/src/scanner.py index 69027f5..3964cb3 100644 --- a/app/src/scanner.py +++ b/app/src/scanner.py @@ -1054,6 +1054,8 @@ class SneakyScanner: # Preserve directory structure in ZIP arcname = f"{screenshot_dir.name}/{screenshot_file.name}" zipf.write(screenshot_file, arcname) + # Track screenshot directory for database storage + output_paths['screenshots'] = screenshot_dir output_paths['zip'] = zip_path print(f"ZIP archive saved to: {zip_path}", flush=True) diff --git a/app/web/services/scan_service.py b/app/web/services/scan_service.py index 2cc996e..9aea0b8 100644 --- a/app/web/services/scan_service.py +++ b/app/web/services/scan_service.py @@ -338,6 +338,8 @@ class ScanService: scan.html_path = str(output_paths['html']) if 'zip' in output_paths: scan.zip_path = str(output_paths['zip']) + if 'screenshots' in output_paths: + scan.screenshot_dir = str(output_paths['screenshots']) # Map report data to database models self._map_report_to_models(report, scan)