Fix screenshot directory deletion and update SSL dependencies

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 <noreply@anthropic.com>
This commit is contained in:
2025-11-20 11:33:12 -06:00
parent 73a3b95834
commit 480065ed14
4 changed files with 7 additions and 6 deletions

View File

@@ -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
@@ -35,6 +35,3 @@ python-dotenv==1.0.0
# Development & Testing
pytest==7.4.3
pytest-flask==1.3.0
# Cert Testing
sslyze==6.0.0

View File

@@ -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

View File

@@ -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)

View File

@@ -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)