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.
| Dimension | Rating |
|---|---|
| Architecture & Codebase — including AI provenance | adequate |
| Engineering Process & SDLC Maturity | strong |
| Product & Engineering Maturity | strong |
| Security & Reliability Posture | adequate |
| Observability & Operations | strong |
| Fit with the Acquirer | not assessable |
What the repository says
CONTRIBUTING.md:46: states a policy on AI-generated contributions
Architecture & Codebase — including AI provenance
adequateserver/migrations/versions/2026-06-17-1455_initial_migration_june_2026_squash.py is 6,903 lines, 86× this codebase's median file
adequateThe 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.
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) |
1 base image floats: no version, or `latest`
adequate1 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.
infra/tailscale/Dockerfile:1 — base image without a version |
Engineering Process & SDLC Maturity
strongNo finding.
Product & Engineering Maturity
strongNo finding.
Security & Reliability Posture
adequate1 credential-shaped string committed to the tree
adequateMatches 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.
| Google API key pattern matched |
1 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.
server/Dockerfile — runs as root |
The build runs third-party code it does not pin
adequate25 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.
.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 |
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.
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 |
44 locked dependencies have published vulnerabilities, 38 high or critical in what ships
adequate44 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.
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 |
10 places insert HTML from a variable without sanitising it
adequate10 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.
clients/apps/demo-app/app/code-panel.tsx:48 — HTML from a variable |
clients/apps/web/src/app/(main)/(website)/(landing)/layout.tsx:41 — HTML from a variable |
clients/apps/web/src/app/layout.tsx:60 — HTML from a variable |
Observability & Operations
strong1 of 8 deployed images carry no version, or `latest`
adequate1 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.
server/docker-compose.yml:112 — image without a version |
Fit with the Acquirer
not assessableNot 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.