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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | strong |
| Engineering Process & SDLC Maturity | strong |
| Product & Engineering Maturity | adequate |
| Security & Reliability Posture | adequate |
| Observability & Operations | strong |
| Fit with the Acquirer | not 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
strongpackages/common/graphql/src/schema.ts is 8,642 lines, 151× this codebase's median file
adequateThe 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.
packages/common/graphql/src/schema.ts:1 — 8,642 lines (151× median) |
packages/frontend/apps/android/App/app/src/main/java/uniffi/affine_mobile_native/affine_mobile_native.kt:1 — 4,013 lines (70× median) |
packages/frontend/core/src/components/affine/onboarding/switch-widgets/toolbar.tsx:1 — 3,727 lines (65× median) |
packages/frontend/apps/ios/App/App/uniffi/affine_mobile_native.swift:1 — 3,408 lines (59× median) |
packages/backend/native/src/runtime/backend_runtime/payment/tests.rs:1 — 3,350 lines (58× median) |
Engineering Process & SDLC Maturity
strongTests are retried until they pass
adequateThe 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.
packages/backend/server/src/core/doc/__tests__/codec-compare.spec.ts:339 — test retry |
Product & Engineering Maturity
adequate88 direct dependencies in a single manifest
adequatepackages/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.
packages/backend/server/package.json — 88 declared |
packages/frontend/core/package.json — 87 declared |
blocksuite/affine/all/package.json — 69 declared |
packages/frontend/admin/package.json — 52 declared |
9 files still carry code deprecated more than two years ago
adequate9 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.
packages/frontend/component/src/ui/popover/index.ts — deprecated since Dec 2023 |
packages/frontend/component/src/components/notification-center/index.jotai.ts — deprecated since Apr 2024 |
packages/frontend/component/src/components/notification-center/index.tsx — deprecated since Apr 2024 |
packages/frontend/component/src/styles/styled.tsx — deprecated since Jun 2024 |
packages/frontend/component/src/components/import-page/index.tsx — deprecated since Aug 2024 |
Security & Reliability Posture
adequate1 Dockerfile runs 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.
.render/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate17 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/build-images.yml:209 — action pinned by tag |
.github/workflows/build-images.yml:216 — action pinned by tag |
2 shell commands built from strings
adequate2 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.
packages/frontend/apps/ios/codegen.ts:15 — command run through a shell |
packages/frontend/apps/ios/codegen.ts:28 — command run through a shell |
22 locked dependencies have published vulnerabilities, 2 high or critical
adequate22 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.
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 |
15 places insert HTML from a variable without sanitising it
adequate15 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.
blocksuite/affine/components/src/toast/html-to-element.ts:13 — HTML from a variable |
blocksuite/affine/components/src/toast/html-to-element.ts:16 — HTML from a variable |
blocksuite/docs-site/.vitepress/theme/components/blog-post-meta.vue:4 — HTML from a variable |
Relicensed: MIT → MPL-2.0 (2022-12-30) → MIT (2023-08-29)
adequateThe root licence changed 2 time(s). Code taken under earlier terms stays under them; check which terms any fork or customer relied on.
3 advisories against this project in the last 24 months, 2 high or critical
adequateThe 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).
| 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
strongNo finding.
Fit with the Acquirer
not assessableNot 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.