resolve Trivy HIGH/MEDIUM CVEs via dnf update and patroni on python3.12#27
Conversation
…oni on python3.12
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe container builds now apply current OS updates in both image variants, install Patroni with Python 3.12 and pinned dependency floors in the standard variant, and explicitly declare that no Trivy vulnerability suppressions are configured. ChangesContainer build updates
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Dockerfile (1)
126-127: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAvoid retaining pip’s cache in the final image.
pip caches downloaded responses and wheels by default; removing
python3.12-pipdoes not remove/root/.cache/pip. Use--no-cache-dirduring installation or purge the cache before removing pip. (pip.pypa.io)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 126 - 127, Update the Patroni installation command in the Dockerfile to disable pip’s cache using the appropriate pip option, ensuring no downloaded responses or wheels remain in the final image before python3.12-pip is removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Dockerfile`:
- Around line 119-126: Update the Patroni installation command to explicitly
require urllib3>=2.7.0 and requests>=2.33.0 alongside
patroni[etcd,jsonlogger,psycopg3]==4.1.3, or add an equivalent build-time
version assertion so these CVE-fixing floors are enforced.
---
Nitpick comments:
In `@Dockerfile`:
- Around line 126-127: Update the Patroni installation command in the Dockerfile
to disable pip’s cache using the appropriate pip option, ensuring no downloaded
responses or wheels remain in the final image before python3.12-pip is removed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a1b9ef0c-56a1-4a0e-b17c-1d7a37e7c521
📒 Files selected for processing (2)
.trivy/pgedge-postgres.trivyignore.yamlDockerfile
Remediates all Trivy CRITICAL/HIGH/MEDIUM findings in the pgedge-postgres images. The findings split into two root causes, each fixed in the shared Dockerfile:
installed package (including transitive deps) is patched to current errata.
(from Rocky AppStream), which pulls patched urllib3 2.7.0 and requests 2.34.2. The psycopg3 extra is added so patroni bundles its own libpq-backed driver instead of relying on the Python 3.9-only system psycopg2.
Verification
All three images rebuilt from the branch (no-cache, arm64) rescanned 0 CRITICAL / 0 HIGH / 0 MEDIUM (pg16, pg17, pg18), and pg18 passed 21/21 tests including the Patroni-under-python3.12 entrypoint test.