fix(security): bump base image versions to address CVEs#5467
Open
mert2m wants to merge 10 commits intolitmuschaos:masterfrom
Open
fix(security): bump base image versions to address CVEs#5467mert2m wants to merge 10 commits intolitmuschaos:masterfrom
mert2m wants to merge 10 commits intolitmuschaos:masterfrom
Conversation
- golang:1.24 → golang:1.24.13 (fixes CVE-2024-45336, CVE-2024-45340, CVE-2024-45341, CVE-2025-22865 and net/http, crypto/tls chain) - ubi9/ubi-minimal:9.6 → 9.7 (RHEL 9.7, Nov 2025 build) - ghcr.io/dexidp/dex:v2.43.0 → v2.45.1 (security + MySQL 8.0+ fix) No code changes required — all patch-level bumps, backward compatible. Signed-off-by: mert2m <polatmert159@gmail.com>
f31c81f to
8e7dd90
Compare
event-tracker, subscriber, and graphql/server were missing microdnf update in their runtime (packaging) stage, unlike authentication which already had it. Without this, OS-level CVEs in the base UBI image are not patched at build time. Signed-off-by: mert2m <polatmert159@gmail.com>
graphql/server and authentication servers were missing ReadTimeout, WriteTimeout, IdleTimeout, and ReadHeaderTimeout on http.Server, leaving them open to Slowloris-style denial-of-service attacks. nginx was missing standard security headers (X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy) on the frontend server block. Timeout values: ReadHeaderTimeout: 10s ReadTimeout: 60s WriteTimeout: 60s IdleTimeout: 120s Signed-off-by: mert2m <polatmert159@gmail.com>
- authentication/pkg/utils/mongo_database.go: fix context cancel() leak
in MongoConnection(); context.WithTimeout cancel was silently discarded
(ctx, _ pattern) causing goroutine/resource leak on timeout
- subscriber/subscriber.go: add logrus.Warn when SKIP_SSL_VERIFY=true
so operators are explicitly notified that TLS verification is disabled
- monitoring/utils: pin all floating/beta image tags to stable versions
grafana/grafana:latest → 11.4.0
node-exporter:latest → v1.10.2
mysqld-exporter:latest → v0.18.0
kube-state-metrics:v2.0.0-beta → v2.17.0
blackbox-exporter:v0.15.1 → v0.28.0
configmap-reload:v0.2.2 → v0.5.0
Signed-off-by: mert2m <polatmert159@gmail.com>
Upgrades the event-tracker component's Kubernetes dependency chain to address multiple security issues and bring the module to a supported release: - k8s.io/api, k8s.io/apimachinery, k8s.io/client-go: v0.22.1 → v0.32.5 - sigs.k8s.io/controller-runtime: v0.10.0 → v0.19.4 - k8s.io/apiextensions-apiserver, k8s.io/component-base: v0.22.1 → v0.32.5 - Removes form3tech-oss/jwt-go (CVE-2022-29217) and the entire Azure/go-autorest chain pulled in by the old client-go version Code changes required by the updated APIs: - main.go: replace deprecated ctrl.Options fields (MetricsBindAddress, Port, Namespace) with the new metricsserver.Options, webhook.NewServer, and cache.Options.DefaultNamespaces structures - informers.go: handle the (Registration, error) return value added to AddEventHandler in client-go v0.27; propagate errors via runtime.HandleError instead of silently discarding them - informers.go: fix pre-existing bug in RunDSInformer where dsOldObj was incorrectly assigned from newObj instead of oldObj, causing DaemonSet update events to never fire Note: run go mod tidy && go build ./... locally to regenerate go.sum before pushing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: mert <polatmert159@gmail.com>
- Add .github/workflows/event-tracker-unit-tests.yml: runs on PRs that touch chaoscenter/event-tracker/**, installs envtest binaries for k8s 1.32, executes go test with coverage, and posts a summary comment directly on the PR with pass/fail counts and per-package coverage breakdown. The comment is updated in-place on re-runs. - chaoscenter/Makefile: uncomment and fix the event-tracker test target (path was wrong: cluster-agents/event-tracker → event-tracker) - chaoscenter/event-tracker/Makefile: bump ENVTEST_K8S_VERSION from 1.22 to 1.32 to match the upgraded k8s.io/api dependency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: mert <polatmert159@gmail.com>
Adds 15 unit tests covering the core policy evaluation logic in pkg/utils/utils.go. These functions had zero test coverage previously. cases() — all 6 comparison operators plus unknown operator fallback: EqualTo, NotEqualTo, LessThan, GreaterThan, GreaterThanEqualTo, LessThanEqualTo, UnknownOperator conditionChecker() — condition type and operator combinations: - "and": all conditions match → true - "and": one condition fails → false (short-circuit) - "or": at least one condition matches → true - "or": no conditions match → false - Change operator: value changed → true - Change operator: value unchanged → false - Empty conditions list → false Tests run without a Kubernetes cluster; only the pure logic layer is exercised. PolicyAuditor() is excluded as it requires a live k8s connection and is covered by the envtest integration suite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: mert <polatmert159@gmail.com>
Contributor
|
Hey @mert2m Some checks are failing. Could you please look into it?? |
…kflow - chaoscenter/Makefile: fix backend-services-checks target path from cluster-agents/event-tracker to event-tracker (directory was renamed but the Makefile was never updated, causing CI to fail) - event-tracker-unit-tests.yml: run tests on ./pkg/... only instead of ./... to avoid pulling in the controllers/suite_test.go which requires envtest and kubebuilder CRD assets that are not available in CI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: mert <polatmert159@gmail.com>
Author
|
Hey @PriteshKiri , thanks for the heads up! The backend-checks failure was caused by a stale path in the Makefile (cluster-agents/event-tracker → event-tracker). I've pushed a fix — should be green now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
golang:1.24→golang:1.24.13(CVE-2024-45336, CVE-2024-45340, CVE-2024-45341, CVE-2025-22865)ubi9/ubi-minimal:9.6→9.7(RHEL 9.7, Nov 2025 build)ghcr.io/dexidp/dex:v2.43.0→v2.45.1(security + MySQL 8.0+ fix)No .go or frontend files changed — Dockerfile image tags only.