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:
@@ -12,7 +12,7 @@ alembic==1.13.0
|
|||||||
# Authentication & Security
|
# Authentication & Security
|
||||||
Flask-Login==0.6.3
|
Flask-Login==0.6.3
|
||||||
bcrypt==4.1.2
|
bcrypt==4.1.2
|
||||||
cryptography>=42.0.0
|
cryptography>=46.0.0
|
||||||
|
|
||||||
# API & Serialization
|
# API & Serialization
|
||||||
Flask-CORS==4.0.0
|
Flask-CORS==4.0.0
|
||||||
@@ -34,7 +34,4 @@ python-dotenv==1.0.0
|
|||||||
|
|
||||||
# Development & Testing
|
# Development & Testing
|
||||||
pytest==7.4.3
|
pytest==7.4.3
|
||||||
pytest-flask==1.3.0
|
pytest-flask==1.3.0
|
||||||
|
|
||||||
# Cert Testing
|
|
||||||
sslyze==6.0.0
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
PyYAML==6.0.1
|
PyYAML==6.0.1
|
||||||
python-libnmap==0.7.3
|
python-libnmap==0.7.3
|
||||||
sslyze==6.0.0
|
sslyze==6.2.0
|
||||||
playwright==1.40.0
|
playwright==1.40.0
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
|
|||||||
@@ -1054,6 +1054,8 @@ class SneakyScanner:
|
|||||||
# Preserve directory structure in ZIP
|
# Preserve directory structure in ZIP
|
||||||
arcname = f"{screenshot_dir.name}/{screenshot_file.name}"
|
arcname = f"{screenshot_dir.name}/{screenshot_file.name}"
|
||||||
zipf.write(screenshot_file, arcname)
|
zipf.write(screenshot_file, arcname)
|
||||||
|
# Track screenshot directory for database storage
|
||||||
|
output_paths['screenshots'] = screenshot_dir
|
||||||
|
|
||||||
output_paths['zip'] = zip_path
|
output_paths['zip'] = zip_path
|
||||||
print(f"ZIP archive saved to: {zip_path}", flush=True)
|
print(f"ZIP archive saved to: {zip_path}", flush=True)
|
||||||
|
|||||||
@@ -338,6 +338,8 @@ class ScanService:
|
|||||||
scan.html_path = str(output_paths['html'])
|
scan.html_path = str(output_paths['html'])
|
||||||
if 'zip' in output_paths:
|
if 'zip' in output_paths:
|
||||||
scan.zip_path = str(output_paths['zip'])
|
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
|
# Map report data to database models
|
||||||
self._map_report_to_models(report, scan)
|
self._map_report_to_models(report, scan)
|
||||||
|
|||||||
Reference in New Issue
Block a user