Skip to content

fix: CVEs in release 3.7.x#21771

Open
sandeepsukhani wants to merge 8 commits intorelease-3.7.xfrom
fix-release-3.7.x-CVEs
Open

fix: CVEs in release 3.7.x#21771
sandeepsukhani wants to merge 8 commits intorelease-3.7.xfrom
fix-release-3.7.x-CVEs

Conversation

@sandeepsukhani
Copy link
Copy Markdown
Contributor

@sandeepsukhani sandeepsukhani commented May 6, 2026

What this PR does / why we need it:
It includes the following changes to fix a bunch of CVEs:

  1. Update go version to 1.26.2.
  2. Update Prometheus to v0.311.2-0.20260410083055-07c6232d159b.
  3. Consistently use grafana/loki-build-image:0.35.1 everywhere. Updated using loki-build-image/version-updater.sh.
  4. update alpine docker tag to v3.23.4.
  5. Fixed an issue in azureeventhubs promtail target reported by Cursor in PR for fixing CVEs in release-3.6.x.

Note

Medium Risk
Moderate risk due to a Go toolchain upgrade, large dependency/vendor updates (including Prometheus) and container base image changes, which can affect builds and runtime behavior. The only behavioral code change is in Promtail Azure Event Hubs parsing and should be low-risk but alters which records are emitted.

Overview
Updates the project toolchain and build/release plumbing to address CVEs: bumps Go to 1.26.2 across go.mod, Makefile, GitHub Actions, and multiple Dockerfiles, and standardizes build containers on grafana/loki-build-image:0.35.1 with Alpine 3.23.4.

Refreshes dependencies (notably Prometheus and OpenTelemetry/AWS SDK-related modules), including updating vendored AWS SDK service packages.

Fixes Promtail Azure Event Hubs parsing so records dropped by relabeling rules are skipped (rather than failing the whole batch), and updates ruler rule loading to match the newer Prometheus rulefmt.ParseFile signature by providing a no-op slog logger and adjusting service discovery metrics wiring.

Reviewed by Cursor Bugbot for commit fcd3704. Bugbot is set up for automated code reviews on this repo. Configure here.

@sandeepsukhani sandeepsukhani marked this pull request as ready for review May 6, 2026 12:36
Comment thread pkg/ruler/rulestore/local/local_test.go Outdated

func (testFileLoader) Load(identifier string, ignoreUnknownFields bool, nameValidationScheme model.ValidationScheme) (*rulefmt.RuleGroups, []error) {
return rulefmt.ParseFile(identifier, ignoreUnknownFields, nameValidationScheme, parser.NewParser(parser.Options{}))
parseLog := slog.New(slog.NewTextHandler(io.Discard, nil))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: name could be a bit more specific IMO

Suggested change
parseLog := slog.New(slog.NewTextHandler(io.Discard, nil))
noopLogger := slog.New(slog.NewTextHandler(io.Discard, nil))

Comment thread pkg/ruler/base/storage.go Outdated
type defaultFileLoader struct {
p parser.Parser
p parser.Parser
parseLog *slog.Logger
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we usually name it logger

Suggested change
parseLog *slog.Logger
logger *slog.Logger

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