Read 2026-11-03
open-source-legal/opencontracts: technical due diligence, read from its repository
What Borehole read in open-source-legal/opencontracts's code and history at 6652e8d: 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 | adequate |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | adequate |
| Fit with the Acquirer | not assessable |
What the repository says
LICENSE: Relicensed: Apache-2.0 → GPL-3.0 (2025-01-21) → AGPL-3.0 (2025-12-08) → MIT (2026-05-04)
Architecture & Codebase — including AI provenance
strongCommit messages are templated rather than written
adequate83% of commit subjects are exact repeats of another subject, and subject length varies by only 35.6 characters. A log written by someone explaining their reasoning to a future reader does not look like this. The log is therefore weak evidence of intent, whatever the code is like.
| 144× 'Ran linter.' |
| 120× 'Update auto-generated documentation screenshots' |
| 16× 'Update README.md' |
frontend/src/graphql/queries.ts is 7,749 lines, 47× this codebase's median file
adequateThe median source file here is 162 lines. 32 files exceed 1,620 lines, the largest being 7,749. 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.
frontend/src/graphql/queries.ts:1 — 7,749 lines (47× median) |
config/graphql/user_types.py:1 — 5,047 lines (31× median) |
frontend/src/graphql/mutations.ts:1 — 4,478 lines (27× median) |
opencontractserver/llms/agents/pydantic_ai_agents.py:1 — 3,816 lines (23× median) |
config/graphql/annotation_types.py:1 — 3,394 lines (20× median) |
Engineering Process & SDLC Maturity
adequateTests are retried until they pass
adequateThe suite is configured to retry failing tests (frontend/playwright.config.ts). A retry turns a flaky test green without saying why it failed, so a green build means the tests passed eventually. Ask how many retries a typical run needs, and which tests need them.
frontend/playwright.config.ts:49 — test retry |
5% of recent commits change more than 2,000 lines
adequate373 of 7159 commits in the last 24 months changed over 2,000 lines of code, not counting reformatting, renames, vendored or generated code. A change that size is rarely reviewed line by line. Ask how they were reviewed, and what made them that large.
| 373 commits over 2,000 lines |
Product & Engineering Maturity
adequate90 direct dependencies in a single manifest
adequatefrontend/package.json declares 90 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.
frontend/package.json — 90 declared |
compose/accelerated/embedder/requirements.txt — 9 declared |
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.
compose/accelerated/docling/Dockerfile — runs as root |
compose/accelerated/embedder/Dockerfile — runs as root |
compose/local/django/Dockerfile — runs as root |
compose/production/aws/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate7 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/backend.yml:54 — action pinned by tag |
.github/workflows/backend.yml:143 — action pinned by tag |
2 outbound calls can wait forever
adequate2 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.
opencontractserver/analyzer/utils.py:32 — outbound call without a timeout |
opencontractserver/utils/analyzer.py:284 — outbound call without a timeout |
7 locked dependencies have published vulnerabilities, 5 high or critical
adequate7 of 936 locked dependencies match 11 published advisories in OSV, 5 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.
frontend/yarn.lock — brace-expansion 5.0.8: GHSA-6j4f-fj2g-mc7p (high), fixed in 5.0.10 |
frontend/yarn.lock — follow-redirects 1.16.1: GHSA-mrwp-f3q8-3g9p (high), fixed in 1.16.2 |
frontend/yarn.lock — js-yaml 4.3.1: GHSA-2883-xcg3-v3hh (high), fixed in 4.3.2 |
Relicensed: Apache-2.0 → GPL-3.0 (2025-01-21) → AGPL-3.0 (2025-12-08) → MIT (2026-05-04)
adequateThe root licence changed 3 time(s). Code taken under earlier terms stays under them; check which terms any fork or customer relied on.
Observability & Operations
adequateNo structured logging library is in use
adequateNothing references a structured logging library. Logs that are written to be read by a person are not searchable by a machine, which means incident response here is proportional to how well someone remembers the codebase rather than to what the tooling can find.
| searched 3,502 files for 10 structured logging libraries; 0 matched |
One request cannot be followed through the logs
adequateNothing in the service carries a request or correlation id, and there is no tracing. When a customer reports a failure, the log lines that belong to their request cannot be picked out from everyone else's.
| no request id, correlation id or tracing found |
No 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 |
Fit with the Acquirer
not assessableNot rated: structurally not assessable from a repository.
Read more, or read your own
The full report on open-source-legal/opencontracts: 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.