Borehole · Project · free tier
polarsource/polar
Free reading: not for reliance
bb1bac7 · 18,480 commits · 6,382 files
Read 2026-10-23

polarsource/polar: technical due diligence, read from its repository

What Borehole read in polarsource/polar's code and history at bb1bac7: 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 Maturitystrong
Product & Engineering Maturitystrong
Security & Reliability Postureadequate
Observability & Operationsstrong
Fit with the Acquirernot assessable

What the repository says

  • CONTRIBUTING.md:46: states a policy on AI-generated contributions

Architecture & Codebase — including AI provenance

adequate
01.6

server/migrations/versions/2026-06-17-1455_initial_migration_june_2026_squash.py is 6,903 lines, 86× this codebase's median file

adequate

The median source file here is 80 lines. 39 files exceed 1,000 lines, the largest being 6,903. 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
server/migrations/versions/2026-06-17-1455_initial_migration_june_2026_squash.py:1 — 6,903 lines (86× median)
server/polar/backoffice/organizations_v2/endpoints.py:1 — 5,135 lines (64× median)
server/polar/subscription/service.py:1 — 4,825 lines (60× median)
server/polar/order/service.py:1 — 3,558 lines (44× median)
server/emails/src/types/openapi.ts:1 — 3,402 lines (42× median)
01.25

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

adequate

1 of 14 `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
infra/tailscale/Dockerfile:1 — base image without a version

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

strong

No finding.

Security & Reliability Posture

adequate
05.1

1 credential-shaped string committed to the tree

adequate

Matches for Google API key appear in tracked files outside test and fixture paths. They stay in the history even after they leave the tree, so what matters is whether each was rotated. The code cannot tell whether any of them is live, and that decides whether this matters: none sits in production configuration, and none is in a format its provider keeps for live keys. Is any of these live? Show that each was rotated after it was committed, and when. Only Google API keys matched. Those are often public by design, in a browser app's Firebase or Maps configuration; the question is whether each is restricted to the app's domains and APIs.

Evidence
Google API key pattern matched
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
server/Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

25 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; 4 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/backoffice_reachability.yml:50 — action pinned by tag
.github/workflows/benchmark_sdk.yaml:60 — action pinned by tag
.github/workflows/test_server.yaml:151 — download piped into a shell
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
clients/apps/app/tooling/push-notifications/send-push.js:25 — command run through a shell
sdk/generator/generator/emitter.py:149 — command run through a shell
05.26

44 locked dependencies have published vulnerabilities, 38 high or critical in what ships

adequate

44 of 3,583 locked dependencies match 131 published advisories in OSV, 73 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.

Evidence
lambda/image-resizer/uv.lock — pillow 12.3.0: GHSA-332p-7hrc-92wf (critical), fixed in 13.0.0
clients/pnpm-lock.yaml — dompurify 3.4.16: GHSA-cg2g-xh64-v4q7 (critical), fixed in 3.4.17
clients/pnpm-lock.yaml — next 16.3.8: GHSA-2464-fhr4-w9xw (critical), fixed in 16.4.1
05.48

10 places insert HTML from a variable without sanitising it

adequate

10 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.

Observability & Operations

strong
06.18

1 of 8 deployed images carry no version, or `latest`

adequate

1 images in the deployment configuration are named without a version or as `latest`. A redeploy can change the software without a commit, a rollback has nothing to roll back to, and nobody can say from the repository what is running.

Evidence
server/docker-compose.yml:112 — image without a version

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on polarsource/polar: 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.