Borehole · Project · free tier
dgraph-io/dgraph
Free reading: not for reliance
1714bf3 · 6,563 commits · 1,454 files
Read 2026-11-07

dgraph-io/dgraph: technical due diligence, read from its repository

What Borehole read in dgraph-io/dgraph's code and history at 1714bf3: 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 Maturitystrong
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot assessable

What the repository says

  • LICENSE: Relicensed: Apache-2.0 → Apache-2.0 with the Commons Clause and an attribution term (2018-04-03) → Apache-2.0 (2025-04-07)

Architecture & Codebase — including AI provenance

strong
01.6

systest/1million/common/tc.go is 9,241 lines, 48× this codebase's median file

adequate

The median source file here is 191 lines. 12 files exceed 1,910 lines, the largest being 9,241. 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
systest/1million/common/tc.go:1 — 9,241 lines (48× median)
dql/parser.go:1 — 3,565 lines (18× median)
graphql/schema/wrappers.go:1 — 3,215 lines (16× median)
query/query.go:1 — 3,158 lines (16× median)
graphql/schema/gqlschema.go:1 — 2,974 lines (15× median)

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

strong

No finding.

Security & Reliability Posture

adequate
05.1

7 credential-shaped strings in the tree sit in tests, examples, documentation or local development settings

adequate

Strings shaped like credentials appear only where fakes are usual: test fixtures, examples, documentation, placeholders and local stacks. They are almost always fakes. Ask someone to confirm that none of them works anywhere, because a real key in a development file is still a real key. 2 other matchs set aside: expired tokens, licence tokens a vendor verifies with a public key, or placeholder text where a key would go. None grants access to anything.

Evidence
5 cited: JWT, where fakes are usual
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.

Evidence
Dockerfile — runs as root
contrib/Dockerfile — runs as root
contrib/standalone/Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

9 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/cd-dgraph-nightly.yml:17 — action pinned by tag
.github/workflows/cd-dgraph-nightly.yml:20 — action pinned by tag
05.13

11 outbound calls can wait forever

adequate

11 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
contrib/jepsen/main.go:210 — outbound call without a timeout
dgraph/cmd/zero/zero.go:136 — outbound call without a timeout
dgraphapi/cluster.go:665 — outbound call without a timeout
05.21

3 shell commands built from strings

adequate

3 places run a command through a shell (`shell=True`, `os.system`, `exec` with a template) rather than passing arguments. Where any part comes from outside, it is command injection. Ask where each one's input comes from.

Evidence
systest/bulk_live/common/bulk_live_cases.go:810 — command run through a shell
systest/bulk_live/common/bulk_live_cases.go:824 — command run through a shell
x/metrics.go:786 — command run through a shell
05.26

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

adequate

2 of 162 locked dependencies match 5 published advisories in OSV, 2 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.

Evidence
go.mod — github.com/docker/docker v28.5.2+incompatible: GO-2026-4887 (high)
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
systest/backup/nfs-backup/docker-compose.yml:15 — host access behind a setting or in a local stack
systest/backup/nfs-backup/docker-compose.yml:159 — host access behind a setting or in a local stack
systest/backup/nfs-backup/docker-compose.yml:324 — host access behind a setting or in a local stack
05.60

Relicensed: Apache-2.0 → Apache-2.0 with the Commons Clause and an attribution term (2018-04-03) → Apache-2.0 (2025-04-07)

adequate

The root licence changed 2 time(s). Code taken under earlier terms stays under them; check which terms any fork or customer relied on.

Evidence
LICENSE — Apache-2.0 from 2015-08-25
LICENSE.md — Apache-2.0 with the Commons Clause and an attribution term from 2018-04-03
LICENSE.md — Apache-2.0 from 2025-04-07
05.65

9 advisories against this project in the last 24 months, 9 high or critical

adequate

The newest was published on 2026-08-02. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. None of them affects the surveyed version.

Evidence
2026-08-02: GHSA-qj98-gp63-54xj (critical), fixed in 25.4.0: Dgraph: Zero Unauthenticated HTTP Admin removeNode Denial of Service
2026-07-17: GHSA-33p8-wc97-5qcj (high), fixed in v25.3.8: DQL Injection via unvalidated regexp filter argument in GraphQL query rewriter
2026-06-29: GHSA-q2m9-6jp9-c6mc (high), fixed in 25.3.4: Dgraph Vulnerable to DQL Injection via checkUserPassword GraphQL Query
2026-06-13: GHSA-rrwh-6jrq-wp5v (critical), fixed in 25.3.5: Dgraph Alpha group stores can be replaced via unauthenticated external snapshot import
2026-04-22: GHSA-mrxx-39g5-ph77 (critical), fixed in 25.3.3: Dgraph: Pre-Auth Full Database Exfiltration via DQL Injection in Upsert Condition Field

Observability & Operations

adequate
06.7

The service logs with print: 96 calls against 2 logger calls

adequate

96 `print` or `console.log` calls in the service's code, and 2 calls through a logger. Printed lines carry no level and no context, cannot be switched off, and are hard to find again in production.

Evidence
acl/acl.go:120 — print used for logging
acl/acl.go:136 — print used for logging
acl/acl.go:158 — print used for logging
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 8 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.

Evidence
ocagent/docker-compose.yml:54 — image without a version
systest/tracing/jaeger2/docker-compose.yml:27 — 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 dgraph-io/dgraph: 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.