Borehole · Project · free tier
zama-ai/fhevm
Free reading: not for reliance
7a6e5a5 · 4,586 commits · 5,114 files
Read 2026-11-07

zama-ai/fhevm: technical due diligence, read from its repository

What Borehole read in zama-ai/fhevm's code and history at 7a6e5a5: 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 provenanceadequate
Engineering Process & SDLC Maturityadequate
Product & Engineering Maturitystrong
Security & Reliability Postureadequate
Observability & Operationsstrong
Fit with the Acquirernot assessable

What the repository says

  • Releases are cut from another branch than the one surveyed

Architecture & Codebase — including AI provenance

adequate
01.6

host-contracts/rust_bindings/src/fhevm_executor.rs is 19,911 lines, 205× this codebase's median file

adequate

The median source file here is 97 lines. 137 files exceed 1,000 lines, the largest being 19,911. 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
host-contracts/rust_bindings/src/fhevm_executor.rs:1 — 19,911 lines (205× median)
host-contracts/rust_bindings/src/protocol_config.rs:1 — 19,366 lines (199× median)
gateway-contracts/rust_bindings/src/i_gateway_config.rs:1 — 19,259 lines (198× median)
gateway-contracts/rust_bindings/src/decryption.rs:1 — 18,970 lines (195× median)
host-contracts/rust_bindings/src/hcu_limit.rs:1 — 16,966 lines (174× median)
01.25

1 base image floats: no version, or `latest`

adequate

1 of 70 `FROM` lines in product Dockerfiles name an image without a version, or with `latest`. Each build pulls whatever the registry serves that day, so the image that ships can change without a commit, and last month's build cannot be reproduced. Pin a version, or a digest.

Evidence
coprocessor/fhevm-engine/stress-test-generator/Dockerfile:34 — base image without a version

Engineering Process & SDLC Maturity

adequate
02.16

Tests are retried until they pass

adequate

The suite is configured to retry failing tests (sdk/js-sdk/src/core/base/fetch.test.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.

02.24

8% of recent commits change more than 2,000 lines

adequate

195 of 2599 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.

Evidence
195 commits over 2,000 lines

Product & Engineering Maturity

strong
04.62

Releases are cut from another branch than the one surveyed

adequate

The newest release, v0.14.5, is not on the branch this survey read; the newest release on it is v0.9.0. The shipped product may differ from what this report describes. Survey the release branch too.

Evidence
tag v0.14.5

Security & Reliability Posture

adequate
05.25

3 environment files are committed

adequate

coprocessor/fhevm-engine/tfhe-worker/.env, protocol-contracts/contracts/safe/.env.example.deploy, protocol-contracts/contracts/safe/.env.example.test are tracked in git. Environment files are where credentials usually live, and committing one usually means nobody decided how secrets reach the running application. Whatever is in it is in the history for good. Check 05.1 says whether it holds anything credential-shaped.

Evidence
coprocessor/fhevm-engine/tfhe-worker/.env — committed environment file
protocol-contracts/contracts/safe/.env.example.deploy — committed environment file
protocol-contracts/contracts/safe/.env.example.test — committed environment file
05.27

The build runs third-party code it does not pin

adequate

43 steps pipe 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.

Evidence
.github/workflows/check-docs.yml:31 — download piped into a shell
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.

05.26

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

adequate

88 of 4,057 locked dependencies match 224 published advisories in OSV, 112 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
host-contracts/lz-wiring/pnpm-lock.yaml — form-data 2.3.3: GHSA-fjxv-7rqg-78g4 (critical), fixed in 2.5.4; a development dependency
protocol-contracts/contracts/governance/pnpm-lock.yaml — handlebars 4.7.9: GHSA-8r5x-fm3f-whwj (critical), fixed in 4.7.10; a development dependency
sdk/cli-js-sdk/pnpm-lock.yaml — piscina 5.2.0: GHSA-67c8-pqhq-4rmx (critical), fixed in 5.3.2; a development dependency

Observability & Operations

strong
06.9

An error reporter is installed but never initialised

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

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on zama-ai/fhevm: 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.