Read 2026-10-22
cockroachdb/cockroach: technical due diligence, read from its repository
What Borehole read in cockroachdb/cockroach's code and history at d30c905: 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
- Releases are cut from another branch than the one surveyed
LICENSE: Relicensed: Apache-2.0 → BUSL-1.1 (2019-06-04).gitmodules:1: 4 submodule(s) this survey does not read: c-deps/jemalloc, c-deps/krb5, c-deps/geos
Architecture & Codebase — including AI provenance
strongpkg/sql/colexec/colexecprojconst/proj_const_left_ops.eg.go is 26,463 lines, 183× this codebase's median file
adequateThe median source file here is 144 lines. 223 files exceed 1,440 lines, the largest being 26,463. 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/sql/colexec/colexecprojconst/proj_const_left_ops.eg.go:1 — 26,463 lines (183× median) |
pkg/sql/parser/sql.y:1 — 20,836 lines (144× median) |
pkg/sql/colexec/colexecjoin/mergejoiner_fullouter.eg.go:1 — 15,479 lines (107× median) |
pkg/sql/colexec/colexecbase/cast.eg.go:1 — 15,261 lines (105× median) |
pkg/sql/colexec/colexecjoin/mergejoiner_exceptall.eg.go:1 — 14,325 lines (99× median) |
Engineering Process & SDLC Maturity
strongNo finding.
Product & Engineering Maturity
adequate216 direct dependencies in a single manifest
adequatego.mod declares 216 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 — 216 declared |
pkg/ui/workspaces/db-console/package.json — 56 declared |
pkg/ui/workspaces/cluster-ui/package.json — 42 declared |
pkg/ui/package.json — 10 declared |
Node.js 16 is past end of life
adequateThe code is pinned to Node.js 16 (end of life 2023-09-11). None of these receives security fixes any more; the first stopped on 2023-09-11. Moving off an unsupported runtime is rarely a one-line change, so a buyer should ask whether the upgrade is planned and what it touches.
.node-version — Node.js 16, end of life 2023-09-11 |
Releases are cut from another branch than the one surveyed
adequateThe newest release, v26.2.9, is not on the branch this survey read; the newest pre-release on it is v26.2.0-alpha.2. The shipped product may differ from what this report describes. Survey the release branch too. This was read from the most recent 50,000 commits (1 Apr 2022 to 23 Sep 2026) only; older history was not read.
| tag v26.2.9 |
Security & Reliability Posture
adequate3 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.
pkg/cmd/roachprod-centralized/docker/Dockerfile — runs as root |
pkg/cmd/roachprod/docker/Dockerfile — runs as root |
pkg/cmd/roachtest/dlq-replay/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate5 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/blathers-backport.yml:44 — action pinned by tag |
.github/workflows/blathers-backport.yml:264 — action pinned by tag |
6 outbound calls can wait forever
adequate6 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/ccl/changefeedccl/kafkaauth/sasl_proprietary_oauth.go:119 — outbound call without a timeout |
pkg/cmd/bazci/bazci.go:312 — outbound call without a timeout |
pkg/cmd/dev/util.go:237 — outbound call without a timeout |
133 SQL statements built from strings
adequate133 places in product code build SQL by formatting or joining strings rather than passing parameters, and in 5 of them a value, not a table or column name, goes into the string. Where any of those values comes from a request, it is an injection point. Each site needs a look; the fix, parameters, is small.
pkg/cli/node.go:246 — SQL built from a string |
pkg/jobs/registry.go:1213 — SQL built from a string |
pkg/jobs/registry.go:1303 — SQL built from a string |
4 of 14 Kubernetes workloads declare no resource limits
adequate4 workload manifests set no CPU or memory limits. One pod that leaks memory or spins can starve everything else on its node, and the scheduler cannot plan capacity for what it cannot see.
cloud/kubernetes/example-app-secure.yaml — workload with no limits |
cloud/kubernetes/example-app.yaml — workload with no limits |
cloud/kubernetes/multiregion/cockroachdb-statefulset-secure.yaml — workload with no limits |
108 locked dependencies have published vulnerabilities, 23 high or critical in what ships
adequate108 of 2,967 locked dependencies match 175 published advisories in OSV, 101 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.
go.mod — github.com/jackc/pgx/v5 v5.7.2: GHSA-9jj7-4m8r-rfcm (critical), fixed in 5.9.0 |
go.mod — golang.org/x/crypto v0.50.0: GHSA-5cgq-3rg8-m6cv (critical), fixed in 0.52.0 |
pkg/ui/pnpm-lock.yaml — @babel/traverse 7.22.6: GHSA-67hx-6x53-jw92 (critical), fixed in 7.23.2; a development dependency |
4 workload settings give a container the host
adequate4 places in the deployment configuration run a container privileged or in the host's network, process or IPC namespace. A compromise of that container is a compromise of the machine, and most acquirers' security reviews block it. Node agents (network, storage, monitoring) are excluded.
cloud/kubernetes/performance/cockroachdb-daemonset-insecure.yaml:81 — privileged or host namespace |
cloud/kubernetes/performance/cockroachdb-daemonset-secure.yaml:153 — privileged or host namespace |
cloud/kubernetes/performance/cockroachdb-statefulset-insecure.yaml:121 — privileged or host namespace |
The production build publishes source maps
adequateThe build configuration emits source maps for production, so the original source, with its comments and structure, is downloadable by every visitor. Upload them to an error tracker and keep them off the public server instead.
pkg/ui/workspaces/cluster-ui/webpack.config.js:39 — source maps in a production build |
Licence text does not match a standard licence
adequateLICENSE exists but its text does not match any standard licence. A bespoke or hand-edited licence is not wrong, but it cannot be cleared by recognising its name: counsel has to read it, and until they do neither side knows precisely what rights transfer with the code.
LICENSE:1 — 166 lines, unrecognised |
Relicensed: Apache-2.0 → BUSL-1.1 (2019-06-04)
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.
Observability & Operations
adequateSends usage data to stats.stackexchange.com by default
adequatepkg/sql/opt/memo/statistics_builder.go sends to stats.stackexchange.com, and pkg/server/status.go 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.
pkg/sql/opt/memo/statistics_builder.go:4935 — reports to stats.stackexchange.com |
pkg/server/status.go:4777 — the reporting setting is on by default |
1 of 5 deployed images carry no version, or `latest`
adequate1 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.
cloud/kubernetes/v1.20/cockroachdb-statefulset.yaml:100 — 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 cockroachdb/cockroach: 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.