Read 2026-10-22
grafana/loki: technical due diligence, read from its repository
What Borehole read in grafana/loki's code and history at bd029bc: 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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | strong |
| Engineering Process & SDLC Maturity | strong |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
What the repository says
README.md:27: The repository says it is feature-complete, in maintenance mode, or needs maintainers- Releases are cut from another branch than the one surveyed
LICENSE: Relicensed: Apache-2.0 → AGPL-3.0 (2021-04-20)README.md:78: names CNCF.gitmodules:1: 1 submodule(s) this survey does not read: operator/website/themes/doks
Architecture & Codebase — including AI provenance
strongpkg/logql/syntax/ast.go is 2,919 lines, 20× this codebase's median file
adequateThe median source file here is 142 lines. 11 files exceed 1,420 lines, the largest being 2,919. 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.
pkg/logql/syntax/ast.go:1 — 2,919 lines (20× median) |
pkg/loki/modules.go:1 — 2,621 lines (18× median) |
pkg/querier/queryrange/codec.go:1 — 2,582 lines (18× median) |
pkg/storage/stores/shipper/indexshipper/tsdb/index/index.go:1 — 2,524 lines (17× median) |
pkg/distributor/distributor.go:1 — 2,015 lines (14× median) |
Engineering Process & SDLC Maturity
strongNo finding.
Product & Engineering Maturity
adequate135 direct dependencies in a single manifest
adequatego.mod declares 135 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.
go.mod — 135 declared |
operator/go.mod — 24 declared |
operator/api/loki/go.mod — 5 declared |
pkg/push/go.mod — 3 declared |
The repository says it is feature-complete, in maintenance mode, or needs maintainers
adequateIts own README says so on line 27: "…n the stack, because Promtail is considered to be feature complete, and future development for logs collection will be ". New features are not planned, or the project is asking for maintainers. Ask who will carry it forward.
README.md:27 — …n the stack, because Promtail is considered to be feature complete, and future development for logs collection will be |
Releases are cut from another branch than the one surveyed
adequateThe newest release, v3.7.9, is not on the branch this survey read; the newest release on it is v2.1.0. The shipped product may differ from what this report describes. Survey the release branch too.
| tag v3.7.9 |
Security & Reliability Posture
adequate8 Dockerfiles run the application as root
adequateNo 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.
clients/cmd/docker-driver/Dockerfile — runs as root |
clients/cmd/fluent-bit/Dockerfile — runs as root |
cmd/logcli/Dockerfile — runs as root |
cmd/logql-analyzer/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate3 third-party CI actions are referenced by a tag or branch rather than a commit, so they run whatever that tag points to on the day. Tags have been moved to malicious commits in real supply-chain attacks, and a piped script is whatever the server returns that minute. Pinning to a commit is the fix, and it is small.
.github/workflows/deploy-pr-preview.yml:17 — action pinned by tag |
.github/workflows/helm-ci.yml:23 — action pinned by tag |
4 outbound calls can wait forever
adequate4 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.
pkg/lokifrontend/frontend/v2/frontend.go:248 — outbound call without a timeout |
pkg/lokifrontend/frontend/v2/frontend.go:324 — outbound call without a timeout |
pkg/lokifrontend/frontend/v2/frontend.go:368 — outbound call without a timeout |
2 vendored components with no licence
adequateThird-party code is committed into this repository without any statement of the terms it arrived under. Unknown terms are harder to deal with than inconvenient ones: an awkward licence can be complied with, an absent one cannot. Each of these needs its origin established before the code changes hands.
.github/vendor/workflows — 1 tracked files, no licence file |
operator/website/node_modules — 1 tracked files, no licence file |
Relicensed: Apache-2.0 → AGPL-3.0 (2021-04-20)
adequateThe 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.
4 advisories against this project in the last 24 months, 3 high or critical
adequateThe newest was published on 2026-10-15. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. Whether 4 of them are fixed in the code you ship could not be told from this history: its version is only known to be at least 2.1.0. Answer lives in: the release you run, set against each fixed version. The record is incomplete: NVD: 1 record names loki with nothing tying it to this repository (CVE-2005-1943).
| 2026-10-15: CVE-2026-9703 (high): Grafana's data source proxy did not apply role-based access control to write requests forwarded to Loki data sources. A user holding only the Viewer role on an |
| 2026-07-16: CVE-2026-21729 (high): Loki queries with large limits can cause large memory allocations which can impact the availability of the service, depending on its deployment strategy. |
| 2026-06-22: CVE-2026-42129 (high): A user with Viewer permissions can use a path traversal in the Loki data source plugin to reach administrative Loki endpoints and read sensitive backend configu |
| 2026-04-15: GHSA-497x-rrr9-68jp (moderate), fixed in 3.6.4: Grafana Loki Path Traversal - CVE-2021-36156 Bypass |
Observability & Operations
adequateNo error reporter is wired in
adequateNothing 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.
| no error reporter initialised |
6 of 10 deployed images carry no version, or `latest`
adequate6 images in the deployment configuration are named without a version or as `latest`. A redeploy can change the software without a commit, a rollback has nothing to roll back to, and nobody can say from the repository what is running.
operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml:2098 — image without a version |
operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml:2100 — image without a version |
operator/bundle/openshift/manifests/loki-operator.clusterserviceversion.yaml:2102 — image without a version |
Readiness and liveness probes are identical in 1 of 2 workloads
adequateBoth 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.
production/helm/loki/values.yaml — same probe endpoint twice |
Fit with the Acquirer
not assessableNot rated: structurally not assessable from a repository.
Read more, or read your own
The full report on grafana/loki: 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.