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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | strong |
| Engineering Process & SDLC Maturity | strong |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | strong |
| Fit with the Acquirer | not assessable |
What the repository says
- Releases are cut from another branch than the one surveyed
AGENTS.md:135: states a policy on AI-generated contributionsREADME.md:3: names OpenSSFREADME.md:37: names CNCF
Architecture & Codebase — including AI provenance
strongpkg/ingester/ingester.go is 4,088 lines, 32× this codebase's median file
adequateThe 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.
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
strongNo finding.
Product & Engineering Maturity
adequate87 direct dependencies in a single manifest
adequatego.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.
go.mod — 87 declared |
website/package.json — 1 declared |
website/go.mod — 0 declared |
API v1 and v2 have been served together for 34 months
adequatev2 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.
vendor/github.com/prometheus-community/prom-label-proxy/injectproxy/routes.go — v1 since Jan 2024 |
vendor/github.com/prometheus-community/prom-label-proxy/injectproxy/routes.go — v2 since Jan 2024 |
31 files still carry code deprecated more than two years ago
adequate31 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.
vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go — deprecated since Aug 2023 |
vendor/github.com/google/s2a-go/internal/proto/v2/common_go_proto/common.pb.go — deprecated since Aug 2023 |
vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go — deprecated since Nov 2023 |
vendor/google.golang.org/grpc/balancer/balancer.go — deprecated since Jan 2024 |
vendor/k8s.io/client-go/util/workqueue/delaying_queue.go — deprecated since Jan 2024 |
Releases are cut from another branch than the one surveyed
adequateThe 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.
| tag v1.22.0-rc.3 |
Security & Reliability Posture
adequate7 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.
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 |
The build runs third-party code it does not pin
adequate1 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.
build-image/Dockerfile:20 — download piped into a shell |
3 outbound calls can wait forever
adequate3 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/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 |
8 locked dependencies have published vulnerabilities, 3 high or critical in what ships
adequate8 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.
5 workload settings can give a container the host, behind a chart value or in a stack built from source
adequate5 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.
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
strongNo 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 |
2 of 10 deployed images carry no version, or `latest`
adequate2 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.
development/tsdb-blocks-storage-swift-single-binary/docker-compose.yml:10 — image without a version |
development/tsdb-blocks-storage-swift-single-binary/docker-compose.yml:21 — image without a version |
Fit with the Acquirer
not assessableNot 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.