Borehole · Project · free tier
toeverything/affine
Free reading: not for reliance
fbf2ceb · 11,535 commits · 10,282 files
Read 2026-10-23

toeverything/affine: technical due diligence, read from its repository

What Borehole read in toeverything/affine's code and history at fbf2ceb: 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 & Operationsstrong
Fit with the Acquirernot assessable

What the repository says

  • LICENSE: Relicensed: MIT → MPL-2.0 (2022-12-30) → MIT (2023-08-29)
  • .github/PULL_REQUEST_TEMPLATE.md:19: states a policy on AI-generated contributions

Architecture & Codebase — including AI provenance

strong
01.6

packages/common/graphql/src/schema.ts is 8,642 lines, 151× this codebase's median file

adequate

The median source file here is 57 lines. 43 files exceed 1,000 lines, the largest being 8,642. 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.

Engineering Process & SDLC Maturity

strong
02.16

Tests are retried until they pass

adequate

The suite is configured to retry failing tests (packages/backend/server/src/core/doc/__tests__/codec-compare.spec.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.

Product & Engineering Maturity

adequate
04.3

88 direct dependencies in a single manifest

adequate

packages/backend/server/package.json declares 88 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.

04.38

9 files still carry code deprecated more than two years ago

adequate

9 files were marked deprecated over two years ago and still are, the oldest since Dec 2023. A deprecation is a promise to remove. Ask what still depends on these, and whether removing them is scheduled.

Security & Reliability Posture

adequate
05.6

1 Dockerfile runs 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
.render/Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

17 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/build-images.yml:209 — action pinned by tag
.github/workflows/build-images.yml:216 — action pinned by tag
05.21

2 shell commands built from strings

adequate

2 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
packages/frontend/apps/ios/codegen.ts:15 — command run through a shell
packages/frontend/apps/ios/codegen.ts:28 — command run through a shell
05.26

22 locked dependencies have published vulnerabilities, 2 high or critical

adequate

22 of 3,937 locked dependencies match 29 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. 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
yarn.lock — dompurify 3.4.16: GHSA-cg2g-xh64-v4q7 (critical), fixed in 3.4.17
Cargo.lock — rsa 0.9.10: RUSTSEC-2023-0071 (moderate)
yarn.lock — ip-address 10.7.3: GHSA-rxp7-6hxx-x8q5 (moderate), fixed in 10.7.4
05.48

15 places insert HTML from a variable without sanitising it

adequate

15 places set HTML from a value that is neither a literal nor passed through a sanitiser. Where the value can come from a user, that is stored cross-site scripting, and it is the first thing a buyer's security review looks for in a frontend.

05.60

Relicensed: MIT → MPL-2.0 (2022-12-30) → MIT (2023-08-29)

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 — MIT from 2022-07-22
LICENSE — MPL-2.0 from 2022-12-30
LICENSE — MIT from 2023-08-29
05.65

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

adequate

The newest was published on 2026-07-08. 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. The record is incomplete: NVD: 3 records name AFFiNE with nothing tying them to this repository (CVE-2025-11945, CVE-2026-7702, CVE-2026-99085).

Evidence
2026-07-08: CVE-2026-59262 (high): AFFiNE's histories GraphQL field fails to validate Doc.Read permission before exposing document edit history, allowing authenticated workspace members to retrie
2026-03-02: GHSA-wx9m-v7wq-g289 (moderate), fixed in 0.26.0: Open Redirect via Regex Bypass in redirect-proxy
2026-03-02: GHSA-67vm-2mcj-8965 (high): One-click Remote Code Execution through Custom URL Handling in AFFiNE v0.25.1

Observability & Operations

strong

No finding.

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on toeverything/affine: 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.