Borehole · Project · free tier
grafana/mimir
Free reading: not for reliance
d4e93fd · 16,252 commits · 15,674 files
Read 2026-10-22

grafana/mimir: technical due diligence, read from its repository

What Borehole read in grafana/mimir's code and history at d4e93fd: its licence, security advisories, releases, review practice, tests, dependencies and operations. Every finding cites the file and line it rests on. The full report also covers the team and asks the questions the code cannot answer.

DimensionRating
Architecture & Codebase — including AI provenanceadequate
Engineering Process & SDLC Maturitystrong
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot assessable

What the repository says

  • LICENSE: Relicensed: Apache-2.0 → AGPL-3.0 (2021-08-05)

Architecture & Codebase — including AI provenance

adequate
01.6

pkg/distributor/distributor.go is 4,055 lines, 28× this codebase's median file

adequate

The median source file here is 143 lines. 13 files exceed 1,430 lines, the largest being 4,055. Size is not a defect on its own — some problems genuinely live in one place — but these are where merge conflicts, review fatigue and single-owner knowledge concentrate, and they are the first thing that slows an inheriting engineer down.

Evidence
pkg/distributor/distributor.go:1 — 4,055 lines (28× median)
operations/mimir-mixin/dashboards/dashboard-utils.libsonnet:1 — 2,535 lines (17× median)
pkg/util/validation/limits.go:1 — 2,316 lines (16× median)
pkg/storegateway/bucket.go:1 — 2,200 lines (15× median)
pkg/mimir/modules.go:1 — 1,853 lines (12× median)
01.25

1 base image floats: no version, or `latest`

adequate

1 of 22 `FROM` lines in product Dockerfiles name an image without a version, or with `latest`. Each build pulls whatever the registry serves that day, so the image that ships can change without a commit, and last month's build cannot be reproduced. Pin a version, or a digest.

Evidence
operations/mimir-mixin-tools/screenshots/Dockerfile:2 — base image without a version
01.42

1 model weight file committed directly to git

adequate

1 model weight files are stored in git itself, not in LFS, DVC or a model hub. Every clone carries them, the history keeps every version for good, and nothing records which run or data produced them.

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

adequate
04.3

98 direct dependencies in a single manifest

adequate

go.mod declares 98 direct dependencies. Each one is a maintenance obligation, a supply-chain surface and a potential licence question that transfers with the asset. The count says nothing about whether any given dependency was a good choice; it says how many such choices a buyer inherits.

Evidence
go.mod — 98 declared
operations/mimir-mixin-tools/screenshots/go.mod — 3 declared
mimir-build-image/go.mod — 0 declared

Security & Reliability Posture

adequate
05.6

9 Dockerfiles run the application as root

adequate

No USER instruction switches away from root, so the process runs with full privileges inside the container. It is a one-line fix and an ordinary expectation, which is why its absence is worth asking about: it usually says more about whether anyone has reviewed the deployment than about this container specifically.

Evidence
cmd/metaconvert/Dockerfile — runs as root
cmd/mimir/Dockerfile — runs as root
cmd/mimirtool/Dockerfile — runs as root
cmd/query-tee/Dockerfile — runs as root
05.13

5 outbound calls can wait forever

adequate

5 HTTP calls use a client with no timeout (Python `requests` without `timeout=`, or Go's default client). When a dependency slows down, each one holds a worker until the connection gives up, and enough of them take the service down with the dependency.

Evidence
pkg/frontend/v2/frontend.go:346 — outbound call without a timeout
pkg/frontend/v2/frontend.go:356 — outbound call without a timeout
pkg/frontend/v2/frontend.go:462 — outbound call without a timeout
05.26

3 locked dependencies have published vulnerabilities, 1 high or critical in what ships

adequate

3 of 620 locked dependencies match 3 published advisories in OSV, 1 of them rated high or critical. A lockfile says which version is installed, not whether the flawed code is reachable from this product, so each needs a look. Most are fixed by an upgrade, and the advisory names the version. This lockfile pins development tools alongside what ships and does not say which is which, so some of these may never reach a user.

Evidence
go.mod — github.com/prometheus/prometheus v1.99.0: GHSA-8rm2-7qqf-34qm (high), fixed in 0.311.3
mimir-build-image/go.mod — go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.15.0: GHSA-w34q-cm8f-9c5x (moderate), fixed in 0.21.0
mimir-build-image/go.mod — go.opentelemetry.io/otel/sdk/log v0.19.0: GHSA-hjf4-fphr-2h65 (moderate), fixed in 0.21.0
05.60

Relicensed: Apache-2.0 → AGPL-3.0 (2021-08-05)

adequate

The root licence changed 1 time(s). The latest terms restrict what users, hosts or a buyer may do in ways the earlier ones did not. Code taken under the old terms stays under them, so both matter in diligence.

Evidence
LICENSE — Apache-2.0 from 2016-11-04
LICENSE — AGPL-3.0 from 2021-08-05

Observability & Operations

adequate
06.9

No error reporter is wired in

adequate

Nothing in the service initialises an error reporter (Sentry, Rollbar, Bugsnag, Honeybadger or an APM agent). An exception in production reaches a person only if someone is reading the logs, which usually means a customer reports it first.

Evidence
no error reporter initialised
06.35

Sends usage data to stats.grafana.org by default

adequate

pkg/usagestats/reporter.go sends to stats.grafana.org, and operations/mimir/mimir-flags-defaults.json leaves reporting on as shipped. Every installation reports to the vendor unless its operator turns this off. For a buyer running it inside their own product, that is an outbound data flow to a third party: ask what is sent, how often, and whether the buyer's customers were told.

Evidence
pkg/usagestats/reporter.go:38 — reports to stats.grafana.org
operations/mimir/mimir-flags-defaults.json:1620 — the reporting setting is on by default
06.14

Readiness and liveness probes are identical in 1 of 1 workloads

adequate

Both probes call the same endpoint. When a dependency slows down, the liveness probe fails with the readiness probe, so the platform restarts pods that only needed taking out of rotation, and a partial outage becomes a full one. Liveness should ask whether the process is alive; readiness whether it can serve.

Evidence
operations/helm/charts/mimir-distributed/values.yaml — same probe endpoint twice

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on grafana/mimir: every dimension, the questions for the room, and the audit log.

Survey a repository: free on public repositories. Private code is read on your own machine by a collector whose source you can read first.