Borehole · Project · free tier
cockroachdb/cockroach
Free reading: not for reliance
d30c905 · 50,000 commits · 20,517 files
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.

DimensionRating
Architecture & Codebase — including AI provenancestrong
Engineering Process & SDLC Maturitystrong
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot 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

strong
01.6

pkg/sql/colexec/colexecprojconst/proj_const_left_ops.eg.go is 26,463 lines, 183× this codebase's median file

adequate

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

Evidence
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

strong

No finding.

Product & Engineering Maturity

adequate
04.3

216 direct dependencies in a single manifest

adequate

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

Evidence
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
04.17

Node.js 16 is past end of life

adequate

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

Evidence
.node-version — Node.js 16, end of life 2023-09-11
04.62

Releases are cut from another branch than the one surveyed

adequate

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

Evidence
tag v26.2.9

Security & Reliability Posture

adequate
05.6

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

05.27

The build runs third-party code it does not pin

adequate

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

Evidence
.github/workflows/blathers-backport.yml:44 — action pinned by tag
.github/workflows/blathers-backport.yml:264 — action pinned by tag
05.13

6 outbound calls can wait forever

adequate

6 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/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
05.20

133 SQL statements built from strings

adequate

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

Evidence
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
05.34

4 of 14 Kubernetes workloads declare no resource limits

adequate

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

Evidence
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
05.26

108 locked dependencies have published vulnerabilities, 23 high or critical in what ships

adequate

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

Evidence
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
05.45

4 workload settings give a container the host

adequate

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

05.49

The production build publishes source maps

adequate

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

Evidence
pkg/ui/workspaces/cluster-ui/webpack.config.js:39 — source maps in a production build
05.10

Licence text does not match a standard licence

adequate

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

Evidence
LICENSE:1 — 166 lines, unrecognised
05.60

Relicensed: Apache-2.0 → BUSL-1.1 (2019-06-04)

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 2014-02-06
LICENSE — BUSL-1.1 from 2019-06-04

Observability & Operations

adequate
06.35

Sends usage data to stats.stackexchange.com by default

adequate

pkg/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.

Evidence
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
06.18

1 of 5 deployed images carry no version, or `latest`

adequate

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

Evidence
cloud/kubernetes/v1.20/cockroachdb-statefulset.yaml:100 — image without a version

Fit with the Acquirer

not assessable

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