Borehole · Project · free tier
cortexproject/cortex
Free reading: not for reliance
23b90b8 · 6,429 commits · 10,736 files
Read 2026-11-03

cortexproject/cortex: technical due diligence, read from its repository

What Borehole read in cortexproject/cortex's code and history at 23b90b8: 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 provenancestrong
Engineering Process & SDLC Maturitystrong
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsstrong
Fit with the Acquirernot assessable

What the repository says

  • Releases are cut from another branch than the one surveyed
  • AGENTS.md:135: states a policy on AI-generated contributions
  • README.md:3: names OpenSSF
  • README.md:37: names CNCF

Architecture & Codebase — including AI provenance

strong
01.6

pkg/ingester/ingester.go is 4,088 lines, 32× this codebase's median file

adequate

The median source file here is 126 lines. 9 files exceed 1,260 lines, the largest being 4,088. 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/ingester/ingester.go:1 — 4,088 lines (32× median)
pkg/distributor/distributor.go:1 — 1,841 lines (14× median)
pkg/ruler/ruler.go:1 — 1,800 lines (14× median)
pkg/ring/kv/memberlist/memberlist_client.go:1 — 1,529 lines (12× median)
pkg/util/validation/limits.go:1 — 1,398 lines (11× median)

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

adequate
04.3

87 direct dependencies in a single manifest

adequate

go.mod declares 87 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 — 87 declared
website/package.json — 1 declared
website/go.mod — 0 declared
04.37

API v1 and v2 have been served together for 34 months

adequate

v2 first appeared in Jan 2024, and v1 is still in the code 34 months later. Two versions mean two surfaces to secure, document and support. Ask who still calls the old one, and whether retiring it is planned.

04.38

31 files still carry code deprecated more than two years ago

adequate

31 files were marked deprecated over two years ago and still are, the oldest since Aug 2023. A deprecation is a promise to remove. Ask what still depends on these, and whether removing them is scheduled.

04.62

Releases are cut from another branch than the one surveyed

adequate

The newest pre-release, v1.22.0-rc.3, is not on the branch this survey read; the newest release on it is v1.21.1. The shipped product may differ from what this report describes. Survey the release branch too.

Evidence
tag v1.22.0-rc.3

Security & Reliability Posture

adequate
05.6

7 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
build-image/Dockerfile — runs as root
cmd/cortex/Dockerfile — runs as root
cmd/query-tee/Dockerfile — runs as root
cmd/thanosconvert/Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

1 step pipes a download straight into a shell. 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.

Evidence
build-image/Dockerfile:20 — download piped into a shell
05.13

3 outbound calls can wait forever

adequate

3 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:212 — outbound call without a timeout
pkg/frontend/v2/frontend.go:213 — outbound call without a timeout
pkg/frontend/v2/frontend.go:280 — outbound call without a timeout
05.26

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

adequate

8 of 350 locked dependencies match 13 published advisories in OSV, 4 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 v0.309.1: GHSA-8rm2-7qqf-34qm (high), fixed in 0.311.3
go.mod — go.etcd.io/etcd/client/pkg/v3 v3.5.17: GO-2026-6107 (high), fixed in 3.5.33
go.mod — github.com/go-jose/go-jose/v4 v4.1.4: GHSA-mgcc-cww5-fp2q (high), fixed in 4.1.6
05.45

5 workload settings can give a container the host, behind a chart value or in a stack built from source

adequate

5 places run a container privileged or in the host's namespaces only when a Helm value switches them on, or in a compose file that builds the product from this repository, which is how it is developed rather than how it ships. Neither is on by default in what ships. Ask whether production sets the value or runs that stack.

Evidence
development/tsdb-blocks-storage-swift-single-binary/docker-compose.yml:20 — host access behind a setting or in a local stack
development/tsdb-blocks-storage-swift-single-binary/docker-compose.yml:32 — host access behind a setting or in a local stack
development/tsdb-blocks-storage-swift-single-binary/docker-compose.yml:43 — host access behind a setting or in a local stack

Observability & Operations

strong
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.18

2 of 10 deployed images carry no version, or `latest`

adequate

2 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.

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on cortexproject/cortex: 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.