Skip to content

Implement modernization plan: Docker, Python 3.12, CI/CD, and tests#33

Draft
Copilot wants to merge 5 commits into
masterfrom
copilot/implement-modernization-plan
Draft

Implement modernization plan: Docker, Python 3.12, CI/CD, and tests#33
Copilot wants to merge 5 commits into
masterfrom
copilot/implement-modernization-plan

Conversation

Copilot AI commented Dec 13, 2025

Copy link
Copy Markdown

Implements the modernization plan from docs/modernize-app-plan.md: containerization, Python 3.12 upgrade, uv package management, and CI/CD with multiple test suites.

Docker

  • Multi-stage Dockerfile with Ubuntu 24.04, non-root user, health checks
  • docker-compose.yml with app + Redis services (persistence enabled, memory limits)
  • docker-compose.cluster.yml for Redis high availability (master + replica + Sentinel for automatic failover)

Python 3.12 Compatibility

  • Updated pyproject.toml with modern build system (hatchling)
  • Fixed password hashing: sha256scrypt for Werkzeug 3.x
  • Updated config.py with robust Redis connection handling and DockerConfig class

CI/CD Workflows

  • ci.yml: Lint (Ruff) → Unit tests → Security scan → Docker build → Integration tests
  • security.yml: pip-audit, Safety, Bandit, Semgrep, Trivy container scan
  • docker.yml: Build and push to GHCR
  • All jobs have explicit permissions per CodeQL requirements

Test Suite

  • 35 unit tests across app, auth, models, and Nessus API modules
  • pytest fixtures with in-memory SQLite, filesystem sessions (no Redis dependency)
# Quick start with Docker (single Redis)
docker compose up -d

# High availability Redis cluster
docker compose -f docker-compose.yml -f docker-compose.cluster.yml up -d

# Run tests locally
python -m pytest tests/ -v

[!WARNING]

Custom agent used: NessusVisualizerModernizer
A Copilot agent that automates modernization of the NessusVisualizer repo. It enforces secure containerization (Ubuntu 24.04 base, OWASP/Snyk best practices), dependency upgrades, CI/CD pipelines, and visualization improvements.

Original prompt

using the plan laid out in "docs/modernize-app-plan.md" implement and improve. ensure multiple tests suites are built into github so we can validate it builds

Custom agent used: NessusVisualizerModernizer
A Copilot agent that automates modernization of the NessusVisualizer repo. It enforces secure containerization (Ubuntu 24.04 base, OWASP/Snyk best practices), dependency upgrades, CI/CD pipelines, and visualization improvements.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…s, and tests

Co-authored-by: SchwartzKamel <49488751+SchwartzKamel@users.noreply.github.com>
@socket-security

socket-security Bot commented Dec 13, 2025

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmypy@​1.19.182100100100100
Addedpytest-cov@​7.0.0100100100100100

View full report

Co-authored-by: SchwartzKamel <49488751+SchwartzKamel@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement and improve modernization plan with test suites Implement modernization plan: Docker, Python 3.12, CI/CD, and tests Dec 13, 2025
Copilot AI requested a review from SchwartzKamel December 13, 2025 21:01
@SchwartzKamel

Copy link
Copy Markdown
Owner

@copilot Let's extend the capability to use a docker redis and work in that cluster

Co-authored-by: SchwartzKamel <49488751+SchwartzKamel@users.noreply.github.com>

Copilot AI commented Dec 27, 2025

Copy link
Copy Markdown
Author

@copilot Let's extend the capability to use a docker redis and work in that cluster

Extended Docker configuration to support Redis cluster mode with high availability. Added in commit 454b04d:

  • docker-compose.cluster.yml: Redis master + replica + Sentinel for automatic failover
  • Enhanced docker-compose.yml: Added Redis persistence (appendonly yes) and memory limits
  • Updated config.py: Robust Redis connection handling with fallback support
  • DockerConfig class: Dedicated configuration for container deployments

Usage:

# Standard (single Redis)
docker compose up -d

# High availability cluster
docker compose -f docker-compose.yml -f docker-compose.cluster.yml up -d

Co-authored-by: SchwartzKamel <49488751+SchwartzKamel@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
23 Security Hotspots

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants