Skip to content

Commit 90aaffe

Browse files
committed
feat: [#428] upgrade default Prometheus image to v3.5.1
- update domain config and renderer expectations - align docs/examples in source comments - mark Prometheus remediation subtask complete
1 parent e5d4cb8 commit 90aaffe

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/issues/428-docker-vulnerability-analysis-apr8-2026.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ For each image, execute these steps in order:
103103
#### 6. Prometheus (`prom/prometheus:v3.5.0`)
104104

105105
- [x] Analysis and triage completed
106-
- [ ] Easy remediation implemented (if available)
106+
- [x] Easy remediation implemented (if available)
107107
- [ ] Image rebuilt and validated
108108
- [ ] Trivy re-scan completed and compared
109109
- [ ] Scan docs updated

src/application/command_handlers/show/info/docker_images.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct DockerImagesInfo {
1212
/// `MySQL` Docker image reference (e.g. `mysql:8.4`), present when `MySQL` is configured
1313
pub mysql: Option<String>,
1414

15-
/// Prometheus Docker image reference (e.g. `prom/prometheus:v3.5.0`), present when configured
15+
/// Prometheus Docker image reference (e.g. `prom/prometheus:v3.5.1`), present when configured
1616
pub prometheus: Option<String>,
1717

1818
/// Grafana Docker image reference (e.g. `grafana/grafana:12.3.1`), present when configured

src/domain/prometheus/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const DEFAULT_SCRAPE_INTERVAL_SECS: u32 = 15;
2121
pub const PROMETHEUS_DOCKER_IMAGE_REPOSITORY: &str = "prom/prometheus";
2222

2323
/// Docker image tag for the Prometheus container
24-
pub const PROMETHEUS_DOCKER_IMAGE_TAG: &str = "v3.5.0";
24+
pub const PROMETHEUS_DOCKER_IMAGE_TAG: &str = "v3.5.1";
2525

2626
/// Prometheus metrics collection configuration
2727
///
@@ -95,7 +95,7 @@ impl PrometheusConfig {
9595
/// use torrust_tracker_deployer_lib::domain::prometheus::PrometheusConfig;
9696
///
9797
/// let image = PrometheusConfig::docker_image();
98-
/// assert_eq!(image.full_reference(), "prom/prometheus:v3.5.0");
98+
/// assert_eq!(image.full_reference(), "prom/prometheus:v3.5.1");
9999
/// ```
100100
#[must_use]
101101
pub fn docker_image() -> DockerImage {

src/infrastructure/templating/docker_compose/template/renderer/docker_compose.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ mod tests {
407407
"Rendered output should contain prometheus service"
408408
);
409409
assert!(
410-
rendered_content.contains("image: prom/prometheus:v3.5.0"),
410+
rendered_content.contains("image: prom/prometheus:v3.5.1"),
411411
"Should use Prometheus v3.5.0 image"
412412
);
413413
assert!(
@@ -466,7 +466,7 @@ mod tests {
466466

467467
// Verify Prometheus service is NOT present
468468
assert!(
469-
!rendered_content.contains("image: prom/prometheus:v3.5.0"),
469+
!rendered_content.contains("image: prom/prometheus:v3.5.1"),
470470
"Should not contain Prometheus service when config absent"
471471
);
472472
assert!(

src/infrastructure/templating/docker_compose/template/wrappers/docker_compose/context/prometheus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use super::service_topology::ServiceTopology;
1818
/// Uses `ServiceTopology` to share the common topology structure with other services.
1919
#[derive(Serialize, Debug, Clone)]
2020
pub struct PrometheusServiceContext {
21-
/// Docker image reference (e.g. `prom/prometheus:v3.5.0`)
21+
/// Docker image reference (e.g. `prom/prometheus:v3.5.1`)
2222
pub image: String,
2323

2424
/// Service topology (ports and networks)

src/shared/docker_image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ mod tests {
130130
fn it_should_create_from_str_tuple() {
131131
let image = DockerImage::from(("prom/prometheus", "v3.5.0"));
132132

133-
assert_eq!(image.full_reference(), "prom/prometheus:v3.5.0");
133+
assert_eq!(image.full_reference(), "prom/prometheus:v3.5.1");
134134
}
135135

136136
#[test]

0 commit comments

Comments
 (0)