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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | adequate |
| Engineering Process & SDLC Maturity | adequate |
| Product & Engineering Maturity | strong |
| Security & Reliability Posture | adequate |
| Observability & Operations | strong |
| Fit with the Acquirer | not assessable |
What the repository says
- Releases are cut from another branch than the one surveyed
Architecture & Codebase — including AI provenance
adequatehost-contracts/rust_bindings/src/fhevm_executor.rs is 19,911 lines, 205× this codebase's median file
adequateThe 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.
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) |
1 base image floats: no version, or `latest`
adequate1 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.
coprocessor/fhevm-engine/stress-test-generator/Dockerfile:34 — base image without a version |
Engineering Process & SDLC Maturity
adequateTests are retried until they pass
adequateThe 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.
sdk/js-sdk/src/core/base/fetch.test.ts:104 — test retry |
8% of recent commits change more than 2,000 lines
adequate195 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.
| 195 commits over 2,000 lines |
Product & Engineering Maturity
strongReleases are cut from another branch than the one surveyed
adequateThe 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.
| tag v0.14.5 |
Security & Reliability Posture
adequate3 environment files are committed
adequatecoprocessor/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.
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 |
The build runs third-party code it does not pin
adequate43 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.
.github/workflows/check-docs.yml:31 — download piped into a shell |
3 shell commands built from strings
adequate3 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.
library-solidity/tasks/taskUtils.ts:8 — command run through a shell |
protocol-contracts/contracts/token/tasks/deployAndSetupToken.ts:205 — command run through a shell |
protocol-contracts/contracts/token/tasks/deployAndSetupToken.ts:212 — command run through a shell |
88 locked dependencies have published vulnerabilities, 3 high or critical in what ships
adequate88 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.
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
strongAn error reporter is installed but never initialised
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 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.