fix: [#428] Docker vulnerability remediation pass 1 (all 8 images)#436
fix: [#428] Docker vulnerability remediation pass 1 (all 8 images)#436josecelano merged 39 commits intomainfrom
Conversation
- add/update Docker scan reports for April 8, 2026 - add issue specification and sequential per-image remediation plan - rename spec file with issue prefix and set issue reference - add cspell dictionary term for remediation planning
- install gnupg only for OpenTofu installation step - purge gnupg/dirmngr after OpenTofu install - apply package upgrade during runtime dependency install - mark deployer remediation subtask complete
- confirm deployer build and smoke test after remediation - update scan counts to 44 HIGH / 1 CRITICAL - mark rebuild, re-scan, and docs subtasks complete
- add apt-get upgrade in backup base image - mark backup remediation subtask complete
- backup image rebuilt and validated - vulnerability counts unchanged at 6 HIGH / 0 CRITICAL - mark backup verification and docs subtasks complete
- apply apk upgrade to pick latest security fixes - remove duplicate ssh host-key generation step - mark ssh remediation subtask complete
- record vuln scan improvement to 0 HIGH / 0 CRITICAL - document expected secret-scan test key findings - mark ssh image checklist complete
- use --no-install-recommends - add apt-get upgrade in base install step - mark provisioned-instance remediation subtask complete
- record scan improvement from 12 HIGH to 0 - mark image 4 checklist fully complete
- update compose template caddy image tag - sync docker security workflow image matrix - mark caddy remediation subtask complete
- update caddy scan baseline to 2.10.2 - document reduction from 18/6 to 14/4 (HIGH/CRITICAL) - mark caddy verification/docs subtasks complete
- update domain config and renderer expectations - align docs/examples in source comments - mark Prometheus remediation subtask complete
- update scan baseline to prom/prometheus:v3.5.1 - document reduction from 16/4 to 6/4 (HIGH/CRITICAL) - mark prometheus verification/docs subtasks complete
- update domain config and code references - align source examples and tests - mark Grafana remediation subtask complete
- update scan baseline to grafana/grafana:12.4.2 - document reduction from 18/6 to 4/0 (HIGH/CRITICAL) - mark Grafana verification/docs subtasks complete
- evaluated candidate tags; no safer easy upgrade selected - validated mysql:8.4 runtime behavior
- correct mysql counts to 7 HIGH / 1 CRITICAL - document no-safe-upgrade decision for this pass - mark mysql rescan/docs subtasks complete
…ed root cause) The SSH connectivity timeout in GitHub runners was caused by files checked out with world/group-readable permissions. OpenSSH silently rejects private keys that aren't exactly mode 0600. The CI test failure when permissions normalization was disabled confirms this is the actual root cause, not a flaky test. Normalizing to 0600 ensures SSH keys work regardless of git checkout permissions.
|
ACK 7a44e51 |
📋 For Existing Deployments: How to Apply Docker Image RemediationIf you've already deployed the tracker using a previous version of the deployer (before this PR), you'll need to manually update your Docker images to benefit from these vulnerability fixes. Docker Images to Update
All other services are already updated in this version of the deployer. Update Steps
VerificationAfter updating, you can verify the new image tags are running: docker images | grep -E "prom/prometheus|grafana/grafana|caddy"Expected output (or similar): Rollback (if needed)If you experience issues, you can quickly rollback by reverting the docker compose up -d prometheus grafana caddyWhat About Future Deployments?Any new deployments created with this version of the deployer (v0.1.0+) will automatically use the updated image versions. The deployer pins these versions in the code:
Related: See issue #437 for tracking remaining unresolved CVEs and future security improvements. |
|
Follow-up on the Root cause identified in workflow logs: third-party SARIF uploads are failing with HTTP 422 because the custom This warning is therefore a code-scanning upload/configuration issue, not a regression in the Docker remediation work in this PR. I opened a dedicated fix issue: #437. Given all required CI checks are green and this warning is |
Summary
This PR implements Docker vulnerability remediation pass 1 for all 8 images tracked in issue #428. Each image was scanned with Trivy, remediation was applied where possible, results were verified, and follow-up issues were created for remaining unresolved CVEs.
Closes #428
Changes by Image
1.
torrust/tracker-deployer(trixie) — partial remediationgnupgfrom runtime layer to reduce attack surface2.
torrust/tracker-backup(trixie) — remediation no changeapt-get upgrade -yto base layer3.
torrust/tracker-ssh-server(Alpine 3.23.3) — fully remediated ✅apk upgrade --no-cacheto base layerecho→printffor multi-line in Alpine)4.
torrust/tracker-provisioned-instance(Ubuntu 24.04) — fully remediated ✅--no-install-recommends+apt-get upgrade -yto base layer5.
caddy(3rd-party) — partial remediation2.10→2.10.2indocker-compose.yml.teraand security scan CI workflow6.
prom/prometheus(3rd-party) — partial remediationv3.5.0→v3.5.1insrc/domain/prometheus/config.rs7.
grafana/grafana(3rd-party) — partial remediation12.3.1→12.4.2insrc/domain/grafana/config.rs8.
mysql(3rd-party) — monitored, no safe upgrademysql:8.4(floating tag resolves to 8.4.8) = 7 HIGH, 1 CRITICAL8.4.1–9.1) have 98–100 HIGH — floating tag is already optimalmysql:8.4→ Ver 8.4.8Documentation Updates
docs/security/docker/scans/— added remediation pass 1 sections to all 8 scan filesdocs/security/docker/scans/README.md— updated global summary tabledocs/issues/428-docker-vulnerability-analysis-apr8-2026.md— all checklists and acceptance criteria completeFollow-up Issues Created